myBean
находится в request
scope.h: inputText не работает с a4j: commandLink
<h:form id="indexFormID">
<a4j:outputPanel ajaxRendered="true" layout="block">
<h:inputText id="inputForHD" value="#{myBean.inputParam}"></h:inputText>
<a4j:commandLink value="Submit" action="#{myBean.myMethod}" reRender="renderSuccess" process="indexFormID:inputForHD"></a4j:commandLink>
</a4j:outputPanel>
<h:panelGroup id="renderSuccess">
<h:panelGroup rendered="#{myBean.someBoolean}">
//Some other JSF components go here
</h:panelGroup>
</h:panelGroup>
</h:form>
MyBean
определение класса:
private String inputParam;
//Getters and setters are there
public String myMethod()
{
log.debug("~ Value of inputParam" +this.getInputParam()); //This is printing null value for inputParam
//when commandLink is clicked
return null;
}
Почему мой inputParam
не получает набор с входными параметрами?
Является ли вызов метода mymethod или нет? –
Что вы обрабатываете в методах getter/setter? –
@ HimanshuBhardwaj 'myMethod' получает вызов. В этом нет никаких проблем. В комментарии я написал, что я получаю значение 'null' для' initParam' внутри 'myMethod' –