You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Jan Ziegler (JIRA)" <de...@myfaces.apache.org> on 2007/10/15 18:54:50 UTC

[jira] Created: (MYFACES-1745) for-Attribute of UIMessage and HtmlOutputLabel does not work with an EL Expression

for-Attribute of UIMessage and HtmlOutputLabel does not work with an EL Expression
----------------------------------------------------------------------------------

                 Key: MYFACES-1745
                 URL: https://issues.apache.org/jira/browse/MYFACES-1745
             Project: MyFaces Core
          Issue Type: Bug
    Affects Versions: 1.2.1-SNAPSHOT
         Environment: Tomcat 6.0.15 (snapshot), Facelets 1.1.14

            Reporter: Jan Ziegler


When using an EL-Expression in the 'for'-Attribute of a UIMessage or HtmlOutputPanel, the EL is always resolved to null.
 
Here is an Example:

...
<h:form>
	<h:outputLabel for="#{testBean.test}" />
	<h:inputText id="#{testBean.test}" value="" required="true" />
	<h:message for="#{testBean.test}" />
	<h:commandButton value="click" />
</h:form>
...

You see that the 'for'-Attributes of the message and label as well as the 'id'-Attribute of the inputText refer to the same value which returns some valid string in my TestBean:

...
public String getTest()
{

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Re: [jira] Commented: (MYFACES-1745) for-Attribute of UIMessage and HtmlOutputLabel does not work with an EL Expression

Posted by Andrew Robinson <an...@gmail.com>.
Sorry, meaning that I am just verifying your patch. Will be applying it for you

On 10/17/07, Andrew Robinson <an...@gmail.com> wrote:
> I realize that, I'm trying to fix it though :)
>
> On 10/17/07, Bernhard Huemer <be...@gmail.com> wrote:
> > Hello,
> >
> > that's what I've already detected.
> >
> > "That seems to be a trivial bug of the Maven Faces Plugin's
> > MyFacesComponentGenerator. In order to the generate the "fancy getter",
> > it uses the name of the given parameter rather than the name of the
> > property."
> >
> > regards,
> > Bernhard
> >
> > On 10/17/2007 +0200,
> > "Andrew Robinson" <an...@gmail.com> wrote:
> > > I'm looking into this as a problem with the maven-faces-plugin source.
> > > What is interesting is the trunk is pointing at an old version of the
> > > plugin (1.2.1.1).
> > >
> > > I'll try to see what is going on with the plugin and see if I can use
> > > 1.2.4-SNAPSHOT to debug the issue. It seems like the
> > > MyFacesComponentGenerator is not using the correct variable to produce
> > > the getter method body
> > >
> > > -Andrew
> > >
> > > On 10/17/07, Mike Kienenberger (JIRA) <de...@myfaces.apache.org> wrote:
> > >>     [ https://issues.apache.org/jira/browse/MYFACES-1745?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12535594 ]
> > >>
> > >> Mike Kienenberger commented on MYFACES-1745:
> > >> --------------------------------------------
> > >>
> > >> At this point, you probably would be better off asking on the dev list on how to configure the generation process.
> > >>
> > >> I was only half-joking about the permissions, but it could be done on most operating systems.   For Windows, which is what it sounds like you're using, you can hit properties for a file (or folder), then the security tab, then click "Advanced" and most likely the access control will be "Allow Everyone Full Control"
> > >>
> > >> You can edit that access control to disallow "delete".   Just remember to change it back after you are done :-)
> > >>
> > >>
> > >>> for-Attribute of UIMessage and HtmlOutputLabel does not work with an EL Expression
> > >>> ----------------------------------------------------------------------------------
> > >>>
> > >>>                 Key: MYFACES-1745
> > >>>                 URL: https://issues.apache.org/jira/browse/MYFACES-1745
> > >>>             Project: MyFaces Core
> > >>>          Issue Type: Bug
> > >>>    Affects Versions: 1.2.1-SNAPSHOT
> > >>>         Environment: Tomcat 6.0.15 (snapshot), Facelets 1.1.14
> > >>>            Reporter: Jan Ziegler
> > >>>         Attachments: MyFaces-1745.patch
> > >>>
> > >>>
> > >>> When using an EL-Expression in the 'for'-Attribute of a UIMessage or HtmlOutputPanel, the EL is always resolved to null.
> > >>>
> > >>> Here is an Example:
> > >>> ...
> > >>> <h:form>
> > >>>       <h:outputLabel for="#{testBean.test}" />
> > >>>       <h:inputText id="#{testBean.test}" value="" required="true" />
> > >>>       <h:message for="#{testBean.test}" />
> > >>>       <h:commandButton value="click" />
> > >>> </h:form>
> > >>> ...
> > >>> You see that the 'for'-Attributes of the message and label as well as the 'id'-Attribute of the inputText refer to the same value which returns some valid string in my TestBean:
> > >>> ...
> > >>> public String getTest()
> > >>> {
> > >>>     return "testID";
> > >>> }
> > >>> ...
> > >>> When rendering the page, a message will never be rendered (even no value is given but the field is required) and the label cannot be linked to the input field - there appears two error messages on the console:
> > >>> Attribute 'for' of label component with id j_id1:j_id2 is not defined
> > >>> Attribute 'for' of UIMessage must not be null
> > >>> which means the value of the EL-Expression resolves to null I think. In other cases, it is no problem to resolve the value, e.g. in an HtmlOutputText:
> > >>> <h:outputText value="#{testBean.test}" />
> > >>> Therefor I looked into the source code of UIMessage and HtmlOutputLabel. I think I found the bug. Look at the 'getFor()'-function of UIMessage (also in HtmlOutputLabel):
> > >>>   public String getFor()
> > >>>   {
> > >>>     if (_for != null)
> > >>>     {
> > >>>       return _for;
> > >>>     }
> > >>>     ValueExpression expression = getValueExpression("forParam");
> > >>>     if (expression != null)
> > >>>     {
> > >>>       return (String)expression.getValue(getFacesContext().getELContext());
> > >>>     }
> > >>>     return null;
> > >>>   }
> > >>> I think 'forParam' is the wrong identifier for the ValueExpression ´cause in the Tag-classes, a value expression of the 'for'-Attribute is set via
> > >>> comp.setValueExpression("for", _for);
> > >>> A fix should be to use 'forParam' as an identifier in the Tag classes or 'for' as an identifier in the component-classes to use the same identifier for the value expression in all participants
> > >>> Am I right with that?
> > >> --
> > >> This message is automatically generated by JIRA.
> > >> -
> > >> You can reply to this email to add a comment to the issue online.
> > >>
> > >>
> > >
> >
> >
>

Re: [jira] Commented: (MYFACES-1745) for-Attribute of UIMessage and HtmlOutputLabel does not work with an EL Expression

Posted by Andrew Robinson <an...@gmail.com>.
I realize that, I'm trying to fix it though :)

On 10/17/07, Bernhard Huemer <be...@gmail.com> wrote:
> Hello,
>
> that's what I've already detected.
>
> "That seems to be a trivial bug of the Maven Faces Plugin's
> MyFacesComponentGenerator. In order to the generate the "fancy getter",
> it uses the name of the given parameter rather than the name of the
> property."
>
> regards,
> Bernhard
>
> On 10/17/2007 +0200,
> "Andrew Robinson" <an...@gmail.com> wrote:
> > I'm looking into this as a problem with the maven-faces-plugin source.
> > What is interesting is the trunk is pointing at an old version of the
> > plugin (1.2.1.1).
> >
> > I'll try to see what is going on with the plugin and see if I can use
> > 1.2.4-SNAPSHOT to debug the issue. It seems like the
> > MyFacesComponentGenerator is not using the correct variable to produce
> > the getter method body
> >
> > -Andrew
> >
> > On 10/17/07, Mike Kienenberger (JIRA) <de...@myfaces.apache.org> wrote:
> >>     [ https://issues.apache.org/jira/browse/MYFACES-1745?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12535594 ]
> >>
> >> Mike Kienenberger commented on MYFACES-1745:
> >> --------------------------------------------
> >>
> >> At this point, you probably would be better off asking on the dev list on how to configure the generation process.
> >>
> >> I was only half-joking about the permissions, but it could be done on most operating systems.   For Windows, which is what it sounds like you're using, you can hit properties for a file (or folder), then the security tab, then click "Advanced" and most likely the access control will be "Allow Everyone Full Control"
> >>
> >> You can edit that access control to disallow "delete".   Just remember to change it back after you are done :-)
> >>
> >>
> >>> for-Attribute of UIMessage and HtmlOutputLabel does not work with an EL Expression
> >>> ----------------------------------------------------------------------------------
> >>>
> >>>                 Key: MYFACES-1745
> >>>                 URL: https://issues.apache.org/jira/browse/MYFACES-1745
> >>>             Project: MyFaces Core
> >>>          Issue Type: Bug
> >>>    Affects Versions: 1.2.1-SNAPSHOT
> >>>         Environment: Tomcat 6.0.15 (snapshot), Facelets 1.1.14
> >>>            Reporter: Jan Ziegler
> >>>         Attachments: MyFaces-1745.patch
> >>>
> >>>
> >>> When using an EL-Expression in the 'for'-Attribute of a UIMessage or HtmlOutputPanel, the EL is always resolved to null.
> >>>
> >>> Here is an Example:
> >>> ...
> >>> <h:form>
> >>>       <h:outputLabel for="#{testBean.test}" />
> >>>       <h:inputText id="#{testBean.test}" value="" required="true" />
> >>>       <h:message for="#{testBean.test}" />
> >>>       <h:commandButton value="click" />
> >>> </h:form>
> >>> ...
> >>> You see that the 'for'-Attributes of the message and label as well as the 'id'-Attribute of the inputText refer to the same value which returns some valid string in my TestBean:
> >>> ...
> >>> public String getTest()
> >>> {
> >>>     return "testID";
> >>> }
> >>> ...
> >>> When rendering the page, a message will never be rendered (even no value is given but the field is required) and the label cannot be linked to the input field - there appears two error messages on the console:
> >>> Attribute 'for' of label component with id j_id1:j_id2 is not defined
> >>> Attribute 'for' of UIMessage must not be null
> >>> which means the value of the EL-Expression resolves to null I think. In other cases, it is no problem to resolve the value, e.g. in an HtmlOutputText:
> >>> <h:outputText value="#{testBean.test}" />
> >>> Therefor I looked into the source code of UIMessage and HtmlOutputLabel. I think I found the bug. Look at the 'getFor()'-function of UIMessage (also in HtmlOutputLabel):
> >>>   public String getFor()
> >>>   {
> >>>     if (_for != null)
> >>>     {
> >>>       return _for;
> >>>     }
> >>>     ValueExpression expression = getValueExpression("forParam");
> >>>     if (expression != null)
> >>>     {
> >>>       return (String)expression.getValue(getFacesContext().getELContext());
> >>>     }
> >>>     return null;
> >>>   }
> >>> I think 'forParam' is the wrong identifier for the ValueExpression ´cause in the Tag-classes, a value expression of the 'for'-Attribute is set via
> >>> comp.setValueExpression("for", _for);
> >>> A fix should be to use 'forParam' as an identifier in the Tag classes or 'for' as an identifier in the component-classes to use the same identifier for the value expression in all participants
> >>> Am I right with that?
> >> --
> >> This message is automatically generated by JIRA.
> >> -
> >> You can reply to this email to add a comment to the issue online.
> >>
> >>
> >
>
>

Re: [jira] Commented: (MYFACES-1745) for-Attribute of UIMessage and HtmlOutputLabel does not work with an EL Expression

Posted by Bernhard Huemer <be...@gmail.com>.
Hello,

that's what I've already detected.

"That seems to be a trivial bug of the Maven Faces Plugin's 
MyFacesComponentGenerator. In order to the generate the "fancy getter", 
it uses the name of the given parameter rather than the name of the 
property."

regards,
Bernhard

On 10/17/2007 +0200,
"Andrew Robinson" <an...@gmail.com> wrote:
> I'm looking into this as a problem with the maven-faces-plugin source.
> What is interesting is the trunk is pointing at an old version of the
> plugin (1.2.1.1).
> 
> I'll try to see what is going on with the plugin and see if I can use
> 1.2.4-SNAPSHOT to debug the issue. It seems like the
> MyFacesComponentGenerator is not using the correct variable to produce
> the getter method body
> 
> -Andrew
> 
> On 10/17/07, Mike Kienenberger (JIRA) <de...@myfaces.apache.org> wrote:
>>     [ https://issues.apache.org/jira/browse/MYFACES-1745?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12535594 ]
>>
>> Mike Kienenberger commented on MYFACES-1745:
>> --------------------------------------------
>>
>> At this point, you probably would be better off asking on the dev list on how to configure the generation process.
>>
>> I was only half-joking about the permissions, but it could be done on most operating systems.   For Windows, which is what it sounds like you're using, you can hit properties for a file (or folder), then the security tab, then click "Advanced" and most likely the access control will be "Allow Everyone Full Control"
>>
>> You can edit that access control to disallow "delete".   Just remember to change it back after you are done :-)
>>
>>
>>> for-Attribute of UIMessage and HtmlOutputLabel does not work with an EL Expression
>>> ----------------------------------------------------------------------------------
>>>
>>>                 Key: MYFACES-1745
>>>                 URL: https://issues.apache.org/jira/browse/MYFACES-1745
>>>             Project: MyFaces Core
>>>          Issue Type: Bug
>>>    Affects Versions: 1.2.1-SNAPSHOT
>>>         Environment: Tomcat 6.0.15 (snapshot), Facelets 1.1.14
>>>            Reporter: Jan Ziegler
>>>         Attachments: MyFaces-1745.patch
>>>
>>>
>>> When using an EL-Expression in the 'for'-Attribute of a UIMessage or HtmlOutputPanel, the EL is always resolved to null.
>>>
>>> Here is an Example:
>>> ...
>>> <h:form>
>>>       <h:outputLabel for="#{testBean.test}" />
>>>       <h:inputText id="#{testBean.test}" value="" required="true" />
>>>       <h:message for="#{testBean.test}" />
>>>       <h:commandButton value="click" />
>>> </h:form>
>>> ...
>>> You see that the 'for'-Attributes of the message and label as well as the 'id'-Attribute of the inputText refer to the same value which returns some valid string in my TestBean:
>>> ...
>>> public String getTest()
>>> {
>>>     return "testID";
>>> }
>>> ...
>>> When rendering the page, a message will never be rendered (even no value is given but the field is required) and the label cannot be linked to the input field - there appears two error messages on the console:
>>> Attribute 'for' of label component with id j_id1:j_id2 is not defined
>>> Attribute 'for' of UIMessage must not be null
>>> which means the value of the EL-Expression resolves to null I think. In other cases, it is no problem to resolve the value, e.g. in an HtmlOutputText:
>>> <h:outputText value="#{testBean.test}" />
>>> Therefor I looked into the source code of UIMessage and HtmlOutputLabel. I think I found the bug. Look at the 'getFor()'-function of UIMessage (also in HtmlOutputLabel):
>>>   public String getFor()
>>>   {
>>>     if (_for != null)
>>>     {
>>>       return _for;
>>>     }
>>>     ValueExpression expression = getValueExpression("forParam");
>>>     if (expression != null)
>>>     {
>>>       return (String)expression.getValue(getFacesContext().getELContext());
>>>     }
>>>     return null;
>>>   }
>>> I think 'forParam' is the wrong identifier for the ValueExpression ´cause in the Tag-classes, a value expression of the 'for'-Attribute is set via
>>> comp.setValueExpression("for", _for);
>>> A fix should be to use 'forParam' as an identifier in the Tag classes or 'for' as an identifier in the component-classes to use the same identifier for the value expression in all participants
>>> Am I right with that?
>> --
>> This message is automatically generated by JIRA.
>> -
>> You can reply to this email to add a comment to the issue online.
>>
>>
> 


Re: [jira] Commented: (MYFACES-1745) for-Attribute of UIMessage and HtmlOutputLabel does not work with an EL Expression

Posted by Andrew Robinson <an...@gmail.com>.
I'm looking into this as a problem with the maven-faces-plugin source.
What is interesting is the trunk is pointing at an old version of the
plugin (1.2.1.1).

I'll try to see what is going on with the plugin and see if I can use
1.2.4-SNAPSHOT to debug the issue. It seems like the
MyFacesComponentGenerator is not using the correct variable to produce
the getter method body

-Andrew

On 10/17/07, Mike Kienenberger (JIRA) <de...@myfaces.apache.org> wrote:
>
>     [ https://issues.apache.org/jira/browse/MYFACES-1745?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12535594 ]
>
> Mike Kienenberger commented on MYFACES-1745:
> --------------------------------------------
>
> At this point, you probably would be better off asking on the dev list on how to configure the generation process.
>
> I was only half-joking about the permissions, but it could be done on most operating systems.   For Windows, which is what it sounds like you're using, you can hit properties for a file (or folder), then the security tab, then click "Advanced" and most likely the access control will be "Allow Everyone Full Control"
>
> You can edit that access control to disallow "delete".   Just remember to change it back after you are done :-)
>
>
> > for-Attribute of UIMessage and HtmlOutputLabel does not work with an EL Expression
> > ----------------------------------------------------------------------------------
> >
> >                 Key: MYFACES-1745
> >                 URL: https://issues.apache.org/jira/browse/MYFACES-1745
> >             Project: MyFaces Core
> >          Issue Type: Bug
> >    Affects Versions: 1.2.1-SNAPSHOT
> >         Environment: Tomcat 6.0.15 (snapshot), Facelets 1.1.14
> >            Reporter: Jan Ziegler
> >         Attachments: MyFaces-1745.patch
> >
> >
> > When using an EL-Expression in the 'for'-Attribute of a UIMessage or HtmlOutputPanel, the EL is always resolved to null.
> >
> > Here is an Example:
> > ...
> > <h:form>
> >       <h:outputLabel for="#{testBean.test}" />
> >       <h:inputText id="#{testBean.test}" value="" required="true" />
> >       <h:message for="#{testBean.test}" />
> >       <h:commandButton value="click" />
> > </h:form>
> > ...
> > You see that the 'for'-Attributes of the message and label as well as the 'id'-Attribute of the inputText refer to the same value which returns some valid string in my TestBean:
> > ...
> > public String getTest()
> > {
> >     return "testID";
> > }
> > ...
> > When rendering the page, a message will never be rendered (even no value is given but the field is required) and the label cannot be linked to the input field - there appears two error messages on the console:
> > Attribute 'for' of label component with id j_id1:j_id2 is not defined
> > Attribute 'for' of UIMessage must not be null
> > which means the value of the EL-Expression resolves to null I think. In other cases, it is no problem to resolve the value, e.g. in an HtmlOutputText:
> > <h:outputText value="#{testBean.test}" />
> > Therefor I looked into the source code of UIMessage and HtmlOutputLabel. I think I found the bug. Look at the 'getFor()'-function of UIMessage (also in HtmlOutputLabel):
> >   public String getFor()
> >   {
> >     if (_for != null)
> >     {
> >       return _for;
> >     }
> >     ValueExpression expression = getValueExpression("forParam");
> >     if (expression != null)
> >     {
> >       return (String)expression.getValue(getFacesContext().getELContext());
> >     }
> >     return null;
> >   }
> > I think 'forParam' is the wrong identifier for the ValueExpression ´cause in the Tag-classes, a value expression of the 'for'-Attribute is set via
> > comp.setValueExpression("for", _for);
> > A fix should be to use 'forParam' as an identifier in the Tag classes or 'for' as an identifier in the component-classes to use the same identifier for the value expression in all participants
> > Am I right with that?
>
> --
> This message is automatically generated by JIRA.
> -
> You can reply to this email to add a comment to the issue online.
>
>

[jira] Resolved: (MYFACES-1745) for-Attribute of UIMessage and HtmlOutputLabel does not work with an EL Expression

Posted by "Andrew Robinson (JIRA)" <de...@myfaces.apache.org>.
     [ https://issues.apache.org/jira/browse/MYFACES-1745?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andrew Robinson resolved MYFACES-1745.
--------------------------------------

    Resolution: Fixed

Committed revision 593236.

Changed the references for the faces plugin to 1.2.4-SNAPSHOT

> for-Attribute of UIMessage and HtmlOutputLabel does not work with an EL Expression
> ----------------------------------------------------------------------------------
>
>                 Key: MYFACES-1745
>                 URL: https://issues.apache.org/jira/browse/MYFACES-1745
>             Project: MyFaces Core
>          Issue Type: Bug
>    Affects Versions: 1.2.1-SNAPSHOT
>         Environment: Tomcat 6.0.15 (snapshot), Facelets 1.1.14
>            Reporter: Jan Ziegler
>            Assignee: Andrew Robinson
>             Fix For: 1.2.1-SNAPSHOT
>
>         Attachments: MyFaces-1745.patch
>
>
> When using an EL-Expression in the 'for'-Attribute of a UIMessage or HtmlOutputPanel, the EL is always resolved to null.
>  
> Here is an Example:
> ...
> <h:form>
> 	<h:outputLabel for="#{testBean.test}" />
> 	<h:inputText id="#{testBean.test}" value="" required="true" />
> 	<h:message for="#{testBean.test}" />
> 	<h:commandButton value="click" />
> </h:form>
> ...
> You see that the 'for'-Attributes of the message and label as well as the 'id'-Attribute of the inputText refer to the same value which returns some valid string in my TestBean:
> ...
> public String getTest()
> {
>     return "testID";
> }
> ...
> When rendering the page, a message will never be rendered (even no value is given but the field is required) and the label cannot be linked to the input field - there appears two error messages on the console:
> Attribute 'for' of label component with id j_id1:j_id2 is not defined
> Attribute 'for' of UIMessage must not be null
> which means the value of the EL-Expression resolves to null I think. In other cases, it is no problem to resolve the value, e.g. in an HtmlOutputText:
> <h:outputText value="#{testBean.test}" />
> Therefor I looked into the source code of UIMessage and HtmlOutputLabel. I think I found the bug. Look at the 'getFor()'-function of UIMessage (also in HtmlOutputLabel):
>   public String getFor()
>   {
>     if (_for != null)
>     {
>       return _for;
>     }
>     ValueExpression expression = getValueExpression("forParam");
>     if (expression != null)
>     {
>       return (String)expression.getValue(getFacesContext().getELContext());
>     }
>     return null;
>   }
> I think 'forParam' is the wrong identifier for the ValueExpression ´cause in the Tag-classes, a value expression of the 'for'-Attribute is set via 
> comp.setValueExpression("for", _for);
> A fix should be to use 'forParam' as an identifier in the Tag classes or 'for' as an identifier in the component-classes to use the same identifier for the value expression in all participants
> Am I right with that?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (MYFACES-1745) for-Attribute of UIMessage and HtmlOutputLabel does not work with an EL Expression

Posted by "Mike Kienenberger (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/MYFACES-1745?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12535594 ] 

Mike Kienenberger commented on MYFACES-1745:
--------------------------------------------

At this point, you probably would be better off asking on the dev list on how to configure the generation process.

I was only half-joking about the permissions, but it could be done on most operating systems.   For Windows, which is what it sounds like you're using, you can hit properties for a file (or folder), then the security tab, then click "Advanced" and most likely the access control will be "Allow Everyone Full Control"

You can edit that access control to disallow "delete".   Just remember to change it back after you are done :-)


> for-Attribute of UIMessage and HtmlOutputLabel does not work with an EL Expression
> ----------------------------------------------------------------------------------
>
>                 Key: MYFACES-1745
>                 URL: https://issues.apache.org/jira/browse/MYFACES-1745
>             Project: MyFaces Core
>          Issue Type: Bug
>    Affects Versions: 1.2.1-SNAPSHOT
>         Environment: Tomcat 6.0.15 (snapshot), Facelets 1.1.14
>            Reporter: Jan Ziegler
>         Attachments: MyFaces-1745.patch
>
>
> When using an EL-Expression in the 'for'-Attribute of a UIMessage or HtmlOutputPanel, the EL is always resolved to null.
>  
> Here is an Example:
> ...
> <h:form>
> 	<h:outputLabel for="#{testBean.test}" />
> 	<h:inputText id="#{testBean.test}" value="" required="true" />
> 	<h:message for="#{testBean.test}" />
> 	<h:commandButton value="click" />
> </h:form>
> ...
> You see that the 'for'-Attributes of the message and label as well as the 'id'-Attribute of the inputText refer to the same value which returns some valid string in my TestBean:
> ...
> public String getTest()
> {
>     return "testID";
> }
> ...
> When rendering the page, a message will never be rendered (even no value is given but the field is required) and the label cannot be linked to the input field - there appears two error messages on the console:
> Attribute 'for' of label component with id j_id1:j_id2 is not defined
> Attribute 'for' of UIMessage must not be null
> which means the value of the EL-Expression resolves to null I think. In other cases, it is no problem to resolve the value, e.g. in an HtmlOutputText:
> <h:outputText value="#{testBean.test}" />
> Therefor I looked into the source code of UIMessage and HtmlOutputLabel. I think I found the bug. Look at the 'getFor()'-function of UIMessage (also in HtmlOutputLabel):
>   public String getFor()
>   {
>     if (_for != null)
>     {
>       return _for;
>     }
>     ValueExpression expression = getValueExpression("forParam");
>     if (expression != null)
>     {
>       return (String)expression.getValue(getFacesContext().getELContext());
>     }
>     return null;
>   }
> I think 'forParam' is the wrong identifier for the ValueExpression ´cause in the Tag-classes, a value expression of the 'for'-Attribute is set via 
> comp.setValueExpression("for", _for);
> A fix should be to use 'forParam' as an identifier in the Tag classes or 'for' as an identifier in the component-classes to use the same identifier for the value expression in all participants
> Am I right with that?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (MYFACES-1745) for-Attribute of UIMessage and HtmlOutputLabel does not work with an EL Expression

Posted by "Mike Kienenberger (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/MYFACES-1745?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12535320 ] 

Mike Kienenberger commented on MYFACES-1745:
--------------------------------------------

It's possible that the build process has changed for 1.2 and I missed the announcement, but for MyFaces 1.1, there is no automatic generation of these files.

The patch that was posted was for a Trinidad plugin, not a MyFaces core plugin.

I suspect that the file needs to be updated manually.


> for-Attribute of UIMessage and HtmlOutputLabel does not work with an EL Expression
> ----------------------------------------------------------------------------------
>
>                 Key: MYFACES-1745
>                 URL: https://issues.apache.org/jira/browse/MYFACES-1745
>             Project: MyFaces Core
>          Issue Type: Bug
>    Affects Versions: 1.2.1-SNAPSHOT
>         Environment: Tomcat 6.0.15 (snapshot), Facelets 1.1.14
>            Reporter: Jan Ziegler
>         Attachments: MyFaces-1745.patch
>
>
> When using an EL-Expression in the 'for'-Attribute of a UIMessage or HtmlOutputPanel, the EL is always resolved to null.
>  
> Here is an Example:
> ...
> <h:form>
> 	<h:outputLabel for="#{testBean.test}" />
> 	<h:inputText id="#{testBean.test}" value="" required="true" />
> 	<h:message for="#{testBean.test}" />
> 	<h:commandButton value="click" />
> </h:form>
> ...
> You see that the 'for'-Attributes of the message and label as well as the 'id'-Attribute of the inputText refer to the same value which returns some valid string in my TestBean:
> ...
> public String getTest()
> {
>     return "testID";
> }
> ...
> When rendering the page, a message will never be rendered (even no value is given but the field is required) and the label cannot be linked to the input field - there appears two error messages on the console:
> Attribute 'for' of label component with id j_id1:j_id2 is not defined
> Attribute 'for' of UIMessage must not be null
> which means the value of the EL-Expression resolves to null I think. In other cases, it is no problem to resolve the value, e.g. in an HtmlOutputText:
> <h:outputText value="#{testBean.test}" />
> Therefor I looked into the source code of UIMessage and HtmlOutputLabel. I think I found the bug. Look at the 'getFor()'-function of UIMessage (also in HtmlOutputLabel):
>   public String getFor()
>   {
>     if (_for != null)
>     {
>       return _for;
>     }
>     ValueExpression expression = getValueExpression("forParam");
>     if (expression != null)
>     {
>       return (String)expression.getValue(getFacesContext().getELContext());
>     }
>     return null;
>   }
> I think 'forParam' is the wrong identifier for the ValueExpression ´cause in the Tag-classes, a value expression of the 'for'-Attribute is set via 
> comp.setValueExpression("for", _for);
> A fix should be to use 'forParam' as an identifier in the Tag classes or 'for' as an identifier in the component-classes to use the same identifier for the value expression in all participants
> Am I right with that?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (MYFACES-1745) for-Attribute of UIMessage and HtmlOutputLabel does not work with an EL Expression

Posted by "Jan Ziegler (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/MYFACES-1745?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12535867 ] 

Jan Ziegler commented on MYFACES-1745:
--------------------------------------

Ok, sounds good. So I have to wait until the pom´s updated. The latest version of the maven-faces-plugin seems to be 1.2.3 (actually the myfaces pom is refering to 1.2.1.1) - I guess the fix will be in 1.2.4 (snapshot) but this plugin seems not to be availabe yet.   

As I could see on the myfaces dev list they´re working on it to support the new plugin during next week. So i´ll wait for this...(or maybe play around with the access control thing ;) in the meantime).





> for-Attribute of UIMessage and HtmlOutputLabel does not work with an EL Expression
> ----------------------------------------------------------------------------------
>
>                 Key: MYFACES-1745
>                 URL: https://issues.apache.org/jira/browse/MYFACES-1745
>             Project: MyFaces Core
>          Issue Type: Bug
>    Affects Versions: 1.2.1-SNAPSHOT
>         Environment: Tomcat 6.0.15 (snapshot), Facelets 1.1.14
>            Reporter: Jan Ziegler
>            Assignee: Andrew Robinson
>             Fix For: 1.2.1-SNAPSHOT
>
>         Attachments: MyFaces-1745.patch
>
>
> When using an EL-Expression in the 'for'-Attribute of a UIMessage or HtmlOutputPanel, the EL is always resolved to null.
>  
> Here is an Example:
> ...
> <h:form>
> 	<h:outputLabel for="#{testBean.test}" />
> 	<h:inputText id="#{testBean.test}" value="" required="true" />
> 	<h:message for="#{testBean.test}" />
> 	<h:commandButton value="click" />
> </h:form>
> ...
> You see that the 'for'-Attributes of the message and label as well as the 'id'-Attribute of the inputText refer to the same value which returns some valid string in my TestBean:
> ...
> public String getTest()
> {
>     return "testID";
> }
> ...
> When rendering the page, a message will never be rendered (even no value is given but the field is required) and the label cannot be linked to the input field - there appears two error messages on the console:
> Attribute 'for' of label component with id j_id1:j_id2 is not defined
> Attribute 'for' of UIMessage must not be null
> which means the value of the EL-Expression resolves to null I think. In other cases, it is no problem to resolve the value, e.g. in an HtmlOutputText:
> <h:outputText value="#{testBean.test}" />
> Therefor I looked into the source code of UIMessage and HtmlOutputLabel. I think I found the bug. Look at the 'getFor()'-function of UIMessage (also in HtmlOutputLabel):
>   public String getFor()
>   {
>     if (_for != null)
>     {
>       return _for;
>     }
>     ValueExpression expression = getValueExpression("forParam");
>     if (expression != null)
>     {
>       return (String)expression.getValue(getFacesContext().getELContext());
>     }
>     return null;
>   }
> I think 'forParam' is the wrong identifier for the ValueExpression ´cause in the Tag-classes, a value expression of the 'for'-Attribute is set via 
> comp.setValueExpression("for", _for);
> A fix should be to use 'forParam' as an identifier in the Tag classes or 'for' as an identifier in the component-classes to use the same identifier for the value expression in all participants
> Am I right with that?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (MYFACES-1745) for-Attribute of UIMessage and HtmlOutputLabel does not work with an EL Expression

Posted by "Bernhard Huemer (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/MYFACES-1745?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12534956 ] 

Bernhard Huemer commented on MYFACES-1745:
------------------------------------------

That seems to be a trivial bug of the Maven Faces Plugin's MyFacesComponentGenerator. In order to the generate the "fancy getter", it uses the name of the given parameter rather than the name of the property.

> for-Attribute of UIMessage and HtmlOutputLabel does not work with an EL Expression
> ----------------------------------------------------------------------------------
>
>                 Key: MYFACES-1745
>                 URL: https://issues.apache.org/jira/browse/MYFACES-1745
>             Project: MyFaces Core
>          Issue Type: Bug
>    Affects Versions: 1.2.1-SNAPSHOT
>         Environment: Tomcat 6.0.15 (snapshot), Facelets 1.1.14
>            Reporter: Jan Ziegler
>         Attachments: MyFaces-1745.patch
>
>
> When using an EL-Expression in the 'for'-Attribute of a UIMessage or HtmlOutputPanel, the EL is always resolved to null.
>  
> Here is an Example:
> ...
> <h:form>
> 	<h:outputLabel for="#{testBean.test}" />
> 	<h:inputText id="#{testBean.test}" value="" required="true" />
> 	<h:message for="#{testBean.test}" />
> 	<h:commandButton value="click" />
> </h:form>
> ...
> You see that the 'for'-Attributes of the message and label as well as the 'id'-Attribute of the inputText refer to the same value which returns some valid string in my TestBean:
> ...
> public String getTest()
> {
>     return "testID";
> }
> ...
> When rendering the page, a message will never be rendered (even no value is given but the field is required) and the label cannot be linked to the input field - there appears two error messages on the console:
> Attribute 'for' of label component with id j_id1:j_id2 is not defined
> Attribute 'for' of UIMessage must not be null
> which means the value of the EL-Expression resolves to null I think. In other cases, it is no problem to resolve the value, e.g. in an HtmlOutputText:
> <h:outputText value="#{testBean.test}" />
> Therefor I looked into the source code of UIMessage and HtmlOutputLabel. I think I found the bug. Look at the 'getFor()'-function of UIMessage (also in HtmlOutputLabel):
>   public String getFor()
>   {
>     if (_for != null)
>     {
>       return _for;
>     }
>     ValueExpression expression = getValueExpression("forParam");
>     if (expression != null)
>     {
>       return (String)expression.getValue(getFacesContext().getELContext());
>     }
>     return null;
>   }
> I think 'forParam' is the wrong identifier for the ValueExpression ´cause in the Tag-classes, a value expression of the 'for'-Attribute is set via 
> comp.setValueExpression("for", _for);
> A fix should be to use 'forParam' as an identifier in the Tag classes or 'for' as an identifier in the component-classes to use the same identifier for the value expression in all participants
> Am I right with that?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (MYFACES-1745) for-Attribute of UIMessage and HtmlOutputLabel does not work with an EL Expression

Posted by "Mike Kienenberger (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/MYFACES-1745?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12535586 ] 

Mike Kienenberger commented on MYFACES-1745:
--------------------------------------------

Well, then I'd say I was wrong, and that there is generation taking place.

I suppose one way to track it down or prevent it would be to change the file permissions :-)

-Mike


> for-Attribute of UIMessage and HtmlOutputLabel does not work with an EL Expression
> ----------------------------------------------------------------------------------
>
>                 Key: MYFACES-1745
>                 URL: https://issues.apache.org/jira/browse/MYFACES-1745
>             Project: MyFaces Core
>          Issue Type: Bug
>    Affects Versions: 1.2.1-SNAPSHOT
>         Environment: Tomcat 6.0.15 (snapshot), Facelets 1.1.14
>            Reporter: Jan Ziegler
>         Attachments: MyFaces-1745.patch
>
>
> When using an EL-Expression in the 'for'-Attribute of a UIMessage or HtmlOutputPanel, the EL is always resolved to null.
>  
> Here is an Example:
> ...
> <h:form>
> 	<h:outputLabel for="#{testBean.test}" />
> 	<h:inputText id="#{testBean.test}" value="" required="true" />
> 	<h:message for="#{testBean.test}" />
> 	<h:commandButton value="click" />
> </h:form>
> ...
> You see that the 'for'-Attributes of the message and label as well as the 'id'-Attribute of the inputText refer to the same value which returns some valid string in my TestBean:
> ...
> public String getTest()
> {
>     return "testID";
> }
> ...
> When rendering the page, a message will never be rendered (even no value is given but the field is required) and the label cannot be linked to the input field - there appears two error messages on the console:
> Attribute 'for' of label component with id j_id1:j_id2 is not defined
> Attribute 'for' of UIMessage must not be null
> which means the value of the EL-Expression resolves to null I think. In other cases, it is no problem to resolve the value, e.g. in an HtmlOutputText:
> <h:outputText value="#{testBean.test}" />
> Therefor I looked into the source code of UIMessage and HtmlOutputLabel. I think I found the bug. Look at the 'getFor()'-function of UIMessage (also in HtmlOutputLabel):
>   public String getFor()
>   {
>     if (_for != null)
>     {
>       return _for;
>     }
>     ValueExpression expression = getValueExpression("forParam");
>     if (expression != null)
>     {
>       return (String)expression.getValue(getFacesContext().getELContext());
>     }
>     return null;
>   }
> I think 'forParam' is the wrong identifier for the ValueExpression ´cause in the Tag-classes, a value expression of the 'for'-Attribute is set via 
> comp.setValueExpression("for", _for);
> A fix should be to use 'forParam' as an identifier in the Tag classes or 'for' as an identifier in the component-classes to use the same identifier for the value expression in all participants
> Am I right with that?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (MYFACES-1745) for-Attribute of UIMessage and HtmlOutputLabel does not work with an EL Expression

Posted by "Jan Ziegler (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/MYFACES-1745?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12535590 ] 

Jan Ziegler commented on MYFACES-1745:
--------------------------------------

If you mean setting the generated source files to "read only" to avoid overwriting this won´t change anything because the generated component classes seem to be always "read only" (maybe set after generation). To edit them I change them to writable and set it back afterwards. But during the following Maven install they get overwritten. I think they´re always deleted and written completely new...:(



  

> for-Attribute of UIMessage and HtmlOutputLabel does not work with an EL Expression
> ----------------------------------------------------------------------------------
>
>                 Key: MYFACES-1745
>                 URL: https://issues.apache.org/jira/browse/MYFACES-1745
>             Project: MyFaces Core
>          Issue Type: Bug
>    Affects Versions: 1.2.1-SNAPSHOT
>         Environment: Tomcat 6.0.15 (snapshot), Facelets 1.1.14
>            Reporter: Jan Ziegler
>         Attachments: MyFaces-1745.patch
>
>
> When using an EL-Expression in the 'for'-Attribute of a UIMessage or HtmlOutputPanel, the EL is always resolved to null.
>  
> Here is an Example:
> ...
> <h:form>
> 	<h:outputLabel for="#{testBean.test}" />
> 	<h:inputText id="#{testBean.test}" value="" required="true" />
> 	<h:message for="#{testBean.test}" />
> 	<h:commandButton value="click" />
> </h:form>
> ...
> You see that the 'for'-Attributes of the message and label as well as the 'id'-Attribute of the inputText refer to the same value which returns some valid string in my TestBean:
> ...
> public String getTest()
> {
>     return "testID";
> }
> ...
> When rendering the page, a message will never be rendered (even no value is given but the field is required) and the label cannot be linked to the input field - there appears two error messages on the console:
> Attribute 'for' of label component with id j_id1:j_id2 is not defined
> Attribute 'for' of UIMessage must not be null
> which means the value of the EL-Expression resolves to null I think. In other cases, it is no problem to resolve the value, e.g. in an HtmlOutputText:
> <h:outputText value="#{testBean.test}" />
> Therefor I looked into the source code of UIMessage and HtmlOutputLabel. I think I found the bug. Look at the 'getFor()'-function of UIMessage (also in HtmlOutputLabel):
>   public String getFor()
>   {
>     if (_for != null)
>     {
>       return _for;
>     }
>     ValueExpression expression = getValueExpression("forParam");
>     if (expression != null)
>     {
>       return (String)expression.getValue(getFacesContext().getELContext());
>     }
>     return null;
>   }
> I think 'forParam' is the wrong identifier for the ValueExpression ´cause in the Tag-classes, a value expression of the 'for'-Attribute is set via 
> comp.setValueExpression("for", _for);
> A fix should be to use 'forParam' as an identifier in the Tag classes or 'for' as an identifier in the component-classes to use the same identifier for the value expression in all participants
> Am I right with that?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (MYFACES-1745) for-Attribute of UIMessage and HtmlOutputLabel does not work with an EL Expression

Posted by "Jan Ziegler (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/MYFACES-1745?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12535217 ] 

Jan Ziegler commented on MYFACES-1745:
--------------------------------------

ok,

unfortunately I´m no expert in the myfaces build-process.can you give me some details how to use this patch. 
I cannot find the generator class in the checked out module current12 from the repository (http://svn.apache.org/repos/asf/myfaces/current12) to change the line of code.

Is the maven plugin downloaded during the build?

thanks for your help!

> for-Attribute of UIMessage and HtmlOutputLabel does not work with an EL Expression
> ----------------------------------------------------------------------------------
>
>                 Key: MYFACES-1745
>                 URL: https://issues.apache.org/jira/browse/MYFACES-1745
>             Project: MyFaces Core
>          Issue Type: Bug
>    Affects Versions: 1.2.1-SNAPSHOT
>         Environment: Tomcat 6.0.15 (snapshot), Facelets 1.1.14
>            Reporter: Jan Ziegler
>         Attachments: MyFaces-1745.patch
>
>
> When using an EL-Expression in the 'for'-Attribute of a UIMessage or HtmlOutputPanel, the EL is always resolved to null.
>  
> Here is an Example:
> ...
> <h:form>
> 	<h:outputLabel for="#{testBean.test}" />
> 	<h:inputText id="#{testBean.test}" value="" required="true" />
> 	<h:message for="#{testBean.test}" />
> 	<h:commandButton value="click" />
> </h:form>
> ...
> You see that the 'for'-Attributes of the message and label as well as the 'id'-Attribute of the inputText refer to the same value which returns some valid string in my TestBean:
> ...
> public String getTest()
> {
>     return "testID";
> }
> ...
> When rendering the page, a message will never be rendered (even no value is given but the field is required) and the label cannot be linked to the input field - there appears two error messages on the console:
> Attribute 'for' of label component with id j_id1:j_id2 is not defined
> Attribute 'for' of UIMessage must not be null
> which means the value of the EL-Expression resolves to null I think. In other cases, it is no problem to resolve the value, e.g. in an HtmlOutputText:
> <h:outputText value="#{testBean.test}" />
> Therefor I looked into the source code of UIMessage and HtmlOutputLabel. I think I found the bug. Look at the 'getFor()'-function of UIMessage (also in HtmlOutputLabel):
>   public String getFor()
>   {
>     if (_for != null)
>     {
>       return _for;
>     }
>     ValueExpression expression = getValueExpression("forParam");
>     if (expression != null)
>     {
>       return (String)expression.getValue(getFacesContext().getELContext());
>     }
>     return null;
>   }
> I think 'forParam' is the wrong identifier for the ValueExpression ´cause in the Tag-classes, a value expression of the 'for'-Attribute is set via 
> comp.setValueExpression("for", _for);
> A fix should be to use 'forParam' as an identifier in the Tag classes or 'for' as an identifier in the component-classes to use the same identifier for the value expression in all participants
> Am I right with that?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (MYFACES-1745) for-Attribute of UIMessage and HtmlOutputLabel does not work with an EL Expression

Posted by "Mike Kienenberger (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/MYFACES-1745?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12534931 ] 

Mike Kienenberger commented on MYFACES-1745:
--------------------------------------------

Yes, I'd say so.

And it should be "for", not "forParam".

> for-Attribute of UIMessage and HtmlOutputLabel does not work with an EL Expression
> ----------------------------------------------------------------------------------
>
>                 Key: MYFACES-1745
>                 URL: https://issues.apache.org/jira/browse/MYFACES-1745
>             Project: MyFaces Core
>          Issue Type: Bug
>    Affects Versions: 1.2.1-SNAPSHOT
>         Environment: Tomcat 6.0.15 (snapshot), Facelets 1.1.14
>            Reporter: Jan Ziegler
>
> When using an EL-Expression in the 'for'-Attribute of a UIMessage or HtmlOutputPanel, the EL is always resolved to null.
>  
> Here is an Example:
> ...
> <h:form>
> 	<h:outputLabel for="#{testBean.test}" />
> 	<h:inputText id="#{testBean.test}" value="" required="true" />
> 	<h:message for="#{testBean.test}" />
> 	<h:commandButton value="click" />
> </h:form>
> ...
> You see that the 'for'-Attributes of the message and label as well as the 'id'-Attribute of the inputText refer to the same value which returns some valid string in my TestBean:
> ...
> public String getTest()
> {
>     return "testID";
> }
> ...
> When rendering the page, a message will never be rendered (even no value is given but the field is required) and the label cannot be linked to the input field - there appears two error messages on the console:
> Attribute 'for' of label component with id j_id1:j_id2 is not defined
> Attribute 'for' of UIMessage must not be null
> which means the value of the EL-Expression resolves to null I think. In other cases, it is no problem to resolve the value, e.g. in an HtmlOutputText:
> <h:outputText value="#{testBean.test}" />
> Therefor I looked into the source code of UIMessage and HtmlOutputLabel. I think I found the bug. Look at the 'getFor()'-function of UIMessage (also in HtmlOutputLabel):
>   public String getFor()
>   {
>     if (_for != null)
>     {
>       return _for;
>     }
>     ValueExpression expression = getValueExpression("forParam");
>     if (expression != null)
>     {
>       return (String)expression.getValue(getFacesContext().getELContext());
>     }
>     return null;
>   }
> I think 'forParam' is the wrong identifier for the ValueExpression ´cause in the Tag-classes, a value expression of the 'for'-Attribute is set via 
> comp.setValueExpression("for", _for);
> A fix should be to use 'forParam' as an identifier in the Tag classes or 'for' as an identifier in the component-classes to use the same identifier for the value expression in all participants
> Am I right with that?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (MYFACES-1745) for-Attribute of UIMessage and HtmlOutputLabel does not work with an EL Expression

Posted by "Jan Ziegler (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/MYFACES-1745?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12538709 ] 

Jan Ziegler commented on MYFACES-1745:
--------------------------------------

Hi there,
I´m sitll waiting for the fix beeing made to the public through offering the new pom for myfaces.
Does anyone know when this will be the case?

> for-Attribute of UIMessage and HtmlOutputLabel does not work with an EL Expression
> ----------------------------------------------------------------------------------
>
>                 Key: MYFACES-1745
>                 URL: https://issues.apache.org/jira/browse/MYFACES-1745
>             Project: MyFaces Core
>          Issue Type: Bug
>    Affects Versions: 1.2.1-SNAPSHOT
>         Environment: Tomcat 6.0.15 (snapshot), Facelets 1.1.14
>            Reporter: Jan Ziegler
>            Assignee: Andrew Robinson
>             Fix For: 1.2.1-SNAPSHOT
>
>         Attachments: MyFaces-1745.patch
>
>
> When using an EL-Expression in the 'for'-Attribute of a UIMessage or HtmlOutputPanel, the EL is always resolved to null.
>  
> Here is an Example:
> ...
> <h:form>
> 	<h:outputLabel for="#{testBean.test}" />
> 	<h:inputText id="#{testBean.test}" value="" required="true" />
> 	<h:message for="#{testBean.test}" />
> 	<h:commandButton value="click" />
> </h:form>
> ...
> You see that the 'for'-Attributes of the message and label as well as the 'id'-Attribute of the inputText refer to the same value which returns some valid string in my TestBean:
> ...
> public String getTest()
> {
>     return "testID";
> }
> ...
> When rendering the page, a message will never be rendered (even no value is given but the field is required) and the label cannot be linked to the input field - there appears two error messages on the console:
> Attribute 'for' of label component with id j_id1:j_id2 is not defined
> Attribute 'for' of UIMessage must not be null
> which means the value of the EL-Expression resolves to null I think. In other cases, it is no problem to resolve the value, e.g. in an HtmlOutputText:
> <h:outputText value="#{testBean.test}" />
> Therefor I looked into the source code of UIMessage and HtmlOutputLabel. I think I found the bug. Look at the 'getFor()'-function of UIMessage (also in HtmlOutputLabel):
>   public String getFor()
>   {
>     if (_for != null)
>     {
>       return _for;
>     }
>     ValueExpression expression = getValueExpression("forParam");
>     if (expression != null)
>     {
>       return (String)expression.getValue(getFacesContext().getELContext());
>     }
>     return null;
>   }
> I think 'forParam' is the wrong identifier for the ValueExpression ´cause in the Tag-classes, a value expression of the 'for'-Attribute is set via 
> comp.setValueExpression("for", _for);
> A fix should be to use 'forParam' as an identifier in the Tag classes or 'for' as an identifier in the component-classes to use the same identifier for the value expression in all participants
> Am I right with that?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Reopened: (MYFACES-1745) for-Attribute of UIMessage and HtmlOutputLabel does not work with an EL Expression

Posted by "Andrew Robinson (JIRA)" <de...@myfaces.apache.org>.
     [ https://issues.apache.org/jira/browse/MYFACES-1745?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andrew Robinson reopened MYFACES-1745:
--------------------------------------


Re-opening to add fix comments and to change the resolution

> for-Attribute of UIMessage and HtmlOutputLabel does not work with an EL Expression
> ----------------------------------------------------------------------------------
>
>                 Key: MYFACES-1745
>                 URL: https://issues.apache.org/jira/browse/MYFACES-1745
>             Project: MyFaces Core
>          Issue Type: Bug
>    Affects Versions: 1.2.1-SNAPSHOT
>         Environment: Tomcat 6.0.15 (snapshot), Facelets 1.1.14
>            Reporter: Jan Ziegler
>            Assignee: Andrew Robinson
>             Fix For: 1.2.1-SNAPSHOT
>
>         Attachments: MyFaces-1745.patch
>
>
> When using an EL-Expression in the 'for'-Attribute of a UIMessage or HtmlOutputPanel, the EL is always resolved to null.
>  
> Here is an Example:
> ...
> <h:form>
> 	<h:outputLabel for="#{testBean.test}" />
> 	<h:inputText id="#{testBean.test}" value="" required="true" />
> 	<h:message for="#{testBean.test}" />
> 	<h:commandButton value="click" />
> </h:form>
> ...
> You see that the 'for'-Attributes of the message and label as well as the 'id'-Attribute of the inputText refer to the same value which returns some valid string in my TestBean:
> ...
> public String getTest()
> {
>     return "testID";
> }
> ...
> When rendering the page, a message will never be rendered (even no value is given but the field is required) and the label cannot be linked to the input field - there appears two error messages on the console:
> Attribute 'for' of label component with id j_id1:j_id2 is not defined
> Attribute 'for' of UIMessage must not be null
> which means the value of the EL-Expression resolves to null I think. In other cases, it is no problem to resolve the value, e.g. in an HtmlOutputText:
> <h:outputText value="#{testBean.test}" />
> Therefor I looked into the source code of UIMessage and HtmlOutputLabel. I think I found the bug. Look at the 'getFor()'-function of UIMessage (also in HtmlOutputLabel):
>   public String getFor()
>   {
>     if (_for != null)
>     {
>       return _for;
>     }
>     ValueExpression expression = getValueExpression("forParam");
>     if (expression != null)
>     {
>       return (String)expression.getValue(getFacesContext().getELContext());
>     }
>     return null;
>   }
> I think 'forParam' is the wrong identifier for the ValueExpression ´cause in the Tag-classes, a value expression of the 'for'-Attribute is set via 
> comp.setValueExpression("for", _for);
> A fix should be to use 'forParam' as an identifier in the Tag classes or 'for' as an identifier in the component-classes to use the same identifier for the value expression in all participants
> Am I right with that?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (MYFACES-1745) for-Attribute of UIMessage and HtmlOutputLabel does not work with an EL Expression

Posted by "Jan Ziegler (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/MYFACES-1745?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12535582 ] 

Jan Ziegler commented on MYFACES-1745:
--------------------------------------

But when I correct the source-files (UIMessage, HtmlOutputLabel) manually they get overwritten again during maven install. how can I suppress that?

> for-Attribute of UIMessage and HtmlOutputLabel does not work with an EL Expression
> ----------------------------------------------------------------------------------
>
>                 Key: MYFACES-1745
>                 URL: https://issues.apache.org/jira/browse/MYFACES-1745
>             Project: MyFaces Core
>          Issue Type: Bug
>    Affects Versions: 1.2.1-SNAPSHOT
>         Environment: Tomcat 6.0.15 (snapshot), Facelets 1.1.14
>            Reporter: Jan Ziegler
>         Attachments: MyFaces-1745.patch
>
>
> When using an EL-Expression in the 'for'-Attribute of a UIMessage or HtmlOutputPanel, the EL is always resolved to null.
>  
> Here is an Example:
> ...
> <h:form>
> 	<h:outputLabel for="#{testBean.test}" />
> 	<h:inputText id="#{testBean.test}" value="" required="true" />
> 	<h:message for="#{testBean.test}" />
> 	<h:commandButton value="click" />
> </h:form>
> ...
> You see that the 'for'-Attributes of the message and label as well as the 'id'-Attribute of the inputText refer to the same value which returns some valid string in my TestBean:
> ...
> public String getTest()
> {
>     return "testID";
> }
> ...
> When rendering the page, a message will never be rendered (even no value is given but the field is required) and the label cannot be linked to the input field - there appears two error messages on the console:
> Attribute 'for' of label component with id j_id1:j_id2 is not defined
> Attribute 'for' of UIMessage must not be null
> which means the value of the EL-Expression resolves to null I think. In other cases, it is no problem to resolve the value, e.g. in an HtmlOutputText:
> <h:outputText value="#{testBean.test}" />
> Therefor I looked into the source code of UIMessage and HtmlOutputLabel. I think I found the bug. Look at the 'getFor()'-function of UIMessage (also in HtmlOutputLabel):
>   public String getFor()
>   {
>     if (_for != null)
>     {
>       return _for;
>     }
>     ValueExpression expression = getValueExpression("forParam");
>     if (expression != null)
>     {
>       return (String)expression.getValue(getFacesContext().getELContext());
>     }
>     return null;
>   }
> I think 'forParam' is the wrong identifier for the ValueExpression ´cause in the Tag-classes, a value expression of the 'for'-Attribute is set via 
> comp.setValueExpression("for", _for);
> A fix should be to use 'forParam' as an identifier in the Tag classes or 'for' as an identifier in the component-classes to use the same identifier for the value expression in all participants
> Am I right with that?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (MYFACES-1745) for-Attribute of UIMessage and HtmlOutputLabel does not work with an EL Expression

Posted by "Andrew Robinson (JIRA)" <de...@myfaces.apache.org>.
     [ https://issues.apache.org/jira/browse/MYFACES-1745?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andrew Robinson resolved MYFACES-1745.
--------------------------------------

       Resolution: Incomplete
    Fix Version/s: 1.2.1-SNAPSHOT

Committed revision 585566

Applied the patch from Bernhard Huemer to the maven-faces-plugin

The status of this bug being marked as fixed is waiting on the upgrade of the faces-1.2/core/build/pom.xml to use the new plug-in version

> for-Attribute of UIMessage and HtmlOutputLabel does not work with an EL Expression
> ----------------------------------------------------------------------------------
>
>                 Key: MYFACES-1745
>                 URL: https://issues.apache.org/jira/browse/MYFACES-1745
>             Project: MyFaces Core
>          Issue Type: Bug
>    Affects Versions: 1.2.1-SNAPSHOT
>         Environment: Tomcat 6.0.15 (snapshot), Facelets 1.1.14
>            Reporter: Jan Ziegler
>            Assignee: Andrew Robinson
>             Fix For: 1.2.1-SNAPSHOT
>
>         Attachments: MyFaces-1745.patch
>
>
> When using an EL-Expression in the 'for'-Attribute of a UIMessage or HtmlOutputPanel, the EL is always resolved to null.
>  
> Here is an Example:
> ...
> <h:form>
> 	<h:outputLabel for="#{testBean.test}" />
> 	<h:inputText id="#{testBean.test}" value="" required="true" />
> 	<h:message for="#{testBean.test}" />
> 	<h:commandButton value="click" />
> </h:form>
> ...
> You see that the 'for'-Attributes of the message and label as well as the 'id'-Attribute of the inputText refer to the same value which returns some valid string in my TestBean:
> ...
> public String getTest()
> {
>     return "testID";
> }
> ...
> When rendering the page, a message will never be rendered (even no value is given but the field is required) and the label cannot be linked to the input field - there appears two error messages on the console:
> Attribute 'for' of label component with id j_id1:j_id2 is not defined
> Attribute 'for' of UIMessage must not be null
> which means the value of the EL-Expression resolves to null I think. In other cases, it is no problem to resolve the value, e.g. in an HtmlOutputText:
> <h:outputText value="#{testBean.test}" />
> Therefor I looked into the source code of UIMessage and HtmlOutputLabel. I think I found the bug. Look at the 'getFor()'-function of UIMessage (also in HtmlOutputLabel):
>   public String getFor()
>   {
>     if (_for != null)
>     {
>       return _for;
>     }
>     ValueExpression expression = getValueExpression("forParam");
>     if (expression != null)
>     {
>       return (String)expression.getValue(getFacesContext().getELContext());
>     }
>     return null;
>   }
> I think 'forParam' is the wrong identifier for the ValueExpression ´cause in the Tag-classes, a value expression of the 'for'-Attribute is set via 
> comp.setValueExpression("for", _for);
> A fix should be to use 'forParam' as an identifier in the Tag classes or 'for' as an identifier in the component-classes to use the same identifier for the value expression in all participants
> Am I right with that?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.