What You Need To Build Cool Enterprise Applications With JSF [Slides]

Slides from my JavaOne 2011 conference talk in San Francisco.

Published by

26 responses to “What You Need To Build Cool Enterprise Applications With JSF [Slides]”

  1. Hi Maxa,

    I need to highlight the labels when validation occurs. I gone through your example (How to hightlight a field in JSF when validation fails ) it is working fine .

    But there are lots of components in my page for each component I am writing separate method to highlight when validation fails . Is there any possibility to write generic one for highlighting all fields.

  2. @ravi: there is another example here: http://cagataycivici.wordpress.com/2011/04/04/styling-invalid-input-fields-with-jsf/.

    If you are using JSF 1.2, you could try adding Seam. Seam has such feature built-in.

  3. Hi Maxa,

    Thanks for your reply.

    Actually my requirment is any type of validation i.e jsf validation or validatiors validation or custom validations. When any of this validation fails we are displaying by tag.
    If any validation occurs corresponding Textbox label should become red.

    We have 200 pages . Each page has at least 20 components.

    They want code to be generic. so that in future problems may not arise .

    So, could u please suggest solution for this. I am running my time on this.

  4. @ravi: Seam has s:validateAll tag allows you wrap all the fields on which you would like to invoke validation and mark them when validation fails. The only other option is to create a custom tag, I believe.

  5. Hi Maxa,

    75% of my work done with the following link that u have sent.

    http://cagataycivici.wordpress.com/2011/04/04/styling-invalid-input-fields-with-jsf/. you have give I implemented with some modifications it is working fine(i.e for label color change) for JSF validations like required =”true” and for our own validatiors.

    The same i.e label color change should work for the business validations. Could u suggest what to do.

    Thanks & Regards ,
    Ravikumar.

  6. @ravi: what’s a business validation?

  7. ex:Login validation if I am failing to give correct credentials( This will check from the database) it will display the error message at the top. When error message was displayed the label color should change.

  8. @ravi: not sure how I can help you, you just need to write the logic for that.

  9. Thanks Maxa

    I will implement it.

  10. Hi Maxa,

    At last I am coming to you for solution I tried it in many ways but not working.

    Problem:

    After successful validation I have to display all the fields readonly. All the fields are in read only except rich calender (Input text was in read only but calender image is not read only when I click on it it is displaying )

    Pls suggest a solution I will be very thankful to you.

  11. @ravi: I’m not sure whether you can disable opening the calendar popup. The calendar could be bound to a custom data model in which you can disable date selection.

  12. Hi Max,

    Just I have a doubt in rich faces.

    I am using (richfaces V4)). Basically we get 8 records from data base and rows will be 4 then there will be 2 pages(displayed by using dataTable) . So, when user clicks next it has to get next 8 records (exists) and update to list that is displayed in table( now 4 pages ).

    When I try to use

    It is not hitting backing bean. I used action and action listiner also .

    Could u please help me out in this what I have to do.

    Thanks & Regards,
    Ravikumar.K

  13. @ravi: I don’t see the code, please include it via http://pastie.org

  14. In .xhtml

    In backing Bean

    public void scrollListenerCheck(DataScrollEvent event){
    System.out.println(“Checking for Scroll event”);

    }

    and I used actionListener also still it is not working.

    Thanks & Regards,
    Ravi

  15. @ravi: please include the code via http://pastie.org (or similar service)

  16. Hi max,

    This is the link
    http://pastie.org/3152637

    Thanks & Regards,
    Ravi

  17. @ravi: I think the listener has to be invoked like this: scrollerListener=”scrollerCheck”

  18. Hi Max,

    Thanks for the reply.

    I used scrollerListener=”scrollerCheck” still it is not triggering action.

    I had gone through the attributes of even onclick , actionListener is not working . Only few attributes are working like
    for=”instSrchRsltTable” id=”scroll” maxPages=”1″ fastControls=”hide” .

    Is there any other way of calling backing bean when clicking next button in scroller.

    Thanks & Regards,

    Ravi

  19. @ravi: one more thing, it should be like this: scrollerListener=”scrollListenerCheck”

  20. Hi max ,

    In java class I used like this

    public void scrollerCheck(DataScrollEvent event){
    System.out.println(“Checking for Scroll event”);

    }

    Thanks & Regards,

    Ravi

  21. @ravi: not sure what the problem might be. Are you using the latest RichFaces 4.1? I’d post this question on RichFaces forum.. maybe someone else had the same problem.

  22. Hi max,

    I am using richfaces 4.1.

    ActonListener is working with tomhawks datascroller. But tomhawks datascroller is not providing much features comparing with richfaces datascroller.

    Thanks & Regards,

    Ravi

  23. Hi Max,

    I am facing problem while saving the state of .

    I followed your link

    http://mkblog.exadel.com/2008/12/keeping-richpanelmenu-state/

    and did .

    The problem is while loading the navigation.xhtml . are getting unselected and it is showing the .

    When I click on any from then every thing is working fine.

    Code attached.

    http://pastie.org/3335737

    I am not understanding where I am doing wrong. Could you please help me out in this.

  24. Hi Max,

    I am facing problem while saving the state of .

    I followed your link

    http://mkblog.exadel.com/2008/12/keeping-richpanelmenu-state/

    and did .

    The problem is while loading the navigation.xhtml . all rich:panelMenuGroup are getting unselected and it is showing the . rich:panelMenuItem is showing.

    When I click on any from then rich:panelMenuItem every thing is working fine.

    Code attached.

    http://pastie.org/3335737

    I am not understanding where I am doing wrong. Could you please help me out in this.

    Thanks & Regards,
    Ravi

  25. @ravi: when you load the page for the first time, the object to which the menu is bound, needs to be initialized to the correct value for the menu item to be selected.

  26. Thank you So, much max it is working fine

Leave a Reply to ravi Cancel reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.