I have an element in the format <point>1 2 3</point>
which represents x y z coordinates, I cant change the schema.
I would like to edit the x y and z coords in 3 separate controls.
As I understand if there is a calculated bind it is always read only.
I have thought of writing xslt stylesheets on the server to transform it to a format
<point><x>1</x><y>2</y><z>3</z></point>
Let the user edit it
and then transform it back.
Is there any better way?
Thanks in advance.
-- Andrew Bailey -- 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 |
Andrew,
Re the calculated bind: the default is readonly, but you can change that back using readonly="false()". If you are using a recent build, you could write an XBL component to handle this. -Erik On Tue, Dec 8, 2009 at 11:05 AM, Andrew Bailey <[hidden email]> wrote: > I have an element in the format <point>1 2 3</point> > which represents x y z coordinates, I cant change the schema. > > I would like to edit the x y and z coords in 3 separate controls. > > As I understand if there is a calculated bind it is always read only. > > I have thought of writing xslt stylesheets on the server to transform it to > a format > <point><x>1</x><y>2</y><z>3</z></point> > Let the user edit it > and then transform it back. > > Is there any better way? > > Thanks in advance. > > -- > Andrew Bailey > > > -- > 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 |
Eric,
Thanks for the reply
If I were to set readonly="false()" I think I would need to have, two functions: the exslt function str:tokenize to split the string "1 2 3" (is this supported in orbeon?) and the inverse concat to join them back again. Is there any way to specify the calculate function and the inverse of the calculate in a bind, or using events?
Ill also look into writing a custom xbl component.
Thanks
Andy Bailey
-- 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
|
Andy,
On Mon, Dec 28, 2009 at 12:12 PM, Andrew Bailey <[hidden email]> wrote: > If I were to set readonly="false()" I think I would need to have, two > functions: the exslt function str:tokenize to split the string "1 2 3" (is > this supported in orbeon?) and the inverse concat to join them back again. You can use tokenize(), which is an XPath 2.0 function: http://www.w3.org/TR/xpath-functions/#func-tokenize And the opposite would be string-join(), also standard in XPath 2.0: http://www.w3.org/TR/xpath-functions/#func-string-join > Is there any way to specify the calculate function and the inverse of the > calculate in a bind, or using events? > Ill also look into writing a custom xbl component. You'll have to use events for that, and you can find some inspiration in the fr:dropdown-dates which does something very similar as it creates 3 drop-downs to edit a date stored as xs:date: http://github.com/orbeon/orbeon-forms/blob/master/src/resources-packaged/xbl/orbeon/dropdown-date/dropdown-date.xbl Alex -- Orbeon Forms - Web forms, open-source, for the Enterprise Orbeon's Blog: http://www.orbeon.com/blog/ My Twitter: http://twitter.com/avernet -- 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
--
Follow Orbeon on Twitter: @orbeon Follow me on Twitter: @avernet |
Free forum by Nabble | Edit this page |