From: Daniel E. <dan...@un...> - 2012-03-01 07:31:33
|
Hi everyone, I'm working with a cutsom dojo-class used as a betterFORM-control. The javascript-objects need to have some information that can defined in the xfomrs code. I did this by adding some custom attributes to the xform-controls like the services attribute in this example <xf:textarea appereance="custom" ref="."services="{$services}" /> By adding <xsl:if test="@appereance = 'custom'"> <xsl:attribute name="services"><xsl:value-of select="@services"/></xsl:attribute> </xsl:if> in the dojo.xsl in the buildControl-template and else if(appereance && appereance.toLowerCase() == "custom") { return new my.customTextarea({ name:controlId + "-value", services:dojo.attr(sourceNode,"services"), "class":classValue, title:dojo.attr(sourceNode,"title"), xfControlId:controlId }, sourceNode); } in the UIElementFactoryImpl. In this way the information is available in the constructor of the dojo-class. My problem is, that this doesn't work when inserting a node into a repeat structure bound to a custom textarea. In this case, the attribute is null. I couldn't find out why and how to fix this. Any advice how to solve this? Or is there a better approach to get information from the xform markup to the dojo-class? Cheers Daniel -- Daniel Ebner Dipl.-Medienwissenschaftler, Wiss. Mitarbeiter Historisch-Kulturwissenschaftliche Informationsverarbeitung University at Cologne Albertus-Magnus-Platz D 50923 Cologne dan...@un... Tel.: +49 - 221 - 470 7736 Fax: +49 - 221 - 470 7737 www.hki.uni-koeln.de |