Hi list,
I noticed that the "combined" and "minimal" appearances of xforms:select do not support arbitrarily nested itemsets. If there is more than one level of nesting, the result is different depending on whether the server or the client generates the HTML (took me a while to find out there are two places doing that...): Server-generated code will print nested optiongroups, which is invalid HTML. Client-generated code will simply omit the more deeply nested items. Attached is a fix (against Orbeon 3.9) that makes them both behave the same and avoids invalid HTML. Of course it can not properly print the nested structure, instead it opens a new optiongroup when a new nesting level starts, if necessary closing the old one beforehand. Together with a class for the items that specifies the nesting level and some CSS, this makes it possibly to properly draw a tree structure within a drop-down menu, with the titles of the groups not being selectable - exactly the behaviour I need. This only changes the behaviour for a case that was previously completely broken, flat and one-level-nested itemsets should behave exactly the same as before. Please let me know if this patch, or a similar one, could be accepted into Orbeon. Kind regards, Ralf -- 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 support-arbitarily-nested-itemsets-in-minimal-and-co.patch (10K) Download Attachment |
Administrator
|
Ralf,
Excellent! I am trying to have a look at this patch and the other one you sent as well. -Erik On Fri, Aug 12, 2011 at 9:49 AM, Ralf Jung <[hidden email]> wrote: > Hi list, > > I noticed that the "combined" and "minimal" appearances of xforms:select do > not support arbitrarily nested itemsets. If there is more than one level of > nesting, the result is different depending on whether the server or the client > generates the HTML (took me a while to find out there are two places doing > that...): Server-generated code will print nested optiongroups, which is > invalid HTML. Client-generated code will simply omit the more deeply nested > items. > > Attached is a fix (against Orbeon 3.9) that makes them both behave the same and > avoids invalid HTML. Of course it can not properly print the nested structure, > instead it opens a new optiongroup when a new nesting level starts, if > necessary closing the old one beforehand. Together with a class for the items > that specifies the nesting level and some CSS, this makes it possibly to > properly draw a tree structure within a drop-down menu, with the titles of the > groups not being selectable - exactly the behaviour I need. > This only changes the behaviour for a case that was previously completely > broken, flat and one-level-nested itemsets should behave exactly the same as > before. > Please let me know if this patch, or a similar one, could be accepted into > Orbeon. > > Kind regards, > Ralf > > > -- > 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 |
Administrator
|
In reply to this post by Ralf Jung
Ralf,
I am looking at integrating this patch. I notice that on the master branch, some changes have been made by Alex to AjaxServer.js, and they conflict with your changes. There are two related commits with those changes, the second of which impacting directly the function that touche the optgroups. https://github.com/orbeon/orbeon-forms/commit/4a1a5576008db5bae5dd33e676ee6660fce14260 https://github.com/orbeon/orbeon-forms/commit/434544c24a76a18e1c1561c1f201b88caf7b3118 (There is no conflict with your change to XFormsSelect1Handler.java.) Since you seem to have a better understanding of that code than I do, I am wondering if you could provide a version of your patch applied to the master branch? -Erik On Fri, Aug 12, 2011 at 9:49 AM, Ralf Jung <[hidden email]> wrote: > Hi list, > > I noticed that the "combined" and "minimal" appearances of xforms:select do > not support arbitrarily nested itemsets. If there is more than one level of > nesting, the result is different depending on whether the server or the client > generates the HTML (took me a while to find out there are two places doing > that...): Server-generated code will print nested optiongroups, which is > invalid HTML. Client-generated code will simply omit the more deeply nested > items. > > Attached is a fix (against Orbeon 3.9) that makes them both behave the same and > avoids invalid HTML. Of course it can not properly print the nested structure, > instead it opens a new optiongroup when a new nesting level starts, if > necessary closing the old one beforehand. Together with a class for the items > that specifies the nesting level and some CSS, this makes it possibly to > properly draw a tree structure within a drop-down menu, with the titles of the > groups not being selectable - exactly the behaviour I need. > This only changes the behaviour for a case that was previously completely > broken, flat and one-level-nested itemsets should behave exactly the same as > before. > Please let me know if this patch, or a similar one, could be accepted into > Orbeon. > > Kind regards, > Ralf > > > -- > 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 |
Hi Erik,
I rebased my local branch (which is using the 3.9-stable branch from your repo) into the current orbeon master and pushed the result to https://github.com/ralfjung-e/orbeon-forms It contains all the three patches I submitted here. The one for the xforms:select nesting is at https://github.com/ralfjung- e/orbeon-forms/commit/21c5a43ceacf0f8daabaf972364f17610e7a9991 Kind regards, Ralf On Friday 23 September 2011 19:43:39 Erik Bruchez wrote: > Ralf, > > I am looking at integrating this patch. > > I notice that on the master branch, some changes have been made by > Alex to AjaxServer.js, and they conflict with your changes. There are > two related commits with those changes, the second of which impacting > directly the function that touche the optgroups. > > https://github.com/orbeon/orbeon-forms/commit/4a1a5576008db5bae5dd33e676ee6 > 660fce14260 > https://github.com/orbeon/orbeon-forms/commit/434544c24a76a18e1c1561c1f201 > b88caf7b3118 > > (There is no conflict with your change to XFormsSelect1Handler.java.) > > Since you seem to have a better understanding of that code than I do, > I am wondering if you could provide a version of your patch applied to > the master branch? > > -Erik > > On Fri, Aug 12, 2011 at 9:49 AM, Ralf Jung <[hidden email]> wrote: > > Hi list, > > > > I noticed that the "combined" and "minimal" appearances of xforms:select > > do not support arbitrarily nested itemsets. If there is more than one > > level of nesting, the result is different depending on whether the > > server or the client generates the HTML (took me a while to find out > > there are two places doing that...): Server-generated code will print > > nested optiongroups, which is invalid HTML. Client-generated code will > > simply omit the more deeply nested items. > > > > Attached is a fix (against Orbeon 3.9) that makes them both behave the > > same and avoids invalid HTML. Of course it can not properly print the > > nested structure, instead it opens a new optiongroup when a new nesting > > level starts, if necessary closing the old one beforehand. Together with > > a class for the items that specifies the nesting level and some CSS, > > this makes it possibly to properly draw a tree structure within a > > drop-down menu, with the titles of the groups not being selectable - > > exactly the behaviour I need. > > This only changes the behaviour for a case that was previously completely > > broken, flat and one-level-nested itemsets should behave exactly the same > > as before. > > Please let me know if this patch, or a similar one, could be accepted > > into Orbeon. > > > > Kind regards, > > Ralf > > > > > > -- > > 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 |
Free forum by Nabble | Edit this page |