Hi Erik,
I worked with the xxforms:readonly-appearance="static", when I encountered a possible bug. I am attaching a sample test-case. In the attached sample, in case 1, the @readonly in bind is initially set to true. Now when I change @readonly to false an error occur. In case 2, the @readonly in bind is initially set to false. when I change @readonly to true the readonly-appearance is what that is expected xxforms:readonly-appearance="dynamic" Please correct me if I am not using this feature in the expected manner. Thanks Joseph Lawrence Stabilix Solutions
Don't get soaked. Take a quick peak at the forecast with theYahoo! Search weather shortcut. <!-- ============================================================================= Copyright (c) 2005, 2006 STABILIX CORPORATION All Rights Reserved. THIS SOFTWARE IS THE CONFIDENTIAL AND PROPRIETARY INFORMATION OF STABLIX. YOU SHALL NOT DISCLOSE SUCH CONFIDENTIAL INFORMATION AND SHALL USE IT ONLY IN ACCORDANCE WITH THE TERMS OF THE LICENSE AGREEMENT YOU ENTERED INTO WITH STABILIX CORPORATION. STABILIX MAKES NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY OF THE SOFTWARE, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT. STABILIX CORPORATION SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. @version 1.0 @author Joseph Lawrence ============================================================================= --> <xhtml:html xsl:version="2.0" xmlns:xforms="http://www.w3.org/2002/xforms" xmlns:f="http://orbeon.org/oxf/xml/formatting" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:xxforms="http://orbeon.org/oxf/xml/xforms" xmlns:xi="http://www.w3.org/2003/XInclude" xmlns:widget="http://orbeon.org/oxf/xml/widget" xmlns:ev="http://www.w3.org/2001/xml-events" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ui="http:/www.example.org/ui" xmlns:exforms="http://www.exforms.org/exf/1-0" xxforms:state-handling="session"> <xhtml:head> <xhtml:title>Readonly Appearance</xhtml:title> <xforms:model xxforms:readonly-appearance="static"> <xforms:instance id="main-instance"> <main-instance> <name>Joseph Lawrence</name> <age>25</age> <gender>m</gender> <marital-status>m</marital-status> <has-children>yes</has-children> <save/> </main-instance> </xforms:instance> <xforms:instance id="instance"> <instance> <name>Joseph Lawrence</name> <age>25</age> <gender>m</gender> <marital-status>m</marital-status> <has-children>yes</has-children> <save/> </instance> </xforms:instance> <xforms:instance id="mode"> <mode> <edit>true</edit> <editable>false</editable> <options> <label>True</label> <value>true</value> </options> <options> <label>False</label> <value>false</value> </options> </mode> </xforms:instance> <xforms:bind nodeset="instance('main-instance')" readonly="instance('mode')/editable!='true'"/> <xforms:bind nodeset="instance('instance')" readonly="instance('mode')/edit!='true'"/> </xforms:model> <xhtml:style type="text/css"> .mt .tab-title { font-family: Verdana, Arial, Helvetica, sans-serif; font-weight: bolder; text-align: center; vertical-align: middle; background-color:brown; color:white; font-size:14px; height:25px; padding-left:10px; padding-right:10px; } .mt .tab-rt { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 11px; font-weight: normal; color: #0c68a2; background-color: #e9eff5; text-align: center; vertical-align: middle; padding-left: 10px; } .mt .tab-lt { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; font-weight: bolder; color: #42678d; background-color: #e9eff5; text-align: right; vertical-align: middle; padding-right: 10px; } </xhtml:style> </xhtml:head> <xhtml:body> <div align="center"> <b> <xhtml:font size="5" face="Comic Sans MS"> Possible Readonly Appearance Bug </xhtml:font> </b> </div> <br/><br/> <xhtml:center> <xhtml:h2>Case 1:</xhtml:h2> <xforms:group ref="instance('main-instance')"> <xhtml:table class="mt" style="width:600px;"> <xhtml:tr> <xhtml:td class="tab-title" colspan="2"> Select the 'mode'   Editable : <xforms:select1 ref="instance('mode')/editable" appearance="minimal"> <xforms:itemset nodeset="instance('mode')/options"> <xforms:label ref="label"></xforms:label> <xforms:value ref="value"></xforms:value> </xforms:itemset> </xforms:select1> </xhtml:td> </xhtml:tr> <xhtml:tr> <xhtml:td class="tab-lt">Name : </xhtml:td> <xhtml:td class="tab-rt"> <xforms:input ref="name"/> </xhtml:td> </xhtml:tr> <xhtml:tr> <xhtml:td class="tab-lt">Age :</xhtml:td> <xhtml:td class="tab-rt"> <xforms:input ref="age"/> </xhtml:td> </xhtml:tr> <xhtml:tr> <xhtml:td class="tab-lt">Gender :</xhtml:td> <xhtml:td class="tab-rt"> <xforms:select1 ref="gender" appearance="full"> <xforms:item> <xforms:label>Male</xforms:label> <xforms:value>m</xforms:value> </xforms:item> <xforms:item> <xforms:label>Female</xforms:label> <xforms:value>f</xforms:value> </xforms:item> </xforms:select1> </xhtml:td> </xhtml:tr> <xhtml:tr> <xhtml:td class="tab-lt">Marital Status :</xhtml:td> <xhtml:td class="tab-rt"> <xforms:select1 ref="marital-status" appearance="minimal"> <xforms:item> <xforms:label>Select One</xforms:label> <xforms:value></xforms:value> </xforms:item> <xforms:item> <xforms:label>Single</xforms:label> <xforms:value>s</xforms:value> </xforms:item> <xforms:item> <xforms:label>Married</xforms:label> <xforms:value>m</xforms:value> </xforms:item> <xforms:item> <xforms:label>Divorced</xforms:label> <xforms:value>d</xforms:value> </xforms:item> </xforms:select1> </xhtml:td> </xhtml:tr> <xhtml:tr> <xhtml:td class="tab-lt">Has Children :</xhtml:td> <xhtml:td class="tab-rt"> <xforms:select1 ref="." appearance="full"> <xforms:item> <xforms:label>Yes</xforms:label> <xforms:value>yes</xforms:value> </xforms:item> <xforms:item> <xforms:label>No</xforms:label> <xforms:value>no</xforms:value> </xforms:item> </xforms:select1> </xhtml:td> </xhtml:tr> <xhtml:tr> <xhtml:td colspan="2" class="tab-rt"> <xforms:trigger ref="save"> <xforms:label>Save</xforms:label> <xforms:message level="modal" ev:event="DOMActivate">You have clicked the trigger control</xforms:message> </xforms:trigger> </xhtml:td> </xhtml:tr> </xhtml:table> </xforms:group> <xhtml:h2>Case 2:</xhtml:h2> <xforms:group ref="instance('instance')"> <xhtml:table class="mt" style="width:600px;"> <xhtml:tr> <xhtml:td class="tab-title" colspan="2"> Select the 'mode'   Editable : <xforms:select1 ref="instance('mode')/edit" appearance="minimal"> <xforms:itemset nodeset="instance('mode')/options"> <xforms:label ref="label"></xforms:label> <xforms:value ref="value"></xforms:value> </xforms:itemset> </xforms:select1> </xhtml:td> </xhtml:tr> <xhtml:tr> <xhtml:td class="tab-lt">Name : </xhtml:td> <xhtml:td class="tab-rt"> <xforms:input ref="name"/> </xhtml:td> </xhtml:tr> <xhtml:tr> <xhtml:td class="tab-lt">Age :</xhtml:td> <xhtml:td class="tab-rt"> <xforms:input ref="age"/> </xhtml:td> </xhtml:tr> <xhtml:tr> <xhtml:td class="tab-lt">Gender :</xhtml:td> <xhtml:td class="tab-rt"> <xforms:select1 ref="gender" appearance="full"> <xforms:item> <xforms:label>Male</xforms:label> <xforms:value>m</xforms:value> </xforms:item> <xforms:item> <xforms:label>Female</xforms:label> <xforms:value>f</xforms:value> </xforms:item> </xforms:select1> </xhtml:td> </xhtml:tr> <xhtml:tr> <xhtml:td class="tab-lt">Marital Status :</xhtml:td> <xhtml:td class="tab-rt"> <xforms:select1 ref="marital-status" appearance="minimal"> <xforms:item> <xforms:label>Select One</xforms:label> <xforms:value></xforms:value> </xforms:item> <xforms:item> <xforms:label>Single</xforms:label> <xforms:value>s</xforms:value> </xforms:item> <xforms:item> <xforms:label>Married</xforms:label> <xforms:value>m</xforms:value> </xforms:item> <xforms:item> <xforms:label>Divorced</xforms:label> <xforms:value>d</xforms:value> </xforms:item> </xforms:select1> </xhtml:td> </xhtml:tr> <xhtml:tr> <xhtml:td class="tab-lt">Has Children :</xhtml:td> <xhtml:td class="tab-rt"> <xforms:select1 ref="." appearance="full"> <xforms:item> <xforms:label>Yes</xforms:label> <xforms:value>yes</xforms:value> </xforms:item> <xforms:item> <xforms:label>No</xforms:label> <xforms:value>no</xforms:value> </xforms:item> </xforms:select1> </xhtml:td> </xhtml:tr> <xhtml:tr> <xhtml:td colspan="2" class="tab-rt"> <xforms:trigger ref="save"> <xforms:label>Save</xforms:label> <xforms:message level="modal" ev:event="DOMActivate">You have clicked the trigger control</xforms:message> </xforms:trigger> </xhtml:td> </xhtml:tr> </xhtml:table> </xforms:group> </xhtml:center> </xhtml:body> </xhtml:html> -- 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
|
Hi Joseph,
I was able to reproduce this and added a bug for this (see the link to the tracker below). Note that once controls are rendered with xxforms:readonly-appearance="static", they cannot be changed to not-readonly. So once the bug is fixed, you just won't get the error, but the controls on screen will stay the same. So you can avoid this by modifying your code so you readonly doesn't change for controls rendered with xxforms:readonly-appearance="static" http://forge.objectweb.org/tracker/index.php?func=detail&aid=306688&group_id=168&atid=350207 Alex On 2/20/07, Joseph Lawrence <[hidden email]> wrote: > Hi Erik, > I worked with the > xxforms:readonly-appearance="static", when I encountered a > possible bug. I am attaching a sample test-case. > In the attached sample, in case 1, the @readonly in bind is initially > set to true. Now when I change @readonly to false an error occur. > In case 2, the @readonly in bind is initially set to false. when I > change @readonly to true the readonly-appearance is what that is expected > xxforms:readonly-appearance="dynamic" > Please correct me if I am not using this feature in the expected > manner. > > Thanks > Joseph Lawrence > Stabilix Solutions > > > ________________________________ > Don't get soaked. Take a quick peak at the forecast > with theYahoo! Search weather shortcut. > > > > -- > 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 > > > -- Orbeon Forms - Web 2.0 Forms for the Enterprise 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 ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
Free forum by Nabble | Edit this page |