You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Simon Lessard <si...@gmail.com> on 2007/08/14 19:55:22 UTC

Re: [Trinidad] EL not processed for label attribute for server-side validation

Hello Todd,

Have you tried using a standard managed bean instead of f:loadBundle by any
chance? I'm trying to figure if that can be the source of the problem.


Regards,

~ Simon

p.s. If that message is sent twice to the list please send me a private
email telling me so. I got some DNS problems today saying that mails are not
delivered every now and then, but I'm paranoid and always dislike to spam
mailing lists with double posts.

On 8/14/07, Todd Engle <To...@trisyngroup.com> wrote:
>
>
> Trinidad releases 1.01 and 1.02 allow client-side validation to be
> disabled and server-side only validation to occur.  However, for
> server-side validation of required fields, an EL expression in the label
> atrribute is not processed, and the generated error message will not
> contain the label text.  If the label attribute contains static text
> (e.g. label="Date:"), the label is included in the error message.
>
> Example:
>
>    <f:loadBundle basename="ResourceBundle" var="labels" />
>
>    <tr:inputText label="#{labels.date}" value="#{bean.dateField}"
> required="true" />
>
> When an empty (but required) field is submitted, the generated error
> message is: " - Value Required"
>
> If the label attribute contains "Date:", the generated message is:
> "Date: - Value Required"
>
> Can Trinidad be configured to process EL expressions for server-side
> validation?
>

Re: [Trinidad] EL not processed for label attribute for server-side validation

Posted by Simon Lessard <si...@gmail.com>.
True. Maybe tr:messages was placed before the f:loadBundle in the page?

On 8/14/07, Adam Winer <aw...@gmail.com> wrote:
>
> I'm sure it is the issue...  but there's already plenty of code
> in UIXEditableValue and the Trinidad MessageFactory
> class to handle this by delaying execution of the ValueBinding
> until the last possible moment.  Something's gone wrong with
> that code.
>
> -- Adam
>
>
>
> On 8/14/07, Simon Lessard <si...@gmail.com> wrote:
> > Hello Todd,
> >
> > Have you tried using a standard managed bean instead of f:loadBundle by
> any
> > chance? I'm trying to figure if that can be the source of the problem.
> >
> >
> > Regards,
> >
> > ~ Simon
> >
> > p.s. If that message is sent twice to the list please send me a private
> > email telling me so. I got some DNS problems today saying that mails are
> not
> > delivered every now and then, but I'm paranoid and always dislike to
> spam
> > mailing lists with double posts.
> >
> > On 8/14/07, Todd Engle <To...@trisyngroup.com> wrote:
> > >
> > > Trinidad releases 1.01 and 1.02 allow client-side validation to be
> > > disabled and server-side only validation to occur.  However, for
> > > server-side validation of required fields, an EL expression in the
> label
> > > atrribute is not processed, and the generated error message will not
> > > contain the label text.  If the label attribute contains static text
> > > (e.g. label="Date:"), the label is included in the error message.
> > >
> > > Example:
> > >
> > >    <f:loadBundle basename="ResourceBundle" var="labels" />
> > >
> > >    <tr:inputText label="#{labels.date}" value="#{bean.dateField}"
> > > required="true" />
> > >
> > > When an empty (but required) field is submitted, the generated error
> > > message is: " - Value Required"
> > >
> > > If the label attribute contains "Date:", the generated message is:
> > > "Date: - Value Required"
> > >
> > > Can Trinidad be configured to process EL expressions for server-side
> > > validation?
> > >
> >
> >
>

Re: [Trinidad] EL not processed for label attribute for server-side validation

Posted by Adam Winer <aw...@gmail.com>.
I'm sure it is the issue...  but there's already plenty of code
in UIXEditableValue and the Trinidad MessageFactory
class to handle this by delaying execution of the ValueBinding
until the last possible moment.  Something's gone wrong with
that code.

-- Adam



On 8/14/07, Simon Lessard <si...@gmail.com> wrote:
> Hello Todd,
>
> Have you tried using a standard managed bean instead of f:loadBundle by any
> chance? I'm trying to figure if that can be the source of the problem.
>
>
> Regards,
>
> ~ Simon
>
> p.s. If that message is sent twice to the list please send me a private
> email telling me so. I got some DNS problems today saying that mails are not
> delivered every now and then, but I'm paranoid and always dislike to spam
> mailing lists with double posts.
>
> On 8/14/07, Todd Engle <To...@trisyngroup.com> wrote:
> >
> > Trinidad releases 1.01 and 1.02 allow client-side validation to be
> > disabled and server-side only validation to occur.  However, for
> > server-side validation of required fields, an EL expression in the label
> > atrribute is not processed, and the generated error message will not
> > contain the label text.  If the label attribute contains static text
> > (e.g. label="Date:"), the label is included in the error message.
> >
> > Example:
> >
> >    <f:loadBundle basename="ResourceBundle" var="labels" />
> >
> >    <tr:inputText label="#{labels.date}" value="#{bean.dateField}"
> > required="true" />
> >
> > When an empty (but required) field is submitted, the generated error
> > message is: " - Value Required"
> >
> > If the label attribute contains "Date:", the generated message is:
> > "Date: - Value Required"
> >
> > Can Trinidad be configured to process EL expressions for server-side
> > validation?
> >
>
>

RE: [Trinidad] EL not processed for label attribute for server-side validation

Posted by Todd Engle <To...@trisyngroup.com>.
Thanks Simon -- a managed bean approach worked.  I found your posting
here and that helped explain the reason for the problem (and also the
solution):
 
http://www.nabble.com/-Trinidad--setActionListener-and-resource-bundle-t
4224032.html
 

________________________________

From: Simon Lessard [mailto:simon.lessard.3@gmail.com] 
Sent: Tuesday, August 14, 2007 1:55 PM
To: MyFaces Discussion
Subject: Re: [Trinidad] EL not processed for label attribute for
server-side validation


Hello Todd,

Have you tried using a standard managed bean instead of f:loadBundle by
any chance? I'm trying to figure if that can be the source of the
problem.


Regards,

~ Simon

p.s. If that message is sent twice to the list please send me a private
email telling me so. I got some DNS problems today saying that mails are
not delivered every now and then, but I'm paranoid and always dislike to
spam mailing lists with double posts. 


On 8/14/07, Todd Engle <To...@trisyngroup.com> wrote: 


	Trinidad releases 1.01 and 1.02 allow client-side validation to
be
	disabled and server-side only validation to occur.  However, for
	server-side validation of required fields, an EL expression in
the label
	atrribute is not processed, and the generated error message will
not 
	contain the label text.  If the label attribute contains static
text
	(e.g. label="Date:"), the label is included in the error
message.
	
	Example:
	
	   <f:loadBundle basename="ResourceBundle" var="labels" /> 
	
	   <tr:inputText label="#{labels.date}"
value="#{bean.dateField}"
	required="true" />
	
	When an empty (but required) field is submitted, the generated
error
	message is: " - Value Required" 
	
	If the label attribute contains "Date:", the generated message
is:
	"Date: - Value Required"
	
	Can Trinidad be configured to process EL expressions for
server-side
	validation?