You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by CLEMENT Sébastien GC EUR <se...@globecast.com> on 2005/12/08 11:01:19 UTC

Question inputHidden

Hi,

My code is :

<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
<%@ taglib uri="http://myfaces.apache.org/extensions" prefix="t"%>

<f:loadBundle basename="mypackage.Resources" var="appBundle"/>

<h:form id="myForm">
<h:inputHidden id="confirm" value="#{appBundle.confirmMsg}" />
<h:panelGrid columns="1" width="100%">
	<h:panelGrid id="_16" columns="2" cellpadding="4">
		<h:panelGroup>
			<h:outputText value="#{appBundle.name}" styleClass="bold" />
		</h:panelGroup>
		<h:panelGroup>
			<h:inputText id="name" value="#{myBean.name}" size="50" required="true"
/>
			<h:outputText value="&nbsp;&nbsp;&nbsp;" escape="false" />
			<h:message styleClass="errMsg" for="name"/>
		</h:panelGroup>
	</h:panelGrid>
	<h:panelGrid columns="1" align="center">
		<t:commandButton action="#{myBean.createAction}"
value="#{appBundle.createButton}" />
	</h:panelGrid>
</h:panelGrid>
</h:form>

when I clicked on the create Button the action is not called.
If I modify <h:inputHidden id="confirm" value="#{appBundle.confirmMsg}" />
by <h:inputHidden id="confirm" value="TEST" /> the action is called.
I tried with immediate="true" in inputHidden tag but it's the same behavior.

Any ideas?

Thanks.

sebastien.


RE: Question inputHidden

Posted by CLEMENT Sébastien GC EUR <se...@globecast.com>.
OK Volker. Thanks a lot.

Regards.
Sebastien.

-----Message d'origine-----
De : Volker Weber [mailto:users.myfaces@weber-oldenburg.de]
Envoyé : jeudi 8 décembre 2005 15:45
À : MyFaces Discussion
Objet : Re: Question inputHidden


Hi,

just a guess:

the value attribute of the hidden is bound to a ResourceBundle.
It is not possible to set the value in updateModel phase, so it fails
and you skipping the aplication phase.

try to get the value via the myBean object.

Regards
  Volker

CLEMENT Sébastien GC EUR wrote:
> Hi,
>
> My code is :
>
> <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
> <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
> <%@ taglib uri="http://myfaces.apache.org/extensions" prefix="t"%>
>
> <f:loadBundle basename="mypackage.Resources" var="appBundle"/>
>
> <h:form id="myForm">
> <h:inputHidden id="confirm" value="#{appBundle.confirmMsg}" />
> <h:panelGrid columns="1" width="100%">
> 	<h:panelGrid id="_16" columns="2" cellpadding="4">
> 		<h:panelGroup>
> 			<h:outputText value="#{appBundle.name}" styleClass="bold" />
> 		</h:panelGroup>
> 		<h:panelGroup>
> 			<h:inputText id="name" value="#{myBean.name}" size="50" required="true"
> />
> 			<h:outputText value="&nbsp;&nbsp;&nbsp;" escape="false" />
> 			<h:message styleClass="errMsg" for="name"/>
> 		</h:panelGroup>
> 	</h:panelGrid>
> 	<h:panelGrid columns="1" align="center">
> 		<t:commandButton action="#{myBean.createAction}"
> value="#{appBundle.createButton}" />
> 	</h:panelGrid>
> </h:panelGrid>
> </h:form>
>
> when I clicked on the create Button the action is not called.
> If I modify <h:inputHidden id="confirm" value="#{appBundle.confirmMsg}" />
> by <h:inputHidden id="confirm" value="TEST" /> the action is called.
> I tried with immediate="true" in inputHidden tag but it's the same
behavior.
>
> Any ideas?
>
> Thanks.
>
> sebastien.
>

--
Don't answer to From: address!
Mail to this account are droped if not recieved via mailinglist.
To contact me direct create the mail address by
concatenating my forename to my senders domain.


Re: Question inputHidden

Posted by Volker Weber <us...@weber-oldenburg.de>.
Hi,

just a guess:

the value attribute of the hidden is bound to a ResourceBundle.
It is not possible to set the value in updateModel phase, so it fails
and you skipping the aplication phase.

try to get the value via the myBean object.

Regards
  Volker

CLEMENT Sébastien GC EUR wrote:
> Hi,
> 
> My code is :
> 
> <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
> <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
> <%@ taglib uri="http://myfaces.apache.org/extensions" prefix="t"%>
> 
> <f:loadBundle basename="mypackage.Resources" var="appBundle"/>
> 
> <h:form id="myForm">
> <h:inputHidden id="confirm" value="#{appBundle.confirmMsg}" />
> <h:panelGrid columns="1" width="100%">
> 	<h:panelGrid id="_16" columns="2" cellpadding="4">
> 		<h:panelGroup>
> 			<h:outputText value="#{appBundle.name}" styleClass="bold" />
> 		</h:panelGroup>
> 		<h:panelGroup>
> 			<h:inputText id="name" value="#{myBean.name}" size="50" required="true"
> />
> 			<h:outputText value="&nbsp;&nbsp;&nbsp;" escape="false" />
> 			<h:message styleClass="errMsg" for="name"/>
> 		</h:panelGroup>
> 	</h:panelGrid>
> 	<h:panelGrid columns="1" align="center">
> 		<t:commandButton action="#{myBean.createAction}"
> value="#{appBundle.createButton}" />
> 	</h:panelGrid>
> </h:panelGrid>
> </h:form>
> 
> when I clicked on the create Button the action is not called.
> If I modify <h:inputHidden id="confirm" value="#{appBundle.confirmMsg}" />
> by <h:inputHidden id="confirm" value="TEST" /> the action is called.
> I tried with immediate="true" in inputHidden tag but it's the same behavior.
> 
> Any ideas?
> 
> Thanks.
> 
> sebastien.
> 

-- 
Don't answer to From: address!
Mail to this account are droped if not recieved via mailinglist.
To contact me direct create the mail address by
concatenating my forename to my senders domain.