just write your own feedbackpanel that works the way you want. look at
the source of the original one.

-igor


On Wed, Mar 12, 2008 at 5:25 AM, Daniel Alonso <[EMAIL PROTECTED]> wrote:
>
>  Hi again to everybody. After looking tons of examples related to wicket 1.2 I
>  have no idea of how i can do the next:
>
>  At this moment I cant show an error icon next to an erroneus field after
>  submitting a form. The thing is that i must include the message feedback
>  string as part of the "alt" property description.
>
>  At this moment, i have a MyFormComponentFeedbackIndicator attached to the
>  field i want to check, and when the error happens, the image is showed...
>  but i have no idea of how a can manage the problem of the "alt" image
>  attribute.
>
>  If you don't mind I'm going to attach some code:
>
>  MyFormComponentFeedbackIndicator
>  ------------------------------
>
>  public class MyFormComponentFeedbackIndicator extends
>                 FormComponentFeedbackIndicator {
>
>         /**
>          *
>          */
>         private static final long serialVersionUID = 1L;
>
>         private static final ResourceReference RESOURCE_REF = new
>  ResourceReference(Page2.class,
>     "error.png");
>         private FeedbackMessages        messages = null;
>         public MyFormComponentFeedbackIndicator(String id) {
>                 super(id);
>
>                 String prueba=null;
>                 prueba="";
>                 FeedbackMessage message=null;
>                 Image imagen=new Image("imageModelResourceReference", new
>  Model(RESOURCE_REF));
>
>                 messages = Session.get().getFeedbackMessages();
>                 Iterator it=messages.iterator();
>
>                 while (it.hasNext()){
>                         message=(FeedbackMessage)it.next();
>                         prueba=message.getMessage().toString();
>                 }
>                 imagen.add(new SimpleAttributeModifier("alt", prueba));
>                 add(imagen);
>         }
>  }
>
>
>  -------------------------------------
>
>  MyFormComponentFeedbackIndicator.html
>  ----------------------------
>  <wicket:panel> </wicket:panel>
>
>  piece of webpage class
>  ------------------------
>
>   MyFormComponentFeedbackIndicator panelErrorSfid=null;
>   sfid = new TextField("sfid");
>   sfid.setRequired(true);
>   sfid.add(StringValidator.maximumLength(15));
>   sfid.setLabel(new Model("sfid"));
>   panelErrorSfid=new MyFormComponentFeedbackIndicator("errorsSfid");
>   panelErrorSfid.setIndicatorFor(sfid);
>
>
>
>  Is there any solution?Thanks so  much in advance.
>  --
>  View this message in context: 
> http://www.nabble.com/Include-feedback-messages-description-on-%22alt%22-Image-property-tp16001976p16001976.html
>  Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
>  ---------------------------------------------------------------------
>  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]

Reply via email to