Displaying page numbers

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Displaying page numbers

srikanth.prodigy

Hello All,

 

I am trying to display page numbers like 1,2,3 … etc each page having ten entries I have used

 

<xforms:variable name="countrows" select="count(instance('events-instance')/Event[contains(translate(ShortDescription, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz'),

    translate(instance('queryname')/getevent, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz')) and instance('queryname')/getevent!='' and string-length(instance('queryname')/getevent) &gt; 2 and (ExpirationDate='' or ExpirationDate &gt; current-date())])"/>

                  <xforms:output value="$countrows"/>

 

 

 

 

<xforms:repeat nodeset="(instance('events-instance')/Event[contains(translate(ShortDescription, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz'),

                  translate(instance('queryname')/getevent, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz')) and instance('queryname')/getevent!='' and string-length(instance('queryname')/getevent) &gt; 2 ])[position() * 10 &lt; $countrows ]" >

                      <a href="http://localhost:8080/web/guest/search?Search={instance('queryname')/getevent}&amp;p_p_id=searchxpl_WAR_searchxpl_INSTANCE_eVKL&amp;p_p_lifecycle=0&amp;p_p_state=maximized&amp;p_p_col_count=1&amp;p_p_col_id=column-2&amp;x=36&amp;y=5&amp;page={position()}"><xforms:output value="position()"/></a>

 

                      </xforms:repeat>

 

But the page number is always displaying as 1

 

Can we display page numbers dynamically  using xforms trigger and by clicking that page number trigger it should display

Entries

 

Thanks,

Srikanth A

 



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Displaying page numbers

Alessandro Vernet
Administrator
Srikanth,

srikanth.prodigy wrote
I am trying to display page numbers like 1,2,3 . etc each page having ten
entries I have used
Using <xforms:output value="position()"/> inside an <xforms:repeat> should work and give you the expected result. Could you send us an example that we can run the XForms sandbox? (Also see: http://www.orbeon.com/ops/doc/home-faq#reporting-issues)

Alex
Reply | Threaded
Open this post in threaded view
|

RE: Re: Displaying page numbers

srikanth.prodigy
Hello Alex,

I have created an example that displays number of entries, page number, and
ten values per each page.
It should display page numbers 1 2 as per the example used but it is
displaying page number 1

Please find the attachment with this mail.

Thanks,
Srikanth A



-----Original Message-----
From: Alessandro Vernet [mailto:[hidden email]]
Sent: Wednesday, March 18, 2009 12:30 AM
To: [hidden email]
Subject: [ops-users] Re: Displaying page numbers


Srikanth,


srikanth.prodigy wrote:
>
> I am trying to display page numbers like 1,2,3 . etc each page having ten
> entries I have used
>

Using <xforms:output value="position()"/> inside an <xforms:repeat> should
work and give you the expected result. Could you send us an example that we
can run the XForms sandbox? (Also see:
http://www.orbeon.com/ops/doc/home-faq#reporting-issues)

Alex

-----
Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise
Orbeon's Blog: http://www.orbeon.com/blog/
Personal Blog: http://avernet.blogspot.com/
Twitter - http://twitter.com/avernet
--
View this message in context:
http://www.nabble.com/Displaying-page-numbers-tp22561196p22565684.html
Sent from the ObjectWeb OPS - Users mailing list archive at Nabble.com.



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws

limitedrec.xhtml (2K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Displaying page numbers

Arun bijapur
In reply to this post by srikanth.prodigy
Srikanth,

Can your problem be solved with below simplified implementation?

May be I could ve not got 100% what you are trying to solve at?

<xforms:instance id='dummy'>
    <dummy xmlns=''>
        <counter id='1'/>
        <counter id='2'/>
        <counter id='3'/>
        <counter id='4'/>
        <counter id='5'/>
        <counter id='6'/>
        <counter id='7'/>
        <counter id='8'/>
        <counter id='9'/>
        <counter id='10'/>
    </dummy>
</xforms:instance>

<xforms:repeat nodeset="instance('dummy')/counter">
    <a href="urlpage&amp;page={position()}"><xforms:output value="position()"/></a>
</xforms:repeat>

Let me know if I was be useful for any extent/


Regards
Arun


On Tue, Mar 17, 2009 at 8:30 PM, Srikanth A <[hidden email]> wrote:

Hello All,

 

I am trying to display page numbers like 1,2,3 … etc each page having ten entries I have used

 

<xforms:variable name="countrows" select="count(instance('events-instance')/Event[contains(translate(ShortDescription, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz'),

    translate(instance('queryname')/getevent, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz')) and instance('queryname')/getevent!='' and string-length(instance('queryname')/getevent) &gt; 2 and (ExpirationDate='' or ExpirationDate &gt; current-date())])"/>

                  <xforms:output value="$countrows"/>

 

 

 

 

<xforms:repeat nodeset="(instance('events-instance')/Event[contains(translate(ShortDescription, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz'),

                  translate(instance('queryname')/getevent, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz')) and instance('queryname')/getevent!='' and string-length(instance('queryname')/getevent) &gt; 2 ])[position() * 10 &lt; $countrows ]" >

                      <a href="http://localhost:8080/web/guest/search?Search={instance('queryname')/getevent}&amp;p_p_id=searchxpl_WAR_searchxpl_INSTANCE_eVKL&amp;p_p_lifecycle=0&amp;p_p_state=maximized&amp;p_p_col_count=1&amp;p_p_col_id=column-2&amp;x=36&amp;y=5&amp;page={position()}"><xforms:output value="position()"/></a>

 

                      </xforms:repeat>

 

But the page number is always displaying as 1

 

Can we display page numbers dynamically  using xforms trigger and by clicking that page number trigger it should display

Entries

 

Thanks,

Srikanth A

 



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws




--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

RE: Re: Displaying page numbers

Alessandro Vernet
Administrator
In reply to this post by srikanth.prodigy
Srikanth,

srikanth.prodigy wrote
I have created an example that displays number of entries, page number, and
ten values per each page.
It should display page numbers 1 2 as per the example used but it is
displaying page number 1
$countrows = 13, and you show the values, such as position() * 10 < $countrows. So only the first one shows (1*10 < 13, but not( 2*20 < 13 )). So I don't think there is a bug here (or at least not in the XForms engine).

Alex