Hi Marcio,
You are correct. Doing so will change the theme for the whole application.
There is another way to just change the theme for specific buttons. (Check a
previous reply to my question by Sharath)
eg:
<s:submit type="input" value="my button" name="submit" theme="simple"
></s:submit>
previous reply:
Hi Akash,
Put 'theme=simple' this will solve your problem.
--Sharath.
--- On Fri, 4/11/08, Márcio Gurgel <[EMAIL PROTECTED]> wrote:
> From: Márcio Gurgel <[EMAIL PROTECTED]>
> Subject: Re: Two buttons on same row
> To: "Struts Users Mailing List" <[email protected]>
> Date: Friday, April 11, 2008, 3:04 PM
> Hi Akash,
>
> I think that is not a good idea just change the theme..
> Doing that you're
> gona lose some functionality.. Like validation, etc..
> There's a way, overwriting the xhtml theme (I made this
> in a project, and
> it's working).
>
> Do the following steps:
>
> 1 - Unzip the struts 2 core jar;
> 2 - Copy template/xhtml and paste into your WebContent
> directory;
> 3 - Overwrite your "submit.ftl" with the code:
> <#--
> /*
> * $Id: Action.java 502296 2007-02-01 17:33:39Z niallp $
> *
> * Licensed to the Apache Software Foundation (ASF) under
> one
> * or more contributor license agreements. See the NOTICE
> file
> * distributed with this work for additional information
> * regarding copyright ownership. The ASF licenses this
> file
> * to you under the Apache License, Version 2.0 (the
> * "License"); you may not use this file except
> in compliance
> * with the License. You may obtain a copy of the License
> at
> *
> * http://www.apache.org/licenses/LICENSE-2.0
> *
> * Unless required by applicable law or agreed to in
> writing,
> * software distributed under the License is distributed on
> an
> * "AS IS" BASIS, WITHOUT WARRANTIES OR
> CONDITIONS OF ANY
> * KIND, either express or implied. See the License for
> the
> * specific language governing permissions and limitations
> * under the License.
> */
> -->
> <#t/>
> <#include
> "/${parameters.templateDir}/simple/submit.ftl"
> />
> <#t/>
>
> This also can help you:
> http://struts.apache.org/2.0.11.1/docs/template-loading.html
>
> You also, can make calls to diferent css classes for
> rendering labels, td's
> etc.
> Hope that help you!
>
>
>
>
> 2008/4/11, Michael Gagnon
> <[EMAIL PROTECTED]>:
> >
> > Edit your struts.xml to reflect the following:
> >
> > <?xml version="1.0"
> encoding="UTF-8" ?>
> > <!DOCTYPE struts PUBLIC
> > "-//Apache Software Foundation//DTD Struts
> Configuration 2.0//EN"
> >
> "http://struts.apache.org/dtds/struts-2.0.dtd">
> > <struts>
> > <constant name="struts.ui.theme"
> value="simple" />
> > ...
> > ...
> > </struts>
> >
> >
> >
> >
> > The behavior should be more as you expect after that.
> You will lose things
> > like the label property on textfields though. In that
> case you just type
> > it
> > outside like:
> > ...
> > <tr>
> > <td>User ID:</td>
> > <td><s:textfield
> name="account.login" /></td>
> > </tr>
> > ...
> >
> >
> > -----Original Message-----
> > From: akash agrawal [mailto:[EMAIL PROTECTED]
> > Sent: Friday, April 11, 2008 3:51 PM
> > To: [email protected]
> > Subject: Two buttons on same row
> >
> > Hi,
> >
> > s:submit creates a row for a button. I have two
> buttons and two submit
> > appears on two different row. How do I put them on the
> same row? Can
> > anyone
> > give an example?
> >
> > Thanks,
> >
> > -Akash
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Tired of spam? Yahoo! Mail has the best spam
> protection around
> > http://mail.yahoo.com
> >
> >
> ---------------------------------------------------------------------
> > 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]
> >
> >
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]