0

<f:setPropertyActionListener> does not call the setter method of target object when I have the <h:inputText> in the JSF page but it triggered properly when I interchange h:inputText with <h:outputText> and the values are loading properly. I am amused with the behavior of <h:inputText>. Here is the code

index.xhtml

<p:row>
    <p:column><p:outputLabel value="ID"/></p:column>
    <p:column ><h:inputText  value="#{bean.obj.innerObj.id}"/></p:column>
</p:row>

<p:commandButton update=":form:detail" 
                 oncomplete="PF('dialog').show()"
                 icon="ui-icon-search"
                 title="View">

    <f:setPropertyActionListener value="#{detail}"
                                 target="#{bean.obj}" />
</p:commandButton>

Bean.java

public Obj getObj() {
    return obj;
}

public void setObj(Obj pObj) {
   this.obj = pObj;
}

I don't believe there is an issue with Bean.java as the setter method was called when I have <h:outputText> in index.xhtml.

Vega
  • 474
  • 2
  • 5
  • 16
  • Are there getters and setters for `#{itemsBean.selectedItemDetail}`? – DavidS Mar 31 '15 at 20:53
  • possible duplicate of [commandLink/commandButton/ajax backing bean action/listener method not invoked](http://stackoverflow.com/questions/2118656/commandlink-commandbutton-ajax-backing-bean-action-listener-method-not-invoked) – Kukeltje Mar 31 '15 at 23:12
  • Yes, that's a problem in my edit, actually the selectedItemDetail is represented as obj – Vega Apr 01 '15 at 02:20
  • What is `detail` supposed to be? – kolossus Apr 20 '15 at 23:19

0 Answers0