Hi there,
is it valid to combine an itemset and another item tag inside one select1 control? <xforms:select1> <item> <label>no choice</label> <value/> </item> <itemset ... ... </itemset> </xforms:select1> The xforms spex doesn't mention it, afaik. What I really want is a "no choice" item for my select1 control before i fill all the valid items using an itemset. Maybe there is a best practise to do just that. Has anybody found out the best way to do that? thanks for any help :oliver -- ----------------------- oliver charlet software development 11-041 Olsztyn, Poland [hidden email] ----------------------- -- 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 |
It works for me (using XForms classic engine):
<xforms:select1 ref="../move-detail-into" appearance="minimal"> <xforms:item> <xforms:label>select</xforms:label> <xforms:value>no-cart</xforms:value> </xforms:item> <xforms:item> <xforms:label>new</xforms:label> <xforms:value>new-carton</xforms:value> </xforms:item> <xforms:itemset nodeset="../form-model/cartons/carton"> <xforms:label ref="@id"/> <xforms:copy ref="@id"/> </xforms:itemset> </xforms:select1> A. On Dec 20, 2005, at 4:29 PM, Oliver Charlet wrote: > Hi there, > > is it valid to combine an itemset and another item tag inside one > select1 control? > <xforms:select1> > <item> > <label>no choice</label> > <value/> > </item> > <itemset ... > ... > </itemset> > </xforms:select1> > The xforms spex doesn't mention it, afaik. What I really want is a "no > choice" > item for my select1 control before i fill all the valid items using an > itemset. > Maybe there is a best practise to do just that. Has anybody found out > the best way > to do that? > thanks for any help > :oliver > > -- > ----------------------- > oliver charlet > software development > > 11-041 Olsztyn, Poland > > [hidden email] > ----------------------- > > > -- > 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 |
Administrator
|
In reply to this post by Oliver Charlet
Yes, you can do that. The spec implicitly allows this through the XForms
schema, and it works with OPS, one use case being exactly the purpose you are mentioning. -Erik Oliver Charlet wrote: > Hi there, > > is it valid to combine an itemset and another item tag inside one > select1 control? > <xforms:select1> > <item> > <label>no choice</label> > <value/> > </item> > <itemset ... > ... > </itemset> > </xforms:select1> > The xforms spex doesn't mention it, afaik. What I really want is a "no > choice" > item for my select1 control before i fill all the valid items using an > itemset. > Maybe there is a best practise to do just that. Has anybody found out > the best way > to do that? > thanks for any help > :oliver -- 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 |
I played around with a sample and found out, that the itemset only works, if both the element bound to the control and the itemset have no namespace. Any other case (namespace on either or both of the later elements) leads to either an empty list or an (validation?) error (! - sign shows up). I wonder if this is right or not. I couldn't find anything about namespaces in the xforms spex regarding the select or itemset. In my page though I have the case, that the manual item just doesn't show up, if the itemset has any entries. I only see the later. I am still trying to find the source for that, but my page is rather complex, so it is hard to debug. I am very sure, that both the itemset instance and the bound instance have no namespaces. Unfortunately there are no error messages in the log. Maybe you have some more details regarding the namespaces issue Eric? Or maybe eben just a hint where to look / debug. Is it worth taking a look at the xforms sources and maybe switch on a debug switch? Erik Bruchez schrieb: Yes, you can do that. The spec implicitly allows this through the XForms schema, and it works with OPS, one use case being exactly the purpose you are mentioning. -- ----------------------- oliver charlet software development 11-041 Olsztyn, Poland [hidden email] ----------------------- -- 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
|
Olivier,
Yes, it's a namespace issue, but a user issue ;-) I explain. Here: <xforms:instance id="main-no-ns" xmlns=""> <test> <choice test=""/> </test> </xforms:instance> elements <test> and <choice> are in no namespace. But here: <xforms:instance id="main-ns" xmlns="www.test-me.org"> <test> <choice test=""/> </test> </xforms:instance> elements <test> and <choice> are in the "www.test-me.org" namespace. If you want to address, with XPath, the <choice> element in the first case, you can write: instance('main-no-ns')/choice But, in the second case, you can't just do that. You have to use prefixes in your XPath expressions in order to make it clear that the element is in a namespace, e.g.: instance('main-no-ns')/test-me:choice Where the prefix "test-me" has been bound to the namespace URI, for example on the root element of the document, as follows: xmlns:test-me="www.test-me.org" I hope this helps! A attach a modified version of your example in the other thread. -Erik Oliver Charlet wrote: > I am having problems with that under xforms NG. > > I played around with a sample and found out, that the itemset only > works, if both > the element bound to the control and the itemset have no namespace. > Any other case (namespace on either or both of the later elements) > leads to either an empty list or an (validation?) error (! - sign shows up). > I wonder if this is right or not. I couldn't find anything about namespaces > in the xforms spex regarding the select or itemset. > > In my page though I have the case, that the manual item just doesn't > show up, if the > itemset has any entries. I only see the later. > I am still trying to find the source for that, but my page is rather > complex, so it is hard to debug. I am very sure, that both the itemset > instance and the > bound instance have no namespaces. Unfortunately there are no error > messages in the log. > > Maybe you have some more details regarding the namespaces issue Eric? Or > maybe > eben just a hint where to look / debug. Is it worth taking a look at the > xforms sources > and maybe switch on a debug switch? > > > Erik Bruchez schrieb: > >> Yes, you can do that. The spec implicitly allows this through the >> XForms schema, and it works with OPS, one use case being exactly the >> purpose you are mentioning. >> >> -Erik >> >> Oliver Charlet wrote: >> >>> Hi there, >>> >>> is it valid to combine an itemset and another item tag inside one >>> select1 control? >>> <xforms:select1> >>> <item> >>> <label>no choice</label> >>> <value/> >>> </item> >>> <itemset ... >>> ... >>> </itemset> >>> </xforms:select1> >>> The xforms spex doesn't mention it, afaik. What I really want is a >>> "no choice" >>> item for my select1 control before i fill all the valid items using >>> an itemset. >>> Maybe there is a best practise to do just that. Has anybody found out >>> the best way >>> to do that? >>> thanks for any help >>> :oliver >> >> >>------------------------------------------------------------------------ >> >> >>-- >>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 >> >> > > -- > ----------------------- > oliver charlet > software development > > 11-041 Olsztyn, Poland > > [hidden email] > ----------------------- > > > ------------------------------------------------------------------------ > > > -- > 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 |
Free forum by Nabble | Edit this page |