struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Narayana S" <narayanas...@gmail.com>
Subject Re: Struts Themes Problem - help
Date Fri, 27 Jun 2008 05:26:10 GMT
Hi Laurie,

     Thanks for your reply.

      i found a work around for this. if i am applying as below, my
application could read the values from resource bundle. :) this problem is
solved.

<s:form action="clientAction" theme="simple">
    <tr>
         <td><s:label value="%{getText('app.clientname')}" /></td>
         <td><s:textfield name="clientname" required="true" /></td>
    </tr>
        -----
 but here it introduced one more problem, with the xhtml theme we get the
field level validation error messages below the individual control, but the
simple theme is not giving any validation error messages. to get the errors
i used <s:fielderror /> ,it is giving all the field level errors at one
place.

is there any way i can get the filed level error messages as they come in
xhtml theme with simple theme ?





On Fri, Jun 27, 2008 at 12:06 AM, Laurie Harper <laurie@holoweb.net> wrote:

> To repeat my previous question:
>
> >> How is it failing? Note that the 'simple' theme generates a lot less
> >> markup, and doesn't generate everything the other themes do. Are I18N
> >> resources failing to get resolved, or is the theme just not generating
> the
> >> things you were expecting to see?
>
> With the simple theme, I would expect the s:label to work the same way, but
> the s:textfield to generate no label (because the simple theme doesn't do
> that). If that's what you're seeing, that's the correct behaviour. If you
> are seeing something different, you need to describe exactly what that is.
>
> L.
>
>
> Narayana S wrote:
>
>> Hi laurie,
>>
>>         <s:form action="TestAction" method="post">
>>        <s:label key="app.indexheader" />
>>        <s:textfield name="cname" key="app.cname"/><br>
>>
>> This is part of the form i am creating, when the theme is default the
>> label
>> could get value app.indexheader from resource bundle and working fine, the
>> text fields also could generate a label with the values given for
>> app.cname,
>> but when simple theme is given ( like <s:form action="TestAction"
>> method="post" theme="simple"> )  the label is not rendered!!
>>
>> can you help me on solving this >?
>>
>>
>> On Mon, Jun 23, 2008 at 11:18 PM, Laurie Harper <laurie@holoweb.net>
>> wrote:
>>
>>  Narayana S wrote:
>>>
>>>  Hi Dave,
>>>>
>>>>    thanks for your reply, but when i use simple theme, my application is
>>>> not getting any values from resource bundle..
>>>>
>>>>  How is it failing? Note that the 'simple' theme generates a lot less
>>> markup, and doesn't generate everything the other themes do. Are I18N
>>> resources failing to get resolved, or is the theme just not generating
>>> the
>>> things you were expecting to see?
>>>
>>>  will this problem be solved by extending theme ?
>>>
>>>> can you provide any best link to extend a theme if it is the solution...
>>>> ?
>>>>
>>>>  See the Themes and Templates documentation:
>>>
>>> http://struts.apache.org/2.0.11.1/docs/themes-and-templates.html
>>>
>>> L.
>>>
>>>
>>>  On Sun, Jun 22, 2008 at 8:25 PM, Dave Newton <newton.dave@yahoo.com>
>>>
>>>> wrote:
>>>>
>>>>  --- On Sun, 6/22/08, Narayana S <narayanasgs1@gmail.com> wrote:
>>>>
>>>>> The problem is here struts 2 is applying it's own styles to
>>>>>> my page, i want to give my own styles instead of using struts
>>>>>> default styles,
>>>>>>
>>>>>>  The easiest answer is to just supply your own CSS styles. You can
>>>>> also
>>>>> extend an existing, or create your own, theme.
>>>>>
>>>>> Dave
>>>>>
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>>>>> For additional commands, e-mail: user-help@struts.apache.org
>>>>>
>>>>>
>>>>>
>>>>>  ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>>> For additional commands, e-mail: user-help@struts.apache.org
>>>
>>>
>>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message