xforms readonly = true or false evaluation possible at runtime

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

xforms readonly = true or false evaluation possible at runtime

ilango_g
Hi
I would like to know if I can use the xforms readonly attribute to evaluate to true or false based on the result of an expression that is evaluated at run time.
For instance I have the following situation:

<xforms:bind nodeset="FirstName" readonly="@readonly='true'"/>

Now instead of having ="@readonly='true' can I have an expression that returns true or false.

I have thought about the solution. It might look like this: readonly = if(expression(parameter1) returns true or false) and then the true is passed on the readonly on the LHS.

Could I do something like this?

thanks in advance for any suggestions.


Reply | Threaded
Open this post in threaded view
|

Re: xforms readonly = true or false evaluation possible at runtime

Erik Bruchez
Administrator
> I would like to know if I can use the xforms readonly attribute to  
> evaluate
> to true or false based on the result of an expression that is  
> evaluated at
> run time.

Yes.

> For instance I have the following situation:
>
> <xforms:bind nodeset="FirstName" readonly="@readonly='true'"/>

That should work as is.

> Now instead of having ="@readonly='true' can I have an expression that
> returns true or false.

@readonly='true' is a boolean XPath expression. That is, it returns an  
XPath boolean type. You don't have anything else to do :-)

That is, if you meant that you have this kind XML in your instance:

   <FirstName readonly="true">Joe</FirstName>

-Erik

--
Orbeon Forms - Web Forms for the Enterprise Done the Right Way
http://www.orbeon.com/



--
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