Hi,
I'm having trouble understanding why it is that when I set the 'oxf.xforms.cache.document' property to false in my local properties file, dynamic labels for buttons and fieldsets no longer seem to update correctly. I am using the following xform to test this: <xhtml:html xmlns:xf="http://www.w3.org/2002/xforms" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:fr="http://orbeon.org/oxf/xml/form-runner" xmlns:ev="http://www.w3.org/2001/xml-events" xmlns:xxf="http://orbeon.org/oxf/xml/xforms"> <xhtml:head> <xhtml:title>Dynamic label</xhtml:title> <xf:model id="m-default"> <xf:instance id="i-default"> <default xmlns=""> <in /> </default> </xf:instance> <xxf:var name="input" value="instance('i-default')/in" /> </xf:model> </xhtml:head> <xhtml:body> <xhtml:h1>Dynamic label</xhtml:h1> <xf:group ref="instance('i-default')" appearance="xxf:fieldset"> <xf:label> <xf:output value="count(instance('i-default')[in != ''])" /> </xf:label> <xf:input ref="$input" incremental="true"> <xf:label> <xf:output value="'Input: '" /> </xf:label> </xf:input> <xhtml:div> <xf:group ref=".[$input != '']"> <xf:trigger> <xf:label> <xf:output value="$input" /> </xf:label> </xf:trigger> </xf:group> </xhtml:div> </xf:group> </xhtml:body> When the property is set to true and I type something in the input field, the label of the fieldset will update to 1 and the button will appear with a label containing the same text as the input field. When the property is set to false the button will appear when I type something the first time, but the fieldset label will not update to 1 and any subsequent entries will not change the label on the button anymore. Tested this with Orbeon 4.4.1.201408251033 PE and 4.6.0.201406210117-CE. |
Administrator
|
Hi Toon,
The discrepancy looks like a bug. For now I've created an issue for this (link below); we'll look investigate this further, and post an update here when we get a chance. But if I may ask, why would you like to disable this cache? https://github.com/orbeon/orbeon-forms/issues/1880 Alex
--
Follow Orbeon on Twitter: @orbeon Follow me on Twitter: @avernet |
Administrator
|
Hi Toon,
We're particularly interested in knowing why you wanted to disable the document cache, as we were thinking of just removing that option (deprecating or completely removing the property). We initially put that option thinking that it could be useful for debugging, we I don't remember ever having used it, and we don't see a reason to expose this to users of the product. But maybe you encountered another issue when the document cache was enabled? You'll let us know! Alex
--
Follow Orbeon on Twitter: @orbeon Follow me on Twitter: @avernet |
Alessandro,
Thank you for confirming this is a bug. I actually submitted this question on behalf of someone in our services department who is currently on leave and hasn't been able to reply to my email yet. I too was wondering why he would use this option. I'll be sure to let you know here when he gets back, which should be next week. Toon |
Administrator
|
Hi Toon,
Got it, and thanks for the update. Alex
--
Follow Orbeon on Twitter: @orbeon Follow me on Twitter: @avernet |
Hi Alex,
Apparently the reason why he was using the caching property was because he was testing with some property values in properties-local.xml and those settings are cached when the property is set to true but he wanted to see the results immediately without restarting his container. He was never planning to use this for production, but I can see how turning the caching off could be useful in that scenario. Hope that helps. Toon |
Administrator
|
Toon,
Thanks for the details. It is still something we should look into. We have already recently, for 4.6.3 and 4.7, fixed a few issues related to serialization and deserialization of form state. -Erik |
Free forum by Nabble | Edit this page |