Skip, There is a pretty good tutorial out there to create a component using the struts tags - this is what I did for exactly what you are doing. Granted it is not as "pretty" as <s:text ...>stuff here</s:text> but it does the job and now that I have it written I can use it in all the places I need to. Check out http://www.vitarara.org/cms/node/86 for the example. Al
________________________________ From: Skip Hollowell [mailto:[EMAIL PROTECTED] Sent: Wed 4/11/2007 9:10 AM To: user@struts.apache.org Subject: Re: [S2] Adding Calendar function to a form. The more I look at and play with this scenario, the more I am starting to thing that using the default XHTML theme is not the way to go. I would be much better served, I think to use the simple theme, giving me much more control over layout and additional tags around my form fields. Is that a proper assumption, and a more 'struts2-ish' way of approaching things? Thanks, Skip Skip Hollowell wrote: > Trying again, due to bad formatting on Nabble... > I saw cilquirms reply, but I don't think I phrased my problems > correctly. I understand that the tag libraries are very accomodating, > but I am at a loss as to how to insert this code. This little calendar > image and the associated href for clickability would need to go > somewhere inside the generated code that the tag outputs. Is that even > possible? I want to have the little calendar icon be next to the field > input, so user's can use it instead of typing in a date by hand. > > Hopefully that is a bit more clear on my issues. > > Any ideas? > > ------------------------------------------------------- > > I tried the s:datetimepicker to work on things, but since I am not using > AJAX, I believe that is a dead end, no? There'd be no point in bringing > in the ajax theme if I wasn't using AJAX. > > So how do I incorporate a standard js calendar routine into a field on > my form? > > What I want to add is this calendar clickable icon that brings up a date > picker: > <pre> > <a href="javascript:NewCal('demo1','ddmmmyyyy',true,24)"><img > src="images/cal.gif" width="16" height="16" border="0" alt="Pick a > date"></a> > </pre> > > Where I want to add it is next to my input box on my form for the > datePaid field: > <s:textfield key="p.datePaid" /> > > I am just missing the concept here on how to plug custom code into the > s: tags. I am trying very hard not to hack this thing to bits with > tricks and cheats. > > Skip Hollowell > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > <http://www.nabble.com/user/SendEmail.jtp?type=post&post=9938513&i=0> > For additional commands, e-mail: [EMAIL PROTECTED] > <http://www.nabble.com/user/SendEmail.jtp?type=post&post=9938513&i=1> > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]