You are viewing a plain text version of this content. The canonical link for it is here.
Posted to adffaces-dev@incubator.apache.org by Si...@DMR.CA on 2006/07/11 14:53:15 UTC

Tr : (ADFFACES-44) does not allow EL for noMatchMessageDetail

Hello,

I posted a patch for this issue, however it hsould not be closed yet as 
more validators have the same issues. Basically, I did the following to 
fix it:

I added the following to RegExpValidator.java

  protected Object getNoMatchMessageDetailNoEval()
  {
    Object obj = 
_facesBean.getLocalProperty(_NO_MATCH_MESSAGE_DETAIL_KEY);
    if (obj != null)
    {
      return obj.toString();
    }

    return _facesBean.getValueBinding(_NO_MATCH_MESSAGE_DETAIL_KEY);
  }

and changed the call in _getNoMatchFoundMessage to use the previous 
method.


The same strategy could be applied to most validator. Therefore, I was 
wondering if the getNoMatchMessageDetailNoEval would not benefit from 
being added to FacesBean instead as maybe 
public Object getUnevaluatedProperty or something like that. The method 
would simply return the local value if it exists, or the value binding 
without evaluating if it don't.


Regards,

Simon Lessard
Fujitsu Consulting

----- Forwarded by Simon Lessard/NOTES on 2006-07-11 10:49 -----



"Simon Lessard (JIRA)" <ad...@incubator.apache.org>
2006-07-11 10:43
Please respond to adffaces-issues
 
        To:     adffaces-issues@incubator.apache.org
        cc: 
        Subject:        [jira] Updated: (ADFFACES-44) <af:validateRegExp/> 
does not allow EL for noMatchMessageDetail


[ http://issues.apache.org/jira/browse/ADFFACES-44?page=all ]

Simon Lessard updated ADFFACES-44:
----------------------------------

Status: Patch Available  (was: Open)

> <af:validateRegExp/> does not allow EL for noMatchMessageDetail
> ---------------------------------------------------------------
>
>          Key: ADFFACES-44
>          URL: http://issues.apache.org/jira/browse/ADFFACES-44
>      Project: MyFaces ADF-Faces
>         Type: Bug

>     Reporter: Simon Lessard

>
> I copied this bug from OTN at 
http://forums.oracle.com/forums/message.jspa?messageID=1355472#1355472
> You cannot specify a noMatchMessageDetail using EL pointing on a 
resource file when using the <af:validateRegExp/>  tag.
> The reproduction case is:
> [code]
> <f:loadBundle basename="some.resource.file" var="res"/>
> <af:inputText>
>   <af:validateRegExp pattern="\w*" 
noMatchMessageDetail="#{res['some.key']]}"/>
> </af:inputText>
> [/code]

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira