This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal



Nov 17, 2011, 5:13 PM
6 Posts
topic has been resolvedResolved

xp:inputHidden still not working in 8.5.3?

  • Category: Other
  • Platform: Not Applicable
  • Release: 8.5.3
  • Role: Developer
  • Tags: coreControl inputHiffen
  • Replies: 3
 Hi,
 
I am having problems with the core control inputHidden. For example:
 
This works:
    <xp:inputHidden id="inputHidden1" value="hallo"></xp:inputHidden>
 
This does not work:
<xp:inputHidden id="inputHidden1">
      <xp:this.value><![CDATA[#{javascript:"hallo"}]]></xp:this.value>
</xp:inputHidden>
it renders an empty <span ....></span>
 
I found one issue online:
<xp:inputhidden> field value is not available to the client when the document is in read-only mode
https://www-304.ibm.com/support/docview.wss?uid=swg21461609
 
Yes, my document is in read mode. But even in edit mode it is still an empty span tag.
 
Nov 18, 2011, 6:48 AM
129 Posts
Re: xp:inputHidden still not working in 8.5.3?
I think you would get the same result with a regular field. If the value is a scalar value (e.g. string, number) the result of a Javascript expression, there's no data context to work on.
 
This wil also "fail": 
<xp:inputHidden id="inputHidden1" value="#{javascript:'hallo'}" />  
 
 
Using ExpressionLanguage, you might get a rendered field, bit there's little to work with, as the field isn't bound to a data context. 
 
If you bind it to a scoped variable, or a document field, you will get an input[type=hidden]. 
 
E.g. 
 <xp:inputHidden id="inputHidden1" value="#{viewScope.hiddenField}" />   
 <xp:inputHidden id="inputHidden1" value="#{document.first_name}" />     
 

 
Nov 21, 2011, 3:18 PM
6 Posts
Re: xp:inputHidden still not working in 8.5.3?
Ups. Yes a regular field also renders to a <span>. But at least the tag contains the value: <span .....>hallo</span>. Still this doesn't help ;)
So the value property is in reality a value binding...
 
This helps a lot. Thanks
Nov 23, 2011, 9:02 PM
272 Posts
Re: xp:inputHidden still not working in 8.5.3?
Hi,
 
you can set the field value to compute on load.
F.e.
 
<xp:inputHidden id="inputHidden1"
   value="${javascript:@Text(@Now())}">
</xp:inputHidden>
 
Sven
 

This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal