In writing a taglib for my calendar popup, I've come across two questions: 1) I need to write javascript which references the generated <input> tag. To do this, I need to know the name of the form that it is contained in to get a javascript reference to it. If no form name is found, I'll default to form [0]. This isn't working:
protected String getFormName() { // Acquire the form tag we are associated with FormTag formTag = (FormTag)pageContext.getAttribute(Constants.FORM_KEY); if (formTag==null) { return "0"; } else { return "'"+formTag.getName()+"'"; } } I took this from the <html:option> tag as an example. Is this not possible for the form tag? 2) I have a .properties file for my taglib which defines standard text and default options. It would be great if a user could over-ride those settings with messages in their own application-specific MessageResources. Is there a generalized way, in my taglib code, to get a reference to the application's message resources so I can search for keys that over-ride my defaults? The other option I thought of is that the developer can extend my taglib with their own and point to their own MessageResources file, but this isn't as slick. Any other options? PS: Just have to clear up these two things and write more examples and it'll be ready for testing... Thanks! Matt Kruse