David,

Give this a spin. 

<xforms:bind nodeset="/form/doc/people/person/job"
readonly="not(../name/text() = '')"/>

Just a guess.


-Matt

Matt Allen
Client Services Director - 0413 777 771
River Dynamics
Winner, Outstanding Australian Product Innovation
            - 2004 iAwards
Winner, Innovation In Claims Management 
            - 2003 Australasian Claims Expo  
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of David Sinclair
Sent: Friday, November 12, 2004 3:44 AM
To: [EMAIL PROTECTED]
Subject: [orbeon-user] model item properties question

Hi,

I have a question about model item properties (or maybe its more of an 
xpath question).  Given an instance with the following structure:
<form>
    <doc>
          <people
                <person>
                      <name>Dave</name>
                      <job>hacker</job>          
                </person>
                <person>
                      <name></name>
                      <job></job>          
                </person>
                <person>
                      <name>George</name>
                       <job>president</job>
          </people>
    </doc>
</form>
  
I want to write a model item property that says a persons job is 
readonly if their name has been filled in (I know its a dumb example, 
but I want to keep it simple).  So in my example,  only the second job 
would be editable. Basically, I want the xpath in the model item 
property to depend on another field in that row....

My first try was something like:
<xforms:bind nodeset="/form/doc/people/person/job" 
readonly="not(/form/doc/people/person/name)"/>
But I think this is actually saying that the whole job column will be 
readonly if the name are all empty!   Is it possible to express this as 
a model item property? If not then I can work round it in the view, but 
I would rather not.

David Sinclair.


-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE
LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click
_______________________________________________
orbeon-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/orbeon-user





-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE
LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click
_______________________________________________
orbeon-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/orbeon-user

Reply via email to