'PrimeFaces selector which includes inputs of components with hidden input fields

I would like to use PrimeFaces Selectors to process all input components in a certain group, which includes several p:rating fields.

I minimized my use case to, XHTML:

<h:form>
  <h:panelGroup styleClass="myGroup">
    <p:rating value="#{myBean.rating}"/>
    <p:commandButton value="Save"
                     process="@(.myGroup :input)"
                     action="#{myBean.save()}"/>
  </h:panelGroup>
</h:form>

Bean:

@Named
@ViewScoped
public class MyBean implements Serializable {

  private Integer rating; // Getter and setter are present

  public void save() {
    System.out.println("Rating: " + rating);
  }

}

With the above selector the rating is not processed. If I change the component to p:inputText, it is working. If I remove the process attribute, it is also working. I assume this has to do with the hidden input p:rating is using for its value.

My question: can you create a PrimeFaces selector which includes the inputs of components with hidden input fields?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source