jsf messages have not been displayed urgent please

This topic contains 0 replies, has 1 voice, and was last updated by Profile photo of amir55 amir55 7 years, 5 months ago.

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #307911 Reply
    Profile photo of amir55
    amir55
    Participant

    dear all staff and colleagures

    I have a nice exmple using struts tiles on jsf example.

    I do not use the faces-context.xml for navigation but instead one simple java code.

    all is fine except one bug of displaying the h:messages added to the context.

    my simple code

    MessageFactory mf = new MessageFactory();
    FacesContext ctx = FacesContext.getCurrentInstance();

    ctx.addMessage(“registerForm:userName”,
    new FacesMessage(FacesMessage.SEVERITY_ERROR, mf.getMessage(“errorUsername”), null));

    Application application = ctx.getApplication( );
    ViewHandler viewHandler = application.getViewHandler( ); UIViewRoot view = viewHandler.createView(ctx, “/register/register.jsp”); ctx.setViewRoot(view);

    // now here I should get the register.jsp to display the added messages once visited.

    instead I get those messages displayed on the console why?

    I can send the application for recorrection by a jsf team.

    Iuse myeclipse, JBoss, jsf 1.2

    many thanks

Viewing 1 post (of 1 total)
Reply To: jsf messages have not been displayed urgent please