Multi column appearance for Select and select1 (RFE)

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

Multi column appearance for Select and select1 (RFE)

nvdbleek
Hi,

We have the use case where we want a select or select1 control that needs to be displayed in multiple columns, with the items of the itemsets being distributed over the columns in a Z or N order.

An example of a 3 column N order distribution with 11 items is:

|_|  item 1     |_|  item 5     |_|  item 9
|_|  item 2     |_|  item 6     |_|  item 10
|_|  item 3     |_|  item 7     |_|  item 11
|_|  item 4     |_|  item 8


The HTML markup could be a simple table (styling could be done by using a stylesheet or directly on the control by a couple of attributes like item-height, item-height, label-width, ...).

But I'm a bit stuck implementing this custom control. I first thought of implementing an XBL control, but it starts to get messy because I need to support the mixing of xf:item and xf:itemset for the items of the control. Only item or itemset elements could be implemented straight forward by either an XSLT repeat or an XForms repeat respectively. But a mix becomes cumbersome because then you have to do everything in an XForms repeat because the static items can shift row and column if there are dynamic items in front of them.

I saw that the tree selector is handled in Native Code (Java and JS) with a setItemset hook in JS. If I could use that approach it would be quite straight forward to implement the update in JS, because all the items are expanded (some juggling with nodes will do the trick). But this requires me to change native Orbeon code.

Do you see other possibilities? If not would it be possible to create an extension point in Orbeon so I can plug-in another renderer for my custom appearance (I don't matter if I need to write java, scala and/or js code for my control and that I need to implement the extension mechanism). Another possibility could be, if orbeon is interested to incorporate the control into Orbeon, that I provided the code for such a control.

--
Thanks in advance,

Nick Van den Bleeken


--
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: Multi column appearance for Select and select1 (RFE)

Erik Bruchez
Administrator
Nick,

One possibility might be to use the xxf:itemset() function, as used by these components:


The idea is to use a hidden select (with appearance="xxforms:internal"), whose purpose is to handle the itemset, then the xxf:itemset() function to get the itemset details.

-Erik

On Thu, Mar 10, 2011 at 9:48 AM, Nick Van den Bleeken <[hidden email]> wrote:
Hi,

We have the use case where we want a select or select1 control that needs to be displayed in multiple columns, with the items of the itemsets being distributed over the columns in a Z or N order.

An example of a 3 column N order distribution with 11 items is:

|_|  item 1     |_|  item 5     |_|  item 9
|_|  item 2     |_|  item 6     |_|  item 10
|_|  item 3     |_|  item 7     |_|  item 11
|_|  item 4     |_|  item 8


The HTML markup could be a simple table (styling could be done by using a stylesheet or directly on the control by a couple of attributes like item-height, item-height, label-width, ...).

But I'm a bit stuck implementing this custom control. I first thought of implementing an XBL control, but it starts to get messy because I need to support the mixing of xf:item and xf:itemset for the items of the control. Only item or itemset elements could be implemented straight forward by either an XSLT repeat or an XForms repeat respectively. But a mix becomes cumbersome because then you have to do everything in an XForms repeat because the static items can shift row and column if there are dynamic items in front of them.

I saw that the tree selector is handled in Native Code (Java and JS) with a setItemset hook in JS. If I could use that approach it would be quite straight forward to implement the update in JS, because all the items are expanded (some juggling with nodes will do the trick). But this requires me to change native Orbeon code.

Do you see other possibilities? If not would it be possible to create an extension point in Orbeon so I can plug-in another renderer for my custom appearance (I don't matter if I need to write java, scala and/or js code for my control and that I need to implement the extension mechanism). Another possibility could be, if orbeon is interested to incorporate the control into Orbeon, that I provided the code for such a control.

--
Thanks in advance,

Nick Van den Bleeken


--
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: Multi column appearance for Select and select1 (RFE)

nvdbleek
Thank you for the fast reply, looks promising, will give this a try next Thursday (leaving for a short ski early tomorrow morning).

On Fri, Mar 11, 2011 at 05:38, Erik Bruchez [via Orbeon Forms (ops-users)] <[hidden email]> wrote:
Nick,

One possibility might be to use the xxf:itemset() function, as used by these components:


The idea is to use a hidden select (with appearance="xxforms:internal"), whose purpose is to handle the itemset, then the xxf:itemset() function to get the itemset details.

-Erik

On Thu, Mar 10, 2011 at 9:48 AM, Nick Van den Bleeken <[hidden email]> wrote:
Hi,

We have the use case where we want a select or select1 control that needs to be displayed in multiple columns, with the items of the itemsets being distributed over the columns in a Z or N order.

An example of a 3 column N order distribution with 11 items is:

|_|  item 1     |_|  item 5     |_|  item 9
|_|  item 2     |_|  item 6     |_|  item 10
|_|  item 3     |_|  item 7     |_|  item 11
|_|  item 4     |_|  item 8


The HTML markup could be a simple table (styling could be done by using a stylesheet or directly on the control by a couple of attributes like item-height, item-height, label-width, ...).

But I'm a bit stuck implementing this custom control. I first thought of implementing an XBL control, but it starts to get messy because I need to support the mixing of xf:item and xf:itemset for the items of the control. Only item or itemset elements could be implemented straight forward by either an XSLT repeat or an XForms repeat respectively. But a mix becomes cumbersome because then you have to do everything in an XForms repeat because the static items can shift row and column if there are dynamic items in front of them.

I saw that the tree selector is handled in Native Code (Java and JS) with a setItemset hook in JS. If I could use that approach it would be quite straight forward to implement the update in JS, because all the items are expanded (some juggling with nodes will do the trick). But this requires me to change native Orbeon code.

Do you see other possibilities? If not would it be possible to create an extension point in Orbeon so I can plug-in another renderer for my custom appearance (I don't matter if I need to write java, scala and/or js code for my control and that I need to implement the extension mechanism). Another possibility could be, if orbeon is interested to incorporate the control into Orbeon, that I provided the code for such a control.

--
Thanks in advance,

Nick Van den Bleeken


--
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



If you reply to this email, your message will be added to the discussion below:
http://orbeon-forms-ops-users.24843.n4.nabble.com/Multi-column-appearance-for-Select-and-select1-RFE-tp3346414p3347449.html
To start a new topic under Orbeon Forms (ops-users), email [hidden email]
To unsubscribe from Orbeon Forms (ops-users), click here.



--
Regards,

Nick Van den Bleeken