• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Passing parameters via JSF

Ryland

Platinum Member
This should be simple. I have a h:inputText entry box which I want to be able to pass its value back to my java code when someone presses a p:commandButton but I cant figure out how to do this. f:Attributes either pass the text entered into their value portion OR I get back null.

Code:
	  		<h:outputLabel for="name2" value="Name:"/>
		     	<p:inputText id="name2" name="name2" required="true"/>

		  	<p:commandButton value="Submit" actionListener="#{configBean.addNewConfigProperty}" onclick="addRowDialog.hide()" update="config">		  		
		  		<f:attribute name="name1" value="#{name2}"/>
		  	</p:commandButton>
 
Back
Top