Re: display label in error message instead of id

2006-02-18 Thread Martin Marinschek
Oh, that was it!

Please open an issue on that - I didn't think about embedded
outputText components when I implemented this solution, obviously ;).

regards,

Martin

On 2/18/06, Mike Duffy [EMAIL PROTECTED] wrote:
 Thanks for figuring this out.

 I had the exact same problem.

 If you look at the JSF book by Kito Mann, p 26, it shows an h:outputText 
 .../ wrapped in an
 h:outputLabel.../ which is unnecessary (overall, it's a good book).

 Thanks again.

 Mike



 --- Michael Heinen [EMAIL PROTECTED] wrote:

  Thanks a lot for your help.
  Now it works of course :-)
 
 
  -Original Message-
  From: Mario Ivankovits [mailto:[EMAIL PROTECTED]
  Sent: Freitag, 17. Februar 2006 11:58
  To: MyFaces Discussion
  Subject: Re: display label in error message instead of id
 
  Hi!
 
  Ok, I found a problem if one uses outputText as child of outputLabel.
  Its fixed now.
 
  As a workaround now you can get rid of outputText and use the value=
  attribute in outputLabel directly.
 
  eg.
  h:outputLabel for=input value=label /
  h:inputText id=input required=true /
 
  Ciao,
  Mario
 
 


 __
 Do You Yahoo!?
 Tired of spam?  Yahoo! Mail has the best spam protection around
 http://mail.yahoo.com



--

http://www.irian.at

Your JSF powerhouse -
JSF Consulting, Development and
Courses in English and German

Professional Support for Apache MyFaces


Re: display label in error message instead of id

2006-02-18 Thread Martin Marinschek
Ah, thank you!

The second part of your message I didn't get - what was a slick patch?

regards,

Martin

On 2/18/06, Mario Ivankovits [EMAIL PROTECTED] wrote:
 Hi Martin!
  Please open an issue on that - I didn't think about embedded
  outputText components when I implemented this solution, obviously ;).
 
 As you might see if you read some lines down - I already fixed it.
 And if you didnt create the outputLabel component then someone else
 thought about it, it was a very slick patch ;)

 http://svn.apache.org/viewcvs?rev=378617view=rev

 Ciao,
 Mario




--

http://www.irian.at

Your JSF powerhouse -
JSF Consulting, Development and
Courses in English and German

Professional Support for Apache MyFaces


Re: display label in error message instead of id

2006-02-18 Thread Martin Marinschek
Ok, fair enough, I'm forgetting what I programmed then ;)

regards,

Martin

On 2/18/06, Mario Ivankovits [EMAIL PROTECTED] wrote:
 Hi!
  The second part of your message I didn't get - what was a slick patch?
 
 I just wanted to say the code to deal with embedded outputText already
 existed, just a simple if-condition problem. It was very easy to fix.

 ---
 Mario




--

http://www.irian.at

Your JSF powerhouse -
JSF Consulting, Development and
Courses in English and German

Professional Support for Apache MyFaces


Re: display label in error message instead of id

2006-02-18 Thread Dave
Can the label be used only for display messages?  I am trying to replace ID inside a table for error messages. Labels and values are in two different columns. values are rendered in a subview as different components based on their types.An attribute for UIData component like   replaceIdForMessages="..."would solve the problem.  Its value can bind to a back bean property, supporting localization automatically.Can MyFaces add this property? :)  Martin Marinschek [EMAIL PROTECTED] wrote:  Ok, fair enough, I'm forgetting what I programmed then ;)regards,MartinOn 2/18/06, Mario Ivankovits <[EMAIL PROTECTED]>wrote:
 
 Hi!  The second part of your message I didn't get - what was a slick patch?  I just wanted to say the code to deal with embedded outputText already existed, just a simple if-condition problem. It was very easy to fix. --- Mario--http://www.irian.atYour JSF powerhouse -JSF Consulting, Development andCourses in English and GermanProfessional Support for Apache MyFaces
		 Yahoo! Mail 
Use Photomail to share photos without annoying attachments.

Re: display label in error message instead of id

2006-02-17 Thread Bruno Aranda
And what if you try showSummary=false showDetail=true?

Bruno

On 2/16/06, Michael Heinen [EMAIL PROTECTED] wrote:
 Thanks Bruno.

 I replaced my h:message tag with t:message but without success.

 I added replaceIdWithLabel=true but this does not change anything.
 Unfortunately I can't access the online API docs.

 Do you have another hint for me ?


 Michael

 -Original Message-
 From: Bruno Aranda [mailto:[EMAIL PROTECTED]
 Sent: Donnerstag, 16. Februar 2006 08:47
 To: MyFaces Discussion
 Subject: Re: display label in error message instead of id

 Sure, there is an easy solution. Use the extended messages component
 from tomahawk (t:message).

 Regards,

 Bruno

 On 2/16/06, Michael Heinen [EMAIL PROTECTED] wrote:
 
 
 
  Hi all,
 
 
 
  I try to display the label of a field instead of the id in an error
 message,
  but I don't get it to work.
 
  I'm sure there is an easy solution for it.
 
 
 
  Here is my code:
 
 
 
  Messages:
 
  login.name = User
 
 
 
  JSP:
 
  h:outputLabel for=name
 
 h:outputText value=#{msgs['login.name']}/
 
  /h:outputLabel
 
  h:panelGroup
 
  h:inputText id=name value=#{LoginControllerBean.name}
  styleClass=inputField required=true /
 
  h:message for=name styleClass=errorText/
 
  /h:panelGroup
 
 
 
  The following message is displayed if the name field is empty after
 submit:
 
  'name: Value is required.'
 
 
 
  I want that 'User: Value is required.' is displayed.
 
 
 
  Thanks for any help



RE: display label in error message instead of id

2006-02-17 Thread Michael Heinen
It does still not work!!!

login.name = User

t:outputLabel for=name 
   h:outputText value=#{msgs['login.name']}/
/t:outputLabel

h:inputText  id=name value=#{LoginControllerBean.name}
required=true /
t:message for=name styleClass=errorText replaceIdWithLabel=true
showSummary=false showDetail=true/

The message is still name: Value is required. Instead of User ...
I' going insane

Michael

-Original Message-
From: Bruno Aranda [mailto:[EMAIL PROTECTED] 
Sent: Freitag, 17. Februar 2006 04:06
To: MyFaces Discussion
Subject: Re: display label in error message instead of id

And what if you try showSummary=false showDetail=true?

Bruno

On 2/16/06, Michael Heinen [EMAIL PROTECTED] wrote:
 Thanks Bruno.

 I replaced my h:message tag with t:message but without success.

 I added replaceIdWithLabel=true but this does not change anything.
 Unfortunately I can't access the online API docs.

 Do you have another hint for me ?


 Michael

 -Original Message-
 From: Bruno Aranda [mailto:[EMAIL PROTECTED]
 Sent: Donnerstag, 16. Februar 2006 08:47
 To: MyFaces Discussion
 Subject: Re: display label in error message instead of id

 Sure, there is an easy solution. Use the extended messages component
 from tomahawk (t:message).

 Regards,

 Bruno

 On 2/16/06, Michael Heinen [EMAIL PROTECTED] wrote:
 
 
 
  Hi all,
 
 
 
  I try to display the label of a field instead of the id in an error
 message,
  but I don't get it to work.
 
  I'm sure there is an easy solution for it.
 
 
 
  Here is my code:
 
 
 
  Messages:
 
  login.name = User
 
 
 
  JSP:
 
  h:outputLabel for=name
 
 h:outputText value=#{msgs['login.name']}/
 
  /h:outputLabel
 
  h:panelGroup
 
  h:inputText id=name
value=#{LoginControllerBean.name}
  styleClass=inputField required=true /
 
  h:message for=name styleClass=errorText/
 
  /h:panelGroup
 
 
 
  The following message is displayed if the name field is empty after
 submit:
 
  'name: Value is required.'
 
 
 
  I want that 'User: Value is required.' is displayed.
 
 
 
  Thanks for any help



Re: display label in error message instead of id

2006-02-17 Thread Martin Marinschek
try it with t:messages - if it works there..

regards,

Martin

On 2/17/06, Michael Heinen [EMAIL PROTECTED] wrote:
 It does still not work!!!

 login.name = User

 t:outputLabel for=name
h:outputText value=#{msgs['login.name']}/
 /t:outputLabel

 h:inputText  id=name value=#{LoginControllerBean.name}
 required=true /
 t:message for=name styleClass=errorText replaceIdWithLabel=true
 showSummary=false showDetail=true/

 The message is still name: Value is required. Instead of User ...
 I' going insane

 Michael

 -Original Message-
 From: Bruno Aranda [mailto:[EMAIL PROTECTED]
 Sent: Freitag, 17. Februar 2006 04:06
 To: MyFaces Discussion
 Subject: Re: display label in error message instead of id

 And what if you try showSummary=false showDetail=true?

 Bruno

 On 2/16/06, Michael Heinen [EMAIL PROTECTED] wrote:
  Thanks Bruno.
 
  I replaced my h:message tag with t:message but without success.
 
  I added replaceIdWithLabel=true but this does not change anything.
  Unfortunately I can't access the online API docs.
 
  Do you have another hint for me ?
 
 
  Michael
 
  -Original Message-
  From: Bruno Aranda [mailto:[EMAIL PROTECTED]
  Sent: Donnerstag, 16. Februar 2006 08:47
  To: MyFaces Discussion
  Subject: Re: display label in error message instead of id
 
  Sure, there is an easy solution. Use the extended messages component
  from tomahawk (t:message).
 
  Regards,
 
  Bruno
 
  On 2/16/06, Michael Heinen [EMAIL PROTECTED] wrote:
  
  
  
   Hi all,
  
  
  
   I try to display the label of a field instead of the id in an error
  message,
   but I don't get it to work.
  
   I'm sure there is an easy solution for it.
  
  
  
   Here is my code:
  
  
  
   Messages:
  
   login.name = User
  
  
  
   JSP:
  
   h:outputLabel for=name
  
  h:outputText value=#{msgs['login.name']}/
  
   /h:outputLabel
  
   h:panelGroup
  
   h:inputText id=name
 value=#{LoginControllerBean.name}
   styleClass=inputField required=true /
  
   h:message for=name styleClass=errorText/
  
   /h:panelGroup
  
  
  
   The following message is displayed if the name field is empty after
  submit:
  
   'name: Value is required.'
  
  
  
   I want that 'User: Value is required.' is displayed.
  
  
  
   Thanks for any help
 



--

http://www.irian.at

Your JSF powerhouse -
JSF Consulting, Development and
Courses in English and German

Professional Support for Apache MyFaces


RE: display label in error message instead of id

2006-02-17 Thread Michael Heinen
t:messages is also not working with the label.

I post whole page below. It is used inside Tiles Framework.
Maybe someone finds an obvious error.

f:view
f:loadBundle basename=messages var=msgs/
h:form id=loginForm 
t:messages styleClass=errorText replaceIdWithLabel=true
showSummary=true showDetail=true /
t:messages styleClass=errorText replaceIdWithLabel=true
showSummary=false showDetail=true/

h:panelGrid columns=2 styleClass=indent
t:outputLabel for=name styleClass=label
   h:outputText
value=#{msgs['annotation.login.name']}/  
/t:outputLabel
h:panelGroup
h:inputText  id=name
value=#{LoginControllerBean.name} styleClass=inputField
required=true /
t:message for=name styleClass=errorText
replaceIdWithLabel=true showSummary=false showDetail=true/
/h:panelGroup

h:outputLabel for=password styleClass=label 
h:outputText
value=#{msgs['annotation.login.password']}/
/h:outputLabel
h:panelGroup
h:inputSecret id=password
value=#{LoginControllerBean.password} styleClass=inputField
required=true/
t:message for=password styleClass=errorText
replaceIdWithLabel=#{true} showSummary=false showDetail=true/
/h:panelGroup

h:commandButton action=#{LoginControllerBean.login}
value=#{msgs['annotation.login.button.login']}/  
/h:panelGrid
/h:form
/f:view

Michael

-Original Message-
From: Martin Marinschek [mailto:[EMAIL PROTECTED] 
Sent: Freitag, 17. Februar 2006 07:58
To: MyFaces Discussion
Subject: Re: display label in error message instead of id

try it with t:messages - if it works there..

regards,

Martin

On 2/17/06, Michael Heinen [EMAIL PROTECTED] wrote:
 It does still not work!!!

 login.name = User

 t:outputLabel for=name
h:outputText value=#{msgs['login.name']}/
 /t:outputLabel

 h:inputText  id=name value=#{LoginControllerBean.name}
 required=true /
 t:message for=name styleClass=errorText replaceIdWithLabel=true
 showSummary=false showDetail=true/

 The message is still name: Value is required. Instead of User ...
 I' going insane

 Michael

 -Original Message-
 From: Bruno Aranda [mailto:[EMAIL PROTECTED]
 Sent: Freitag, 17. Februar 2006 04:06
 To: MyFaces Discussion
 Subject: Re: display label in error message instead of id

 And what if you try showSummary=false showDetail=true?

 Bruno

 On 2/16/06, Michael Heinen [EMAIL PROTECTED] wrote:
  Thanks Bruno.
 
  I replaced my h:message tag with t:message but without success.
 
  I added replaceIdWithLabel=true but this does not change anything.
  Unfortunately I can't access the online API docs.
 
  Do you have another hint for me ?
 
 
  Michael
 
  -Original Message-
  From: Bruno Aranda [mailto:[EMAIL PROTECTED]
  Sent: Donnerstag, 16. Februar 2006 08:47
  To: MyFaces Discussion
  Subject: Re: display label in error message instead of id
 
  Sure, there is an easy solution. Use the extended messages component
  from tomahawk (t:message).
 
  Regards,
 
  Bruno
 
  On 2/16/06, Michael Heinen [EMAIL PROTECTED] wrote:
  
  
  
   Hi all,
  
  
  
   I try to display the label of a field instead of the id in an
error
  message,
   but I don't get it to work.
  
   I'm sure there is an easy solution for it.
  
  
  
   Here is my code:
  
  
  
   Messages:
  
   login.name = User
  
  
  
   JSP:
  
   h:outputLabel for=name
  
  h:outputText value=#{msgs['login.name']}/
  
   /h:outputLabel
  
   h:panelGroup
  
   h:inputText id=name
 value=#{LoginControllerBean.name}
   styleClass=inputField required=true /
  
   h:message for=name styleClass=errorText/
  
   /h:panelGroup
  
  
  
   The following message is displayed if the name field is empty
after
  submit:
  
   'name: Value is required.'
  
  
  
   I want that 'User: Value is required.' is displayed.
  
  
  
   Thanks for any help
 



--

http://www.irian.at

Your JSF powerhouse -
JSF Consulting, Development and
Courses in English and German

Professional Support for Apache MyFaces


Re: display label in error message instead of id

2006-02-17 Thread Mario Ivankovits
Hi!

Ok, I found a problem if one uses outputText as child of outputLabel.
Its fixed now.

As a workaround now you can get rid of outputText and use the value=
attribute in outputLabel directly.

eg.
h:outputLabel for=input value=label /
h:inputText id=input required=true /

Ciao,
Mario



RE: display label in error message instead of id

2006-02-17 Thread Michael Heinen
Thanks a lot for your help.
Now it works of course :-)


-Original Message-
From: Mario Ivankovits [mailto:[EMAIL PROTECTED] 
Sent: Freitag, 17. Februar 2006 11:58
To: MyFaces Discussion
Subject: Re: display label in error message instead of id

Hi!

Ok, I found a problem if one uses outputText as child of outputLabel.
Its fixed now.

As a workaround now you can get rid of outputText and use the value=
attribute in outputLabel directly.

eg.
h:outputLabel for=input value=label /
h:inputText id=input required=true /

Ciao,
Mario



RE: display label in error message instead of id

2006-02-17 Thread Mike Duffy
Thanks for figuring this out.

I had the exact same problem.

If you look at the JSF book by Kito Mann, p 26, it shows an h:outputText .../ 
wrapped in an
h:outputLabel.../ which is unnecessary (overall, it's a good book).

Thanks again.

Mike



--- Michael Heinen [EMAIL PROTECTED] wrote:

 Thanks a lot for your help.
 Now it works of course :-)
 
 
 -Original Message-
 From: Mario Ivankovits [mailto:[EMAIL PROTECTED] 
 Sent: Freitag, 17. Februar 2006 11:58
 To: MyFaces Discussion
 Subject: Re: display label in error message instead of id
 
 Hi!
 
 Ok, I found a problem if one uses outputText as child of outputLabel.
 Its fixed now.
 
 As a workaround now you can get rid of outputText and use the value=
 attribute in outputLabel directly.
 
 eg.
 h:outputLabel for=input value=label /
 h:inputText id=input required=true /
 
 Ciao,
 Mario
 
 


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 


Re: display label in error message instead of id

2006-02-16 Thread Bruno Aranda
Sure, there is an easy solution. Use the extended messages component
from tomahawk (t:message).

Regards,

Bruno

On 2/16/06, Michael Heinen [EMAIL PROTECTED] wrote:



 Hi all,



 I try to display the label of a field instead of the id in an error message,
 but I don't get it to work.

 I'm sure there is an easy solution for it.



 Here is my code:



 Messages:

 login.name = User



 JSP:

 h:outputLabel for=name

h:outputText value=#{msgs['login.name']}/

 /h:outputLabel

 h:panelGroup

 h:inputText id=name value=#{LoginControllerBean.name}
 styleClass=inputField required=true /

 h:message for=name styleClass=errorText/

 /h:panelGroup



 The following message is displayed if the name field is empty after submit:

 'name: Value is required.'



 I want that 'User: Value is required.' is displayed.



 Thanks for any help


RE: display label in error message instead of id

2006-02-16 Thread Michael Heinen
Thanks Bruno.

I replaced my h:message tag with t:message but without success.

I added replaceIdWithLabel=true but this does not change anything.
Unfortunately I can't access the online API docs.

Do you have another hint for me ?


Michael

-Original Message-
From: Bruno Aranda [mailto:[EMAIL PROTECTED] 
Sent: Donnerstag, 16. Februar 2006 08:47
To: MyFaces Discussion
Subject: Re: display label in error message instead of id

Sure, there is an easy solution. Use the extended messages component
from tomahawk (t:message).

Regards,

Bruno

On 2/16/06, Michael Heinen [EMAIL PROTECTED] wrote:



 Hi all,



 I try to display the label of a field instead of the id in an error
message,
 but I don't get it to work.

 I'm sure there is an easy solution for it.



 Here is my code:



 Messages:

 login.name = User



 JSP:

 h:outputLabel for=name

h:outputText value=#{msgs['login.name']}/

 /h:outputLabel

 h:panelGroup

 h:inputText id=name value=#{LoginControllerBean.name}
 styleClass=inputField required=true /

 h:message for=name styleClass=errorText/

 /h:panelGroup



 The following message is displayed if the name field is empty after
submit:

 'name: Value is required.'



 I want that 'User: Value is required.' is displayed.



 Thanks for any help


Re: display label in error message instead of id

2006-02-16 Thread Volker Weber
see:
http://myfaces.apache.org/tomahawk/tlddoc/t/message.html

regards,
  Volker

Dave wrote:
 Where to find doc for (t:message)? I looked at Apache Faces, but I could
 not find it.
 Thanks!
 
 */Bruno Aranda [EMAIL PROTECTED]/* wrote:
 
 Sure, there is an easy solution. Use the extended messages component
 from tomahawk (t:message).
 
 Regards,
 
 Bruno
 
 On 2/16/06, Michael Heinen wrote:
 
 
 
  Hi all,
 
 
 
  I try to display the label of a field instead of the id in an
 error message,
  but I don't get it to work.
 
  I'm sure there is an easy solution for it.
 
 
 
  Here is my code:
 
 
 
  Messages:
 
  login.name = User
 
 
 
  JSP:
 
 
 
 
 
 
 
 
 
 
  styleClass=inputField required=true /
 
 
 
 
 
 
 
  The following message is displayed if the name field is empty
 after submit:
 
  'name: Value is required.'
 
 
 
  I want that 'User: Value is required.' is displayed.
 
 
 
  Thanks for any help
 
 
 
 Relax. Yahoo! Mail virus scanning
 http://us.rd.yahoo.com/mail_us/taglines/virusall/*http://communications.yahoo.com/features.php?page=221
 helps detect nasty viruses!

-- 
Don't answer to From: address!
Mail to this account are droped if not recieved via mailinglist.
To contact me direct create the mail address by
concatenating my forename to my senders domain.