How can i Customize the style of Feedback Messages ?

2008-03-11 Thread Alonso Sanchez, Daniel
Hi again folks! Thanks for replying me to my first question, it wordked!
If you don't remember, I asked about how to show feedback messages
associated only with a field, so I can show a message next to a input
field.

 

The next step is that I'm trying to change the default behaviour in
order to put a simple html image tag instead of the default
ullimessage1/lilimessage2/li/ul

 

The html code that I'm getting at this moment is this:

 

td wicket:id=errorsSfidwicket:panel
  ul wicket:id=feedbackul
li wicket:id=messages class=feedbackPanelERROR
  span wicket:id=message class=feedbackPanelERRORlt;img
src=quot;image.jpgquot; /gt;/span
/li
  /ul
/wicket:panel
 
The thing is that I'm putting the image tag as a property, but I don't
know how to change this, in order to show only the image tag?
 
Any kind soul knows how to solve this? Your help would be very
appreciated :D. Thanks in advance.
 
 
Daniel Alonso

 



RE: How can i Customize the style of Feedback Messages ?

2008-03-11 Thread Alonso Sanchez, Daniel

Hi again! Firstly, thanks a lot Vitek for your help. I have been testing
a couple of things related with your response, and only the
setEscapeModelStrings has solve a part of the solution.

Through Google I have seen a solution for extend ComponentFeedbackPanel
and write my own html code, but it doesn't work too.

At this moment I have this situation:

Part of the Page1.class


MyComponentFeedbackPanel panelErrorSfid=null;
TextField sfid = new TextField(sfid);
sfid.setRequired(true);  
sfid.add(StringValidator.maximumLength(15));
sfid.setLabel(new Model(sfid));
sfid.setEscapeModelStrings(true);
sfid.setRenderBodyOnly(false);
  add(sfid);
  panelErrorSfid=new MyComponentFeedbackPanel(errorsSfid,
sfid);
  add(panelErrorSfid);

-


MyComponentFeedbackPanel
-

public class MyComponentFeedbackPanel extends ComponentFeedbackPanel {
 /**
 * 
 */
private static final long serialVersionUID = 1L;

public MyComponentFeedbackPanel(String id,Component componente)
{
super(id,componente);
}
}


HTML'S

Page1.html


wicket:extend
span wicket:id=feedback/span

form wicket:id=altaPrepagoForm
div id=contacts
div class=contact
table
tr
td
Sfid
/td
td
input wicket:id=sfid type=text/
/td
td wicket:id=errorsSfid
/td
/tr
/table
/div
  /div
/form
/wicket:extend

--


MyComponentFeedBackPanel.html
-

wicket:panel
div wicket:id=feedbackul
div wicket:id =messages
p wicket:id=message /
 
/div
/div
  
/wicket:panel



Properties (Page1.properties)
-

altaPrepagoForm.sfid.Required=img src=pepe.jpg /












Sorry for the code :D. The thing is that I want to delete (if could be
possible), the extra divs associated to feedbackul and messages, and use
wicket:id=message to show an image, but I don't know how to do it. 

My goal is to show an image icon next to each erroneous input field :D

Thanks in advance, an sorry for my English




Hallo,
apparently you want to have a look at
setEscapeModelStrings()
and
setRenderBodyOnly()
methods of the Label.

Vitek

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: How can i Customize the style of Feedback Messages ?

2008-03-11 Thread Alonso Sanchez, Daniel
Fantastic! Sorry for disturbing :P Thanks again 

-Mensaje original-
De: Gerolf Seitz [mailto:[EMAIL PROTECTED] 
Enviado el: martes, 11 de marzo de 2008 12:39
Para: users@wicket.apache.org
Asunto: Re: How can i Customize the style of Feedback Messages ?

 The things is that if there is an error, a red * is showed, not the
 image file I want... what things am I doing wrong?


subclass FormComponentFeedbackIndicator and provide your own markup:

MyFCFI.java:
class MyFCFI extends FormComponentFeedbackIndicator {
  ...
}

MyFcFI.html:
wicket:panelimg src=error.png//wicket:panel

  Gerolf



 Thanks again to everybody



 -Mensaje original-
 De: Gerolf Seitz [mailto:[EMAIL PROTECTED]
 Enviado el: martes, 11 de marzo de 2008 12:10
 Para: users@wicket.apache.org
 Asunto: Re: How can i Customize the style of Feedback Messages ?

 
  My goal is to show an image icon next to each erroneous input field
:D
 

 see FormComponentFeedbackBorder or FormComponentFeedbackIndicator

  Gerolf

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: How can i Customize the style of Feedback Messages ?

2008-03-11 Thread Alonso Sanchez, Daniel
Thanks a lot Gerolf. Great suggestions.

I have been looking some docs, and nabble forum... but (again) I've got
a problem.


Finally my webpage class looks like this (just the important part :D ):

TextField sfid = new TextField(sfid);
 sfid.setRequired(true); 
 sfid.add(StringValidator.maximumLength(15));
 sfid.setLabel(new Model(sfid));
 sfid.setEscapeModelStrings(true);
 sfid.setRenderBodyOnly(false);
 panelErrorSfid=new
FormComponentFeedbackIndicator(errorsSfid);
 panelErrorSfid.setIndicatorFor(sfid);
 add(sfid);  
 add(panelErrorSfid);


And the html code...

input wicket:id=sfid type=text/span wicket:id=errorsSfidimg
src=error.png/span

The things is that if there is an error, a red * is showed, not the
image file I want... what things am I doing wrong?

Thanks again to everybody



-Mensaje original-
De: Gerolf Seitz [mailto:[EMAIL PROTECTED] 
Enviado el: martes, 11 de marzo de 2008 12:10
Para: users@wicket.apache.org
Asunto: Re: How can i Customize the style of Feedback Messages ?


 My goal is to show an image icon next to each erroneous input field :D


see FormComponentFeedbackBorder or FormComponentFeedbackIndicator

  Gerolf

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: How can i Customize the style of Feedback Messages ?

2008-03-11 Thread Alonso Sanchez, Daniel
Sorry again... just only one thing more (I promise this is the last).
Taking your advice as starting point... is there any way to add the
feedback message produced by the error to the image alt attribute?

Thanks again for all your help.

-Mensaje original-
De: Alonso Sanchez, Daniel [mailto:[EMAIL PROTECTED] 
Enviado el: martes, 11 de marzo de 2008 12:45
Para: users@wicket.apache.org
Asunto: RE: How can i Customize the style of Feedback Messages ?

Fantastic! Sorry for disturbing :P Thanks again 

-Mensaje original-
De: Gerolf Seitz [mailto:[EMAIL PROTECTED] 
Enviado el: martes, 11 de marzo de 2008 12:39
Para: users@wicket.apache.org
Asunto: Re: How can i Customize the style of Feedback Messages ?

 The things is that if there is an error, a red * is showed, not the
 image file I want... what things am I doing wrong?


subclass FormComponentFeedbackIndicator and provide your own markup:

MyFCFI.java:
class MyFCFI extends FormComponentFeedbackIndicator {
  ...
}

MyFcFI.html:
wicket:panelimg src=error.png//wicket:panel

  Gerolf



 Thanks again to everybody



 -Mensaje original-
 De: Gerolf Seitz [mailto:[EMAIL PROTECTED]
 Enviado el: martes, 11 de marzo de 2008 12:10
 Para: users@wicket.apache.org
 Asunto: Re: How can i Customize the style of Feedback Messages ?

 
  My goal is to show an image icon next to each erroneous input field
:D
 

 see FormComponentFeedbackBorder or FormComponentFeedbackIndicator

  Gerolf

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



FeedbackMessages per field

2008-03-10 Thread Alonso Sanchez, Daniel
 

 

 

De: Alonso Sanchez, Daniel 
Enviado el: lunes, 10 de marzo de 2008 10:39
Para: '[EMAIL PROTECTED]'
Asunto: FeedbackMessages per field

 

Hello everybody! I'm a newbie with wicket and during my first examples I
have had a problem that I don't know how to solve. The fact is that I
have the typical login form, and I want to notify the users possible
errors by showing an icon error next to each input field, just like
showed in the image attached.

 

Is there an easy way to do it, because I have been googleing, looking
the wiki, reading the ajax examples... but nothing suits at all. 

 

Thanks in advance for your kindness ;D

 

Daniel Alonso Sanchez

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]