You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by saman1000 <sa...@gmail.com> on 2013/03/08 23:32:05 UTC

please change reset.ftl so html id is not overwritten

The reset.ftl file should be modified so if is is defined in the jsp, e.g.
<s:reset id="myreset" value="Clear" cssClass="tinput" title="Clear" />
then the id appears in the translated HTML:
<input type="reset" id="myreset" value="Clear" class="tinput"
title="Clear"/>
and not
<input type="reset" value="Clear" class="tinput" title="Clear"/>

I modified reset.ftl and added
<#if parameters.id??>
 id="${parameters.id?html}"<#rt/>
</#if>
after
<button type="reset"<#rt/>

and also 
<#if parameters.id??>
 id="${parameters.id?html}"<#rt/>
</#if>
after
<input type="reset"<#rt/>

thanks,
saman1000



--
View this message in context: http://struts.1045723.n5.nabble.com/please-change-reset-ftl-so-html-id-is-not-overwritten-tp5711988.html
Sent from the Struts - Dev mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org


RE: please change reset.ftl so html id is not overwritten

Posted by saman1000 <sa...@gmail.com>.
I created 
https://issues.apache.org/jira/browse/WW-3995
Please let me know whether it should be modified. I could not assign it to
Lukasz.

thanks,
saman1000



--
View this message in context: http://struts.1045723.n5.nabble.com/please-change-reset-ftl-so-html-id-is-not-overwritten-tp5711988p5712004.html
Sent from the Struts - Dev mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org


RE: please change reset.ftl so html id is not overwritten

Posted by Martin Gainty <mg...@hotmail.com>.
difficult to 'walk the dom' when you dont have a specific ID you're targetting file the request with your proposed patch to https://issues.apache.org/jira/browse/WW (and get Lukasz  to review)

Martin 
______________________________________________ 
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité

Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni.

 > Date: Fri, 8 Mar 2013 14:32:05 -0800
> From: saman1000@gmail.com
> To: dev@struts.apache.org
> Subject: please change reset.ftl so html id is not overwritten
> 
> The reset.ftl file should be modified so if is is defined in the jsp, e.g.
> <s:reset id="myreset" value="Clear" cssClass="tinput" title="Clear" />
> then the id appears in the translated HTML:
> <input type="reset" id="myreset" value="Clear" class="tinput"
> title="Clear"/>
> and not
> <input type="reset" value="Clear" class="tinput" title="Clear"/>
> 
> I modified reset.ftl and added
> <#if parameters.id??>
>  id="${parameters.id?html}"<#rt/>
> </#if>
> after
> <button type="reset"<#rt/>
> 
> and also 
> <#if parameters.id??>
>  id="${parameters.id?html}"<#rt/>
> </#if>
> after
> <input type="reset"<#rt/>
> 
> thanks,
> saman1000
> 
> 
> 
> --
> View this message in context: http://struts.1045723.n5.nabble.com/please-change-reset-ftl-so-html-id-is-not-overwritten-tp5711988.html
> Sent from the Struts - Dev mailing list archive at Nabble.com.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> For additional commands, e-mail: dev-help@struts.apache.org
> 
 		 	   		  

Re: please change reset.ftl so html id is not overwritten

Posted by Lukasz Lenart <lu...@apache.org>.
2013/3/12 Martin Gainty <mg...@hotmail.com>:
> how about switching theme to simple?
> http://struts.apache.org/release/2.2.x/docs/struts-2-themes.html

This can be problematic as it's used for purpose with css_xhtml theme
- I rather think about adding some logic which will base on selected
theme, like
<#if $parameters.theme == 'simple'>
id=$parameters.id?html
<#/if>


Regards
-- 
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org


RE: please change reset.ftl so html id is not overwritten

Posted by Martin Gainty <mg...@hotmail.com>.
Lukasz
 
how about switching theme to simple?
http://struts.apache.org/release/2.2.x/docs/struts-2-themes.html

Martin Gainty 
______________________________________________ 
Note de déni et de confidentialité

 Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni.

  


> From: lukaszlenart@apache.org
> Date: Mon, 11 Mar 2013 23:52:36 +0100
> Subject: Re: please change reset.ftl so html id is not overwritten
> To: dev@struts.apache.org
> 
> As I commented in the issue, thus will break the css_xhtml theme.
> 
> 
> Regards
> -- 
> Łukasz
> + 48 606 323 122 http://www.lenart.org.pl/
> 
> 2013/3/8 saman1000 <sa...@gmail.com>:
> > The reset.ftl file should be modified so if is is defined in the jsp, e.g.
> > <s:reset id="myreset" value="Clear" cssClass="tinput" title="Clear" />
> > then the id appears in the translated HTML:
> > <input type="reset" id="myreset" value="Clear" class="tinput"
> > title="Clear"/>
> > and not
> > <input type="reset" value="Clear" class="tinput" title="Clear"/>
> >
> > I modified reset.ftl and added
> > <#if parameters.id??>
> > id="${parameters.id?html}"<#rt/>
> > </#if>
> > after
> > <button type="reset"<#rt/>
> >
> > and also
> > <#if parameters.id??>
> > id="${parameters.id?html}"<#rt/>
> > </#if>
> > after
> > <input type="reset"<#rt/>
> >
> > thanks,
> > saman1000
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> For additional commands, e-mail: dev-help@struts.apache.org
> 
 		 	   		  

Re: please change reset.ftl so html id is not overwritten

Posted by Lukasz Lenart <lu...@apache.org>.
As I commented in the issue, thus will break the css_xhtml theme.


Regards
-- 
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/

2013/3/8 saman1000 <sa...@gmail.com>:
> The reset.ftl file should be modified so if is is defined in the jsp, e.g.
> <s:reset id="myreset" value="Clear" cssClass="tinput" title="Clear" />
> then the id appears in the translated HTML:
> <input type="reset" id="myreset" value="Clear" class="tinput"
> title="Clear"/>
> and not
> <input type="reset" value="Clear" class="tinput" title="Clear"/>
>
> I modified reset.ftl and added
> <#if parameters.id??>
>  id="${parameters.id?html}"<#rt/>
> </#if>
> after
> <button type="reset"<#rt/>
>
> and also
> <#if parameters.id??>
>  id="${parameters.id?html}"<#rt/>
> </#if>
> after
> <input type="reset"<#rt/>
>
> thanks,
> saman1000

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org