Re: [Xsltforms-support] Display two inputs for one field; one readonly the other editable
Brought to you by:
alain-couthures
From: Javier D. <jd...@ge...> - 2010-05-26 12:57:56
|
Mark van den Boomen escribió: > Given the following XML: > > <root> > <item> > <value>1</value> > </item> > <item> > <value>2</value> > </item> > <item> > <value>3</value> > </item> > </root> > > The items are displayed in a table using xforms:repeat containing the > editable inputs. Under the table is a xforms:input which should be > disabled. If an user sets focus to one of the editable inputs then the > input under the table should show the value of the selected input in > the table. > > The problem is when using a xforms:bind to set the value to readonly > it will set both inputs readonly. Is there a way to set the readonly > independent for the inputs? > Do you have the complete example? With inputs, binds, and so on. I think we did something similar, I'm not sure if may help you. <xf:bind nodeset="/ACT_INTERCONEXION_IP/TRAZADO/POLITICA_INTERCONEXION/INTERCONEXION[*]/pPAI_IP[*]/ID_PPAI_IP" relevant="true()" required="true()" readonly="not(compare(instance('estado')/ACCION,'BAJA'))" constraint="*count(../../pPAI_IP[ID_PPAI_IP = current()]) < 2*" type="xsd:string"/> We have a xforms with the following binding, and the constraint is activated only in these elements of the repeat where the xpath assertion is true. In our case, we get an error message when two elements of the repeat had the same value. I don't know if this is similar with focus event, I hope it may help you. Best Regards, Javier > Thanks, > > Mark > > ------------------------------------------------------------------------------ > > _______________________________________________ > Xsltforms-support mailing list > Xsl...@li... > https://lists.sourceforge.net/lists/listinfo/xsltforms-support > |