Hello, I have a primefaces form containing several panels. More specifically (if it helps), in the form there are several panelGrid panels, with several panelGroup sub-panels in each panelGrid. Inside those panelGroup sub-panels are different fields (i.e. inputText, selectOneMenu, etc...). A user can make a change to any one of those fields in the sub-panel, but not necessarily the first field in the sub-panel. So, I need to "listen" for changes on any one of those fields, to determine if that particular sub-panel has activity going on.
Currently, I have a listener only on the first field (presuming that users will enter a value starting with that field, in most instances). But I'd like to be able to have it so a change event is fired should the user change any of the other fields first. What I am trying to say in a round-about way is that I have no control over which field the user changes first, but there is validation that happens when changes are made. The current method of having a listener on the first field appears to work, but as described, there is no guarantee that that will happen
every time.
My apologies for not including code...here is the basic structure of the form:
My question: Is it risky (or does it even make sense) to have an ajax tag calling the same listener bean, inserted on every field within the sub-panel? I am going to do more searching on this, but thought I would also throw this out there, to get a perspective from others.
I should also note I am fairly new to how the ajax event process works (an on-going learning experience currently). I am consulting some online resources on ajax, but I know this website is an excellent (and trusted) resource.
I am using Eclipse and Primefaces 5.0, with JDK 1.7, running on a
JBoss EAP 6.2 server.
Any information would be greatly appreciated.