Displaying tables with range-controls?

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

Displaying tables with range-controls?

Marcus-2
Hi,
 
i have one more question for my webapp.
I need to display a big amount of "titles" out of my database to filter my search results. To be more specific, when i search my db a get let say about 50-60 documents listed. What i want to do now is, to display the head-titles out of each document to a table, and to link those headlines with each document, so by clicking on them, the specific document will load for more details.
 
1. How can i link those head-titles to become links/ triggers?
In the gov-example i have to check a specific document and then click the "View or Change" Button to load it. I would prefer to make the headline the trigger! Is that possible?
 
2. The more important thing is, when my results are more than 10 or 20 documents, i would like to display them in a "splited" table with links to the other results. Sorry, i'm missing the right words to explain that :-( So imagine a table where only the results from 1-10 are displayed and over the table there are "<" and ">" triggers, that will show my the next 10 titles by clicking on them. Can this be done in xforms, so i have to query the database only once? And how can i achiev that? Or do i have to do this within my xquery and query the database for getting next 10 results? Which way would you prefer?
 
Inside the database there will be about 2000-3000 items and thats all. And for the filtering i need onyl the headlines and the document id, so query for the whole list shouldn't be the problem, because the instance will hold only about lets say 100-200 item at maximum as a query result. So think query the database each time would be slower than do this with xforms, wouldn't it?
 
Is ther any example shipped with OPS? May be within in an older release? Where such a table with additional control "next 10" "last 10" or "show 10/20/50 at once" is implemented? That would be a great help. At the moment i have only the OPS 3.5.1 installed and read that there were a lot more examples in the older releases?
 
Thanks for help, have a nice weekend,
Marcus
 


--
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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Displaying tables with range-controls?

fl.schmitt(ops-users)
Hi,

Marcus schrieb:

> 1. How can i link those head-titles to become links/ triggers?
> In the gov-example i have to check a specific document and then click
> the "View or Change" Button to load it. I would prefer to make the
> headline the trigger! Is that possible?

Is the "headline" based on the content of an instance node? Then you
could use that node as ref for the label value:

<xforms:submit submission="..." appearance="minimal">
   <xforms:label ref="[xpath-to-headline-node]" />
</xforms:submit>

(Didn't test it, but should work - see also:
http://www.orbeon.com/ops/doc/reference-xforms-ng#xforms-label-alert-help-hint
)

> 2. The more important thing is, when my results are more than 10 or 20
> documents, i would like to display them in a "splited" table with links
> to the other results. Sorry, i'm missing the right words to explain that
> :-( So imagine a table where only the results from 1-10 are displayed
> and over the table there are "<" and ">" triggers, that will show my the
> next 10 titles by clicking on them. Can this be done in xforms, so i
> have to query the database only once? And how can i achiev that?

You can limit the "range" of an instance nodeset that's referenced by a
xforms:repeat in a very flexible way; see the third example at
http://www.orbeon.com/ops/doc/reference-xforms-ng#d21e2098
In this case you could combine position() &gt;= [start] and position()
&lt;= [end]. The problem is how to adjust the start and end value.

Maybe this could work (again untested):
1.) implement a control instance containing two nodes:
<headlinelist>
        <start/>
        <end />
</headlinelist>
2.) initialize the start and end values as needed (setValue on
xforms-ready: start = 1, end = start + 10 or 20)
2a.) To make it more comfortable, the end value could be calculated
based on the start value -> only the start value has to be set.
3.) reference the start and end values at the repeat definition:
position() &gt;= instance('control')/start and position() &lt;=
instance('control')/end
4.) To "scroll" to the next or previous list entries: implement a
trigger with a setValue action in- or decrementing the control instance
value(s).

If this works, it could get extended with input fields so the user could
"jump" to a certain point in the list or with "first" / "last" triggers
to quickly reach the beginning or end of the list.

HTH
florian



--
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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Re: Displaying tables with range-controls?

Marcus-2
Hi Florian,
thanks a lot for the tipps! Especialy the second one will do i think great
work!
I everytime appreciate your help, thanks a lot...

Marcus


----- Original Message -----
From: "Florian Schmitt" <[hidden email]>
To: <[hidden email]>
Sent: Sunday, May 20, 2007 2:02 PM
Subject: [ops-users] Re: Displaying tables with range-controls?


> Hi,
>
> Marcus schrieb:
>
>> 1. How can i link those head-titles to become links/ triggers?
>> In the gov-example i have to check a specific document and then click
>> the "View or Change" Button to load it. I would prefer to make the
>> headline the trigger! Is that possible?
>
> Is the "headline" based on the content of an instance node? Then you
> could use that node as ref for the label value:
>
> <xforms:submit submission="..." appearance="minimal">
>   <xforms:label ref="[xpath-to-headline-node]" />
> </xforms:submit>
>
> (Didn't test it, but should work - see also:
> http://www.orbeon.com/ops/doc/reference-xforms-ng#xforms-label-alert-help-hint
> )
>
>> 2. The more important thing is, when my results are more than 10 or 20
>> documents, i would like to display them in a "splited" table with links
>> to the other results. Sorry, i'm missing the right words to explain that
>> :-( So imagine a table where only the results from 1-10 are displayed
>> and over the table there are "<" and ">" triggers, that will show my the
>> next 10 titles by clicking on them. Can this be done in xforms, so i
>> have to query the database only once? And how can i achiev that?
>
> You can limit the "range" of an instance nodeset that's referenced by a
> xforms:repeat in a very flexible way; see the third example at
> http://www.orbeon.com/ops/doc/reference-xforms-ng#d21e2098
> In this case you could combine position() &gt;= [start] and position()
> &lt;= [end]. The problem is how to adjust the start and end value.
>
> Maybe this could work (again untested):
> 1.) implement a control instance containing two nodes:
> <headlinelist>
> <start/>
> <end />
> </headlinelist>
> 2.) initialize the start and end values as needed (setValue on
> xforms-ready: start = 1, end = start + 10 or 20)
> 2a.) To make it more comfortable, the end value could be calculated
> based on the start value -> only the start value has to be set.
> 3.) reference the start and end values at the repeat definition:
> position() &gt;= instance('control')/start and position() &lt;=
> instance('control')/end
> 4.) To "scroll" to the next or previous list entries: implement a
> trigger with a setValue action in- or decrementing the control instance
> value(s).
>
> If this works, it could get extended with input fields so the user could
> "jump" to a certain point in the list or with "first" / "last" triggers
> to quickly reach the beginning or end of the list.
>
> HTH
> florian
>
>

--------------------------------------------------------------------------------


>
> --
> 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
> ObjectWeb mailing lists service home page: http://www.objectweb.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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws