Hi!
1. Whats about the xforms:hint tag? I've tried to use it, but I think there is something wrong. When I'm using xforms:hint in combination with xforms:input, hint is not highlighted. For xforms:secret it's working. <xforms:input ref="name"> <xforms:label>name</xforms:label> <xforms:hint>max. 20</xforms:hint> </xforms:input> 2. I like to use input in more dynamic way. I have 2 different choices (maybe xforms:select1). Each of them have 3 childs, which should be visible, when parent is selected. I hope it's understandable. ;-). So what's the most dressiest solution for that behavior? thanks -- 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 |
Is there a way for binding xforms:case to xforms:select1 or direct to a value of xforms instance?
-- 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 |
In reply to this post by c.harder
>Is there a way for binding xforms:case to xforms:select1 or direct to a value of xforms instance? Also the case attribute of the "xforms:toggle". Marc -- 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 |
Administrator
|
In reply to this post by c.harder
[hidden email] wrote:
> 1. Whats about the xforms:hint tag? I've tried to use it, but I > think there is something wrong. When I'm using xforms:hint in > combination with xforms:input, hint is not highlighted. For > xforms:secret it's working. This seems to be a new issue. I entered a bug: https://forge.objectweb.org/tracker/index.php?func=detail&aid=304294&group_id=168&atid=350207 > 2. I like to use input in more dynamic way. I have 2 different > choices (maybe xforms:select1). Each of them have 3 childs, which > should be visible, when parent is selected. I hope it's > understandable. ;-). > So what's the most dressiest solution for that behavior? I am not sure exactly what you are trying to do. What are the children in question? Please provide some more details. -Erik -- 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 |
Administrator
|
In reply to this post by c.harder
[hidden email] wrote:
> Is there a way for binding xforms:case to xforms:select1 or direct > to a value of xforms instance? I think I understand better what you are trying to achieve. This is what I suggest you do: 1. Use xforms:select1 to choose between one of two possible values <xforms:instance id="main"> <control xmlns=""> <my-select-value>1</my-select-value> </control> </xforms:instance> <xforms:select1 ref="instance('main')/my-select-value"> <xforms:item> <xforms:name>First</xforms:name> <xforms:value>1</xforms:value> </xforms:item> <xforms:item> <xforms:name>Second</xforms:name> <xforms:value>2</xforms:value> </xforms:item> </xforms:select1 2. Use an extra XForms instance and xforms:bind to determine some relevant nodes: <xforms:instance id="control-instance"> <control xmlns=""> <show-controls-1/> <show-controls-2/> </control> </xforms:instance> <xforms:bind nodeset="instance('control-instance')/show-controls-1" relevant="instance('main')/my-select-value = 1"/> <xforms:bind nodeset="instance('control-instance')/show-controls-2" relevant="instance('main')/my-select-value = 2"/> <xforms:group ref="instance('control-instance')/show-controls-1"> ... this group will be visible when you select the value "1" ... </xforms:group <xforms:group ref="instance('control-instance')/show-controls-2"> ... this group will be visible when you select the value "2" ... </xforms:group I hope this helps, -Erik -- 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 |
In reply to this post by Marc.Benimeli
Sorry I don't unsterstand. Can you give an example?
.... <xforms:select1 ref="/myform" appearance="minimal"> <xforms:label /> <xforms:item> <xforms:label>One</xforms:label> <xforms:value>1</xforms:value> </xforms:item> <xforms:item> <xforms:label>Two</xforms:label> <xforms:value>2</xforms:value> </xforms:item> </xforms:select1> .... <xforms:switch> <xforms:case id="One"> blabla </xforms:case> <xforms:case id="Two"> blabla </xforms:case> </xforms:switch> If I select the "One" item, I only want to see everything before the switch + the case with id="One". -- 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 |
Administrator
|
In reply to this post by Marc.Benimeli
[hidden email] wrote:
> >>Is there a way for binding xforms:case to xforms:select1 or direct >>to a value of xforms instance? > > Also the case attribute of the "xforms:toggle". The "case" attribute is static, so this means you need two or more xforms:toggle actions. Then you need to call one or the other of those actions depending on what value is currently selected from the xforms:switch. Unless there is a trick I am not aware of, you would have to be able to use conditional events handlers to achieve, which are not part of XForms 1.0. This is why I suggested a solution using xforms:bind and xforms:group instead. -Erik -- 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 |
In reply to this post by c.harder
>The "case" attribute is static, so this means you need two or more xforms:toggle actions. Then you need to call one or >the other of those actions depending on what value is currently selected from the xforms:switch. Unless there is a trick I >am not aware of, you would have to be able to use conditional events handlers to achieve, which are not part of XForms >1.0. This is why I suggested a solution using xforms:bind and xforms:group instead. Eric, Ok I understand, and I have read your response to "c.harder". I must generate my view through a pipeline since I have no idea of how many group of control I'll have to show. So I think XSLT is my friend. ;-) Marc -- 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 |
Administrator
|
In reply to this post by Erik Bruchez
Erik Bruchez wrote:
> [hidden email] wrote: > > > >>Is there a way for binding xforms:case to xforms:select1 or direct > >>to a value of xforms instance? > > > > Also the case attribute of the "xforms:toggle". > > The "case" attribute is static, so this means you need two or more > xforms:toggle actions. Then you need to call one or the other of > those actions depending on what value is currently selected from the > xforms:switch. Unless there is a trick I am not aware of, you would > have to be able to use conditional events handlers to achieve, which > are not part of XForms 1.0. This is why I suggested a solution using > xforms:bind and xforms:group instead. In fact, I was not correct. You could do something like this: <xforms:select1 ref="instance('main')/my-select-value"> <xforms:item> <xforms:name>First</xforms:name> <xforms:value>1</xforms:value> <xforms:toggle ev:event="xforms-select" case="case-1"/> </xforms:item> <xforms:item> <xforms:name>Second</xforms:name> <xforms:value>2</xforms:value> <xforms:toggle ev:event="xforms-select" case="case-2"/> </xforms:item> </xforms:select1> However we have a bug that prevents this to work correctly at the moment: http://forge.objectweb.org/tracker/index.php?func=detail&aid=304019&group_id=168&atid=350207 So the solution with xforms:bind and xforms:group is still the best :-) -Erik -- 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 |
Administrator
|
In reply to this post by c.harder
[hidden email] wrote:
> Sorry I don't unsterstand. Can you give an example? I thought that's what I was doing in my previous reply ;-) > .... > <xforms:select1 ref="/myform" appearance="minimal"> > <xforms:label /> > <xforms:item> > <xforms:label>One</xforms:label> > <xforms:value>1</xforms:value> > </xforms:item> > <xforms:item> > <xforms:label>Two</xforms:label> > <xforms:value>2</xforms:value> > </xforms:item> > </xforms:select1> > .... > <xforms:switch> > <xforms:case id="One"> > blabla > </xforms:case> > <xforms:case id="Two"> > blabla > </xforms:case> > </xforms:switch> > > If I select the "One" item, I only want to see everything before the > switch + the case with id="One". The solution I proposed does not involve xforms:switch and xforms:case, but uses two xforms:group elements and xforms:bind to make one of those two groups only relevant, i.e. visible. -Erik -- 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 |
Administrator
|
In reply to this post by Marc.Benimeli
[hidden email] wrote:
> > >>The "case" attribute is static, so this means you need two or more > > xforms:toggle actions. Then you need to call one or >the other of those > actions depending on what value is currently selected from the > xforms:switch. Unless there is a trick I >am not aware of, you would > have to be able to use conditional events handlers to achieve, which are > not part of XForms >1.0. This is why I suggested a solution using > xforms:bind and xforms:group instead. > > Eric, > > Ok I understand, and I have read your response to "c.harder". > I must generate my view through a pipeline since I have no idea of how > many group of control I'll have to show. > So I think XSLT is my friend. ;-) repeat iteration which matches the item selected in your xforms:select1 (if that's what you are using), with a bind like: <xforms:bind nodeset="employee[position() != instance('where-my-select1-is')/my-select1-value]" relevant="false()"/> <xforms:repeat nodeset="employee"> ... only one relevant iteration will actually show here ... </xforms:repeat> -Erik -- 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 |
In reply to this post by Erik Bruchez
Ok thanks, thats a start.
I will try the group- and bind-solution... hope it works. Please hurry up killing the bug ;-)) -- 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 |
In reply to this post by Erik Bruchez
Thanks a lot!!
That's what I want to do. It's working fine. -- 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 |
Administrator
|
In reply to this post by Erik Bruchez
On 11/15/05, Erik Bruchez <[hidden email]> wrote:
> [hidden email] wrote: > > > 1. Whats about the xforms:hint tag? I've tried to use it, but I > > think there is something wrong. When I'm using xforms:hint in > > combination with xforms:input, hint is not highlighted. For > > xforms:secret it's working. > > This seems to be a new issue. I entered a bug: > > https://forge.objectweb.org/tracker/index.php?func=detail&aid=304294&group_id=168&atid=350207 Alex -- Blog (XML, Web apps, Open Source): http://www.orbeon.com/blog/ -- 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
--
Follow Orbeon on Twitter: @orbeon Follow me on Twitter: @avernet |
In reply to this post by c.harder
-----Message d'origine----- De : Erik Bruchez [mailto:[hidden email]] De la part de Erik Bruchez Envoyé : mardi 15 novembre 2005 15:56 À : [hidden email] Objet : Re: [ops-users] Re: 1. xforms:input + xforms:hint 2. dynamic input? > You may have some luck with xforms:repeat, by making relevant only the repeat iteration which matches the item selected > in your xforms:select1 (if that's what you are using), with a bind like: > <xforms:bind nodeset="employee[position() != instance('where-my-select1-is')/my-select1-value]" relevant="false()"/> > <xforms:repeat nodeset="employee"> > ... only one relevant iteration will actually show here ... > </xforms:repeat> Erik, Yes I'm lucky. It's a pretty cool solution for what I want to achieve. By the way, Have I to do any action such submission or anything else after the selection ? Because the initial value display the right group of controls but when I change the selection, only the select1 control is display. Marc -- 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 |
Administrator
|
[hidden email] wrote:
> Yes I'm lucky. It's a pretty cool solution for what I want to achieve. > > By the way, Have I to do any action such submission or anything else after the selection ? > Because the initial value display the right group of controls but when I change the selection, only the select1 control is display. Marc, I attach a screenshot and the source code of a working example illustrating this mechanism! -Erik -- 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 |
Free forum by Nabble | Edit this page |