You may want to look at customizing the .ftl templates Struts uses for
its jsp tags. It is a good tool to have, since you can create your
own themes or components that generate the HTML and Javascript you
need. For example, I am currently hand entering the JSCalendar code
for each of my date fields since the dojo s:datepicker in Struts2 is a
mess IMO. I plan to write my own datepicker.ftl to generate the code
I have written.
-D
On Apr 9, 2008, at 1:19 AM, oscar perez wrote:
Hi,
How about client-side validation? I have the very same problem and
I've managed to solve it by using theme simple but then client-side
validation is gone. Anybody succeeded using side-by-side fields
without losing the client-side validation?
Thanks
Oscar
On Wed, Apr 9, 2008 at 10:27 AM, Rob Hills <[EMAIL PROTECTED]
> wrote:
Hi Richard,
Richard M wrote:
Bump. Does anybody have any insight/input at all?
Richard M wrote:
I have finally accepted the orientation towards left-aligned labels
over
form fields - and find I do like it can see its easier for a user to
take
in the form visually. Plus the style sheets allow the window to be
resized
without breaking visually. CSS and visual presentation is not my
forte,
but I'm trying to do this "right" and get better at it.
But occasionally there are times you need side-by-side fields - or the
form just gets too long. Appfuse does this in a few places - such as
First
and Last name on the userForm.jsp and signup.jsp pages.
BTW, I am using Appfuse 2.0.1 with Struts2 and Hibernate. It seems
to do
this by overriding the theme to "xhtml" from "css_xhtml". Then you put
your own list item tags around the two or three fields you want on the
same line. Like this:
<li>
<div>
<div class="left">
<s:textfield key="user.firstName" theme="xhtml"
required="true" cssClass="text medium"/>
</div>
<div>
<s:textfield key="user.lastName" theme="xhtml"
required="true" cssClass="text medium"/>
</div>
</div>
</li>
Sorry to come in so late on this one, but when I had to do this, I
put my own <li></li> around the fields I had to put side-by-side and
then set theme="simple" for each field inside it. I also had to
create one or two CSS classes to tidy up a couple of frayed edges
for some field types (eg cssClass="checkbox" is one I know I had to
do) but that wasn't too hard to do using Firebug to guide me.
HTH,
Rob Hills
Waikiki, Western Australia
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]