The JS files weren't the problem since I could get it to work with real buttons like what Equinox uses.
The problem was not understanding the button id name convention. When I added the jsp name to the button id followed by a '.' like what Matt has in the example person. it started working. Still not sure why that is required to identify the button but it works. Ron ----- Original Message ---- From: mettamara <[EMAIL PROTECTED]> To: users@appfuse.dev.java.net Sent: Saturday, February 16, 2008 11:57:19 AM Subject: Re: [appfuse-user] Struts2 and jsCalendar I would also make sure that the JS files are getting loaded properly by your browser. I had an odd issue with the local not matching up with the expected JS file (en vs en_US). Also what Struts 2 style are you using (simple,xhtml, etc). I noticed that the element where the calendar is attached to changes based on that. Good luck. Ron Anderson-2 wrote: > > I changed to the setup in the equinox user form and it works so it isn't > related to jsCalendar or the import statements. > > Has to be something with the title="date" and its relationship to the > button id. > > I'll use this set up for now. > > Ron > > ----- Original Message ---- > From: Matt Raible <[EMAIL PROTECTED]> > To: users@appfuse.dev.java.net > Sent: Tuesday, February 12, 2008 8:12:54 PM > Subject: Re: [appfuse-user] Struts2 and jsCalendar > > Do you see any sort of JavaScript error in your console (on Firefox)? > > Matt > > On 2/12/08, Ron Anderson <[EMAIL PROTECTED]> wrote: >> >> I'm using the instructions from Matt on adding jsCalendar to Appfuse 2.0 >> / >> Struts 2 and it isn't working. The instructions are below. >> >> I understand how the id is determined for the inputField but where does >> the >> button id come from? It must have something to do with the textfield >> title="date" and I see an img tag that gets created with what I put in >> for >> my button: in the Calendar.setup but nothing happens when you click on >> it. >> >> Any ideas? Is there anything else I might be missing? >> >> 1. Add title="date" to an <s:textfield> - for example: >> >> <s:textfield key="person.modificationDate" required="true" >> cssClass="text" >> size="11" title="date"/> >> >> 2. Add the calendar scripts to your page: >> >> <script type="text/javascript" src="<c:url >> value='/scripts/calendar/calendar.js'/>"></script> >> <script type="text/javascript" src="<c:url >> value='/scripts/calendar/calendar-setup.js'/>"></script> >> <script type="text/javascript" src="<c:url >> value='/scripts/calendar/lang/calendar-${pageContext.request.locale}.js'/>"></script> >> >> 3. Call Calendar.setup() from JavaScript: >> >> <script type="text/javascript"> >> Calendar.setup({inputField: >> "personForm_person_modificationDate", ifFormat: "%m/%d/%Y", >> button: "person.modificationDateDatePicker"}); >> </script> >> >> thanks, >> >> Ron >> > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > -- View this message in context: http://www.nabble.com/Struts2-and-jsCalendar-tp15448969s2369p15518650.html Sent from the AppFuse - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]