Hi All,
I have an issue with a repeat set element, where some fields become editable/readonly depending on conditions. To start with in the xf:model I have given readonly to be always true(). In the repeat element, I have a xf:input, because the readonly attribute is set to true, I was expecting an input box which is not editable. However, I am able to edit the input there. To reproduce, you may use the example that i have attached along with this (2KB). You can see that I have marked the street to be readonly but when I show a xf:input object it is allowing me to edit. Am I missing something here? -- Regards, Kannan Ekanath -- 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 SelectControl.xhtml (2K) Download Attachment |
You are almost there. Try:
<xforms:bind nodeset="instance('main')/address/street" readonly="true ()"/> On Dec 20, 2006, at 8:29 AM, [hidden email] wrote: > Hi All, > I have an issue with a repeat set element, where some fields become > editable/readonly depending on conditions. To start with in the > xf:model I have given readonly to be always true(). In the repeat > element, I have a xf:input, because the readonly attribute is set > to true, I was expecting an input box which is not editable. > However, I am able to edit the input there. > > To reproduce, you may use the example that i have attached along > with this (2KB). You can see that I have marked the street to be > readonly but when I show a xf:input object it is allowing me to > edit. Am I missing something here? > > -- > Regards, > Kannan Ekanath > <SelectControl.xhtml> > > -- > You receive this message as a subscriber of the ops- > [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 |
Hi Alexandar,
I would like to ask a couple of questions on xforms:select1. The xf:input seems to honour the readonly flag set. However I am not able to get the xf:select1 to become readonly in the same way, for example, if I try (kindly refer to the same example), <xforms:bind nodeset="instance('main')/address/city" readonly="true()"/> 1) Then I would expect the xforms:select1 to be readonly *although* I have given some itemsets/options. Can you comment on this? 2) I also have an issue with the size of the xf:select1 box. I have like 5-6 boxes in the same row in my UI all of them having autosuggests. I have trouble because although the fields are actually 3-4 chars in length setting xxforms:size="3" doesnt reflect on the UI. (Note setting the same attribute on xf:input element seems to work though) Can you advice on the above two issues? Regards, Kannan On 12/20/06, Alexander Zatko <[hidden email]> wrote: You are almost there. Try: -- Regards, Kannan Ekanath -- 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 |
Kannan,
I do not think the @selection="open" will work in OPS. If you remove it you will see that you can make the select control read-only. As for controlling width of the select control I have always use CSS to do that - see attached (I added xhtml namespace declaration too). A. On Dec 20, 2006, at 10:01 AM, [hidden email] wrote: Hi Alexandar, -- 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 SelectControl.xhtml (1K) Download Attachment |
Alexandar,
2) I am ok with your suggestion about setting xhtml:class attribute 1) I wouldnt be able to employ the suggestion here *because* the list of options are generally huge and I do not keep the full list in xml. Only when a value is changed, I sort of make a http request, replace the options instance with what typically comes from a database. Hence selection="open", am afraid could not be removed. Having said that, let me know if this feature is planned sometime in Orbeon? Regards, Kannan On 12/20/06, Alexander Zatko <[hidden email]> wrote:
-- Regards, Kannan Ekanath -- 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 |
Forgot to add one more thing. Given my constraints like I should load the instance only when user enters atleast the first letter of city (since my list of cities is large) and I should make it readonly based on some constraints, Can you advice, Is there any other *alternative* which I should look at?
On 12/20/06, [hidden email] <[hidden email]> wrote: [Replies chopped]Alexandar, -- 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 was wrong about selection="open"
The "Google Suggests" is an example how to use it. DId you take a look at that? A. On Dec 20, 2006, at 2:35 PM, [hidden email] wrote: Forgot to add one more thing. Given my constraints like I should load the instance only when user enters atleast the first letter of city (since my list of cities is large) and I should make it readonly based on some constraints, Can you advice, Is there any other *alternative* which I should look at? -- 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 Kannan Ekanath
Hi Kannan,
Is the issue that you can't set an auto-complete field to be read-only with a <xforms:bind nodeset="..." readonly="true()"/>? Alex On 12/20/06, [hidden email] <[hidden email]> wrote: > Forgot to add one more thing. Given my constraints like I should load the > instance only when user enters atleast the first letter of city (since my > list of cities is large) and I should make it readonly based on some > constraints, Can you advice, Is there any other *alternative* which I should > look at? > > On 12/20/06, [hidden email] <[hidden email] > wrote: > > Alexandar, > > 2) I am ok with your suggestion about setting xhtml:class attribute > > 1) I wouldnt be able to employ the suggestion here *because* the list of > options are generally huge and I do not keep the full list in xml. Only when > a value is changed, I sort of make a http request, replace the options > instance with what typically comes from a database. Hence selection="open", > am afraid could not be removed. > > > > Having said that, let me know if this feature is planned sometime in > Orbeon? > > > > Regards, > > Kannan > > > [Replies chopped] > > > -- > 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 > > > -- 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 |
Correct !!! I have a set of items(modelled using a xf:repeat) and the item number is a auto-complete field (whose instance xml is not statically present in the xml when the page is rendered, but queried when some value is changed). I want to set the readonly attribute based on some condition. If there are 5 rows in the table then it is possible that 2 rows can be set to readonly, where as for other 3 rows I would want autocomplete to happen :) PS: I intend to substitute readonly="true()" with readonly="instance('items')/item/itemRejected = 'true' then true() else false()", which is based on a condition in the model. Hi Kannan, -- 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 Alexander Žaťko
Alexandar,
Not sure If I had put the message clear. I have seen the Google suggest, and I have a working auto-complete field in my application. Only problem is in making that field selectively readonly based on some conditions in the model. I have a set of items(modelled using a xf:repeat) and the item number is a auto-complete field (whose instance xml is not statically present in the xml when the page is rendered, but queried when some value is changed). I want to set the readonly attribute based on some condition. If there are 5 rows in the table then it is possible that 2 rows can be set to readonly, where as for other 3 rows I would want autocomplete to happen :) PS: I intend to substitute readonly="true()" with readonly="instance('items')/item/itemRejected = 'true' then true() else false()", which is based on a condition in the model. On 12/20/06, Alexander Zatko <[hidden email]> wrote:
-- 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
|
On 12/20/06, [hidden email] <[hidden email]> wrote:
> Alexandar, > Not sure If I had put the message clear. > > I have seen the Google suggest, and I have a working auto-complete field in > my application. Only problem is in making that field selectively readonly > based on some conditions in the model. Understood. I created a bug for this; you can track it at: http://forge.objectweb.org/tracker/index.php?func=detail&aid=306529&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 |
Administrator
|
On 12/21/06, Alessandro Vernet <[hidden email]> wrote:
> Understood. I created a bug for this; you can track it at: > > http://forge.objectweb.org/tracker/index.php?func=detail&aid=306529&group_id=168&atid=350207 Kannan, This one is fixed now. You'll let us know if this works for you. 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 |
Alessandro,
Apologies If I am not doing the right thing 1) Do you want me to try it in the sandbox at this link? http://www.orbeon.com/ops/goto-example/xforms-sandbox I tried it with the file that I have attached. The issue is not fixed there 2) Or You want me to try the nightly build at http://forge.objectweb.org/project/showfiles.php?group_id=168 I have started the download of the 3.5M1 release. Let me know if that is the release you want me to try against. -- 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 |
Forgot to attach the file I tried in the sandbox
On 12/22/06, [hidden email] <[hidden email]> wrote: Alessandro, -- Regards, Kannan Ekanath -- 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 SelectControl.xhtml (2K) Download Attachment |
Alessandro,
I guess you are asking to me run it against the nightly build found at http://forge.objectweb.org/nightlybuilds/ops/ops/ I downloaded the war, tried my xhtml and it seems to work fine. I also did some conditional readonly stuff as follows, <xforms:bind nodeset="instance('main')/address/city" readonly="if(../readonly = 'true') then true() else false()"> </xforms:bind> Even that seems to work fine. Thanks a lot!!!! Kannan On 12/22/06, [hidden email] <[hidden email]> wrote: Forgot to attach the file I tried in the sandbox -- Regards, Kannan Ekanath -- 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
|
Kannan,
On 12/21/06, [hidden email] <[hidden email]> wrote: > I guess you are asking to me run it against the nightly build found at > http://forge.objectweb.org/nightlybuilds/ops/ops/ Yes, sorry, I forgot to mention when you could get that build. > I downloaded the war, tried my xhtml and it seems to work fine. > > I also did some conditional readonly stuff as follows, > <xforms:bind nodeset="instance('main')/address/city" > readonly="if(../readonly = 'true') then true() else false()"> > </xforms:bind> > > Even that seems to work fine. > > Thanks a lot!!!! 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 |
Free forum by Nabble | Edit this page |