I’m sure there’s an easy answer to this question, but I haven’t been able to figure this out. Although I’ve been using JSP for years, I never had the opportunity/need to develop any tags. I am now beginning the (somewhat painful) process of coming up to speed on JSF, at the same time that I am learning MyEclipse. As such, I’m not sure if my problem is related to tags in general, the Tomcat 5 servlet container I’m using, Eclipse, MyEclipse, JSF… etc.
I have a tag, let’s call it “MyTag”, that maps to a particular subclass of javax.faces.component.UIComponent. I have a JSF template, testing.jsp, that has this snippet in it:
<w:MyTag maxlength=”33″/>
When I start up the server and access testing.faces, the component renders properly, including maxlength being set to 33. However, if I then change maxlength’s value to something other than 33, the change is NOT reflected unless I bounce the app server!
Additional debugging / logging shows that the new value of maxlength is read into the tag every time (the setter is called), but the setProperties(UIComponent component) method is only called the first time the page is accessed – hence, the component never gets the new value!
I can only assume that there is a way to resolve this issue, but I don’t know where the problem really lies. Do I have to configure the tag or component in a special way to make it realize it needs to update? Do I need to modify web.xml to pass some special “non-production” flag to FacesServlet so it realizes the value needs to change?
Or, perhaps even more likely, am I misunderstanding something so fundamental that the individuals who have read this far are not sure if they want to laugh or cry? 😉
Thanks for any help!!!