Xpages and View/Pager Controls

I am trying out the new XPages and they are looking very cool!

I was curious on how I could recreate some functionality I use currently with as $$ViewTemplateDefault. For most views we have a pre-built $$ViewTemplateDefault that has many view navigation actions (like First, Last, Next, etc…) included are a ‘jump’ that allows a move down the view using the StartKey parameter and a ‘# lines’ that allows the changing of the number of lines displayed using the count URL parameter.

How do I recreate those types of options when using a View control and a Pager control on a XPage?

Also can you have one XPage that is used for many views or should I separate my page to several custom controls and and make a XPage per view and just add in my custom controls?

Subject: Some answers

For most views we have a pre-built $$ViewTemplateDefault that has many view navigation actions (like First, Last, Next, etc…) included are a ‘jump’ that allows a move down the view using the StartKey parameter and a ‘# lines’ that allows the changing of the number of lines displayed using the count URL parameter.

How do I recreate those types of options when using a View control and a Pager control on a XPage?<<<

You can create a custom control that encapsulate all those functions and the reuse this control nto your XPages. The Table and View controls have methods like this:

public boolean gotoFirstPage();

public boolean gotoPreviousPage();

public boolean gotoNextPage();

public boolean gotoLastPage();

public boolean gotoRow(int row);

that you can use, for example, when a button is clicked. You you can find the row you want to jump to, and call those methods

Also can you have one XPage that is used for many views or should I separate my page to several custom controls and and make a XPage per view and just add in my custom controls?<<<

Create an XPage per view and add you custom control.