You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "Stephen Ince (JIRA)" <ji...@apache.org> on 2011/06/07 13:23:59 UTC

[jira] [Created] (WW-3644) placeHolder attribute for s:textfield/s:password being dynamic

placeHolder attribute for s:textfield/s:password being dynamic
--------------------------------------------------------------

                 Key: WW-3644
                 URL: https://issues.apache.org/jira/browse/WW-3644
             Project: Struts 2
          Issue Type: New Feature
          Components: Expression Language
    Affects Versions: 2.2.3
         Environment: struts2
            Reporter: Stephen Ince
             Fix For: Future


The placeholder field fot s:textfield and s:password should evaluate ognl expressions. Namely resource key replacements.
e.g

<s:textfield  theme="simple" placeholder="%{getText('placeHolder.Username')}" id="j_username" name="j_username" cssStyle="width:180px" />

This is an issue for HTML5.
I think Lukasz Lenart suggested making all attributes dynamic. 
 
AbstractUITag, line 294

    public void setDynamicAttribute(String uri, String localName,
Object value) throws JspException {
        dynamicAttributes.put(localName, value);
    }

and replace with

    public void setDynamicAttribute(String uri, String localName,
Object value) throws JspException {
        dynamicAttributes.put(localName, findString(value));
    }




--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (WW-3644) placeHolder attribute for s:textfield/s:password being dynamic

Posted by "Hudson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WW-3644?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13055657#comment-13055657 ] 

Hudson commented on WW-3644:
----------------------------

Integrated in Struts2 #328 (See [https://builds.apache.org/job/Struts2/328/])
    

> placeHolder attribute for s:textfield/s:password being dynamic
> --------------------------------------------------------------
>
>                 Key: WW-3644
>                 URL: https://issues.apache.org/jira/browse/WW-3644
>             Project: Struts 2
>          Issue Type: New Feature
>          Components: Expression Language
>    Affects Versions: 2.2.3
>         Environment: struts2
>            Reporter: Stephen Ince
>            Assignee: Lukasz Lenart
>              Labels: features
>             Fix For: 2.3
>
>
> The placeholder field fot s:textfield and s:password should evaluate ognl expressions. Namely resource key replacements.
> e.g
> <s:textfield  theme="simple" placeholder="%{getText('placeHolder.Username')}" id="j_username" name="j_username" cssStyle="width:180px" />
> This is an issue for HTML5.
> I think Lukasz Lenart suggested making all attributes dynamic. 
>  
> AbstractUITag, line 294
>     public void setDynamicAttribute(String uri, String localName,
> Object value) throws JspException {
>         dynamicAttributes.put(localName, value);
>     }
> and replace with
>     public void setDynamicAttribute(String uri, String localName,
> Object value) throws JspException {
>         dynamicAttributes.put(localName, findString(value));
>     }

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Resolved] (WW-3644) placeHolder attribute for s:textfield/s:password being dynamic

Posted by "Lukasz Lenart (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WW-3644?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Lukasz Lenart resolved WW-3644.
-------------------------------

       Resolution: Fixed
    Fix Version/s:     (was: 2.3.1)
                   2.3.5

Changed logic to parse only values enclosed in %{ and } as an expresion
                
> placeHolder attribute for s:textfield/s:password being dynamic
> --------------------------------------------------------------
>
>                 Key: WW-3644
>                 URL: https://issues.apache.org/jira/browse/WW-3644
>             Project: Struts 2
>          Issue Type: New Feature
>          Components: Expression Language
>    Affects Versions: 2.2.3
>         Environment: struts2
>            Reporter: Stephen Ince
>            Assignee: Lukasz Lenart
>              Labels: features
>             Fix For: 2.3.5
>
>
> The placeholder field fot s:textfield and s:password should evaluate ognl expressions. Namely resource key replacements.
> e.g
> <s:textfield  theme="simple" placeholder="%{getText('placeHolder.Username')}" id="j_username" name="j_username" cssStyle="width:180px" />
> This is an issue for HTML5.
> I think Lukasz Lenart suggested making all attributes dynamic. 
>  
> AbstractUITag, line 294
>     public void setDynamicAttribute(String uri, String localName,
> Object value) throws JspException {
>         dynamicAttributes.put(localName, value);
>     }
> and replace with
>     public void setDynamicAttribute(String uri, String localName,
> Object value) throws JspException {
>         dynamicAttributes.put(localName, findString(value));
>     }

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Reopened] (WW-3644) placeHolder attribute for s:textfield/s:password being dynamic

Posted by "Lukasz Lenart (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WW-3644?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Lukasz Lenart reopened WW-3644:
-------------------------------

    
> placeHolder attribute for s:textfield/s:password being dynamic
> --------------------------------------------------------------
>
>                 Key: WW-3644
>                 URL: https://issues.apache.org/jira/browse/WW-3644
>             Project: Struts 2
>          Issue Type: New Feature
>          Components: Expression Language
>    Affects Versions: 2.2.3
>         Environment: struts2
>            Reporter: Stephen Ince
>            Assignee: Lukasz Lenart
>              Labels: features
>             Fix For: 2.3.1
>
>
> The placeholder field fot s:textfield and s:password should evaluate ognl expressions. Namely resource key replacements.
> e.g
> <s:textfield  theme="simple" placeholder="%{getText('placeHolder.Username')}" id="j_username" name="j_username" cssStyle="width:180px" />
> This is an issue for HTML5.
> I think Lukasz Lenart suggested making all attributes dynamic. 
>  
> AbstractUITag, line 294
>     public void setDynamicAttribute(String uri, String localName,
> Object value) throws JspException {
>         dynamicAttributes.put(localName, value);
>     }
> and replace with
>     public void setDynamicAttribute(String uri, String localName,
> Object value) throws JspException {
>         dynamicAttributes.put(localName, findString(value));
>     }

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (WW-3644) placeHolder attribute for s:textfield/s:password being dynamic

Posted by "son nguyen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WW-3644?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13448438#comment-13448438 ] 

son nguyen commented on WW-3644:
--------------------------------

the problem still existed in placeholder attribute
if you input the value such as phone number with mathematical mark (+ - * /)
the value will be automatically calculated

for examplae <s:textfield placeHolder="021-3910555"/>
the value 021-3910555 will not be displayed properly

therefore, you need to put the single quote to enable the string format of ognl
<s:textfield placeHolder="'021-3910555'"/>
                
> placeHolder attribute for s:textfield/s:password being dynamic
> --------------------------------------------------------------
>
>                 Key: WW-3644
>                 URL: https://issues.apache.org/jira/browse/WW-3644
>             Project: Struts 2
>          Issue Type: New Feature
>          Components: Expression Language
>    Affects Versions: 2.2.3
>         Environment: struts2
>            Reporter: Stephen Ince
>            Assignee: Lukasz Lenart
>              Labels: features
>             Fix For: 2.3.1
>
>
> The placeholder field fot s:textfield and s:password should evaluate ognl expressions. Namely resource key replacements.
> e.g
> <s:textfield  theme="simple" placeholder="%{getText('placeHolder.Username')}" id="j_username" name="j_username" cssStyle="width:180px" />
> This is an issue for HTML5.
> I think Lukasz Lenart suggested making all attributes dynamic. 
>  
> AbstractUITag, line 294
>     public void setDynamicAttribute(String uri, String localName,
> Object value) throws JspException {
>         dynamicAttributes.put(localName, value);
>     }
> and replace with
>     public void setDynamicAttribute(String uri, String localName,
> Object value) throws JspException {
>         dynamicAttributes.put(localName, findString(value));
>     }

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (WW-3644) placeHolder attribute for s:textfield/s:password being dynamic

Posted by "Hudson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WW-3644?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13449653#comment-13449653 ] 

Hudson commented on WW-3644:
----------------------------

Integrated in Struts2 #525 (See [https://builds.apache.org/job/Struts2/525/])
    WW-3644 changes support for expression as a dynamic attribute to parse only values enclosed in %{ and } (Revision 1381585)

     Result = FAILURE
lukaszlenart : 
Files : 
* /struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/Component.java
* /struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/jsp/ui/AbstractUITag.java
* /struts/struts2/trunk/core/src/test/java/org/apache/struts2/views/freemarker/FreeMarkerResultTest.java
* /struts/struts2/trunk/core/src/test/java/org/apache/struts2/views/jsp/ui/AnchorTest.java

                
> placeHolder attribute for s:textfield/s:password being dynamic
> --------------------------------------------------------------
>
>                 Key: WW-3644
>                 URL: https://issues.apache.org/jira/browse/WW-3644
>             Project: Struts 2
>          Issue Type: New Feature
>          Components: Expression Language
>    Affects Versions: 2.2.3
>         Environment: struts2
>            Reporter: Stephen Ince
>            Assignee: Lukasz Lenart
>              Labels: features
>             Fix For: 2.3.5
>
>
> The placeholder field fot s:textfield and s:password should evaluate ognl expressions. Namely resource key replacements.
> e.g
> <s:textfield  theme="simple" placeholder="%{getText('placeHolder.Username')}" id="j_username" name="j_username" cssStyle="width:180px" />
> This is an issue for HTML5.
> I think Lukasz Lenart suggested making all attributes dynamic. 
>  
> AbstractUITag, line 294
>     public void setDynamicAttribute(String uri, String localName,
> Object value) throws JspException {
>         dynamicAttributes.put(localName, value);
>     }
> and replace with
>     public void setDynamicAttribute(String uri, String localName,
> Object value) throws JspException {
>         dynamicAttributes.put(localName, findString(value));
>     }

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Closed] (WW-3644) placeHolder attribute for s:textfield/s:password being dynamic

Posted by "Lukasz Lenart (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WW-3644?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Lukasz Lenart closed WW-3644.
-----------------------------

       Resolution: Fixed
    Fix Version/s:     (was: Future)
                   2.3
         Assignee: Lukasz Lenart

Solved, thanks!

> placeHolder attribute for s:textfield/s:password being dynamic
> --------------------------------------------------------------
>
>                 Key: WW-3644
>                 URL: https://issues.apache.org/jira/browse/WW-3644
>             Project: Struts 2
>          Issue Type: New Feature
>          Components: Expression Language
>    Affects Versions: 2.2.3
>         Environment: struts2
>            Reporter: Stephen Ince
>            Assignee: Lukasz Lenart
>              Labels: features
>             Fix For: 2.3
>
>
> The placeholder field fot s:textfield and s:password should evaluate ognl expressions. Namely resource key replacements.
> e.g
> <s:textfield  theme="simple" placeholder="%{getText('placeHolder.Username')}" id="j_username" name="j_username" cssStyle="width:180px" />
> This is an issue for HTML5.
> I think Lukasz Lenart suggested making all attributes dynamic. 
>  
> AbstractUITag, line 294
>     public void setDynamicAttribute(String uri, String localName,
> Object value) throws JspException {
>         dynamicAttributes.put(localName, value);
>     }
> and replace with
>     public void setDynamicAttribute(String uri, String localName,
> Object value) throws JspException {
>         dynamicAttributes.put(localName, findString(value));
>     }

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (WW-3644) placeHolder attribute for s:textfield/s:password being dynamic

Posted by "Lukasz Lenart (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WW-3644?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13448509#comment-13448509 ] 

Lukasz Lenart commented on WW-3644:
-----------------------------------

Ok, see your point. What about adding a check if it is an expression ? Check if value starts and ends with %{ and } ?
                
> placeHolder attribute for s:textfield/s:password being dynamic
> --------------------------------------------------------------
>
>                 Key: WW-3644
>                 URL: https://issues.apache.org/jira/browse/WW-3644
>             Project: Struts 2
>          Issue Type: New Feature
>          Components: Expression Language
>    Affects Versions: 2.2.3
>         Environment: struts2
>            Reporter: Stephen Ince
>            Assignee: Lukasz Lenart
>              Labels: features
>             Fix For: 2.3.1
>
>
> The placeholder field fot s:textfield and s:password should evaluate ognl expressions. Namely resource key replacements.
> e.g
> <s:textfield  theme="simple" placeholder="%{getText('placeHolder.Username')}" id="j_username" name="j_username" cssStyle="width:180px" />
> This is an issue for HTML5.
> I think Lukasz Lenart suggested making all attributes dynamic. 
>  
> AbstractUITag, line 294
>     public void setDynamicAttribute(String uri, String localName,
> Object value) throws JspException {
>         dynamicAttributes.put(localName, value);
>     }
> and replace with
>     public void setDynamicAttribute(String uri, String localName,
> Object value) throws JspException {
>         dynamicAttributes.put(localName, findString(value));
>     }

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira