You have a few choices, you could write your own theme, but that would be overkill for what you are trying to do... Although, I have found that when people are using the simple theme, there is a good chance that they are hand-rolling a theme outside of struts, which is okay, but creating a theme is pretty easy and think of the work you'll save later!
Other than themes, the easiest way to get to where you want would be to simply write the Javascript yourself. Setting focus is a one-liner, and what s:head spits out isn't particularly complex... So, just take a look at the generated HTML and copy paste the pieces that you want. -Wes On Tue, Dec 29, 2009 at 9:34 AM, CRANFORD, CHRIS <chris.cranf...@setech.com> wrote: > It appears if I removed this line and additionally made sure that the > <s:head/> tag was inside my HTML <head>...</head> block that the > appropriate logic works and the StrutsUtil class is available and > focuses on my elements. > > Now is there a way to avoid this extra <td class='tdLabel'></td> from > being decorated on my input fields? I suppose this is part of the > standard theme and sometimes the labels for my fields have to be > positioned in certain ways, not sure I want to use this particular > theme, ugh. > > > > -----Original Message----- > From: CRANFORD, CHRIS [mailto:chris.cranf...@setech.com] > Sent: Tuesday, December 29, 2009 8:15 AM > To: Struts Users Mailing List > Subject: RE: focusElement in s:form > > I do have in my struts.xml file the following defined: > > <constant name="struts.ui.theme" value="simple"/> > > Does this affect this? > > -----Original Message----- > From: Dale Newfield [mailto:d...@newfield.org] > Sent: Monday, December 28, 2009 4:56 PM > To: Struts Users Mailing List > Subject: Re: focusElement in s:form > > CRANFORD, CHRIS wrote: >> I don't see any Javascript code in the Source file in the browser at >> all. That's what is not making any sense to me for the form tag. It > is >> as if the focusElement doesn't cause the <s:form> tag to do anything > at >> all. >> >> I would expect to see some <script> .... </script> stuff in the source >> file that is rendered, correct? > > Yes. Are you using a specific theme for your s: tags? > > -Dale > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org > > -- Wes Wannemacher Head Engineer, WanTii, Inc. Need Training? Struts, Spring, Maven, Tomcat... Ask me for a quote! --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org