1

I have this jsf page with primefaces 3.5. Controller and converter are @Component from spring version 3.0.5.RELEASE.

<h:form>
     <h:panelGrid columns="2" id="grid">
       <h:outputText value="Field names: "/>
          <p:selectOneMenu value="#{controller.something}"
                                                 converter="#{SomethingConverter}">
             <f:selectItems value="#{controller.listOfsomething}"/>
          </p:selectOneMenu>
          <h:outputLabel value="Value : *" for="inputField" />
          <p:inputText id="inputField" required="true"
                          value="#{documentController.documentValue.value}"/>
          <p:commandButton value="Add" action="#{controller.add}" />
     </h:panelGrid>
</h:form>

Class controller have this method:

public String add() {
   //do something
   return null;
}

Which is called only if I remove selectOneMenu component. Values in selectOneMenu are converter successful.

I have no idea now..

BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555
Smolda
  • 882
  • 5
  • 13
  • 34
  • 2
    Your form looks OK. You should provide your entire bean's code (relevant code, not all) to make it testable. Try to minimize the problem and make it as simple as you can. Check if it works without the `@Component` annotation. – Aritz Sep 01 '13 at 20:52
  • I believe the convertion phase fails (from the JSF lifecycle) and that's why the action method is never reached. – Konstantin Yovkov Sep 02 '13 at 09:48

0 Answers0