Skip to main content

JSF 2.0 Tutorial: New Section on "ui:repeat and Variable-Length Data"

2 replies [Last post]
martyhall
Offline
Joined: 2009-08-19
Points: 0

Today I uploaded a new section to http://www.coreservlets.com/JSF-Tutorial/jsf2/ This new section is entitled "ui:repeat and Handling Variable-Length Data".

It has two main parts:

- Options for dealing with arrays and lists (bean getter methods, composite components, h:dataTable, ui:repeat). It briefly covers the pros and cons of each, with short examples.

- Details on ui:repeat, with longer examples.

I would appreciate gentle feedback from both beginners (is it understandable?) and experts (what errors and omissions did I make?).

Thanks!

Cheers-

- Marty
Live JSF 2.0 Training Course: http://courses.coreservlets.com/public-courses/jsf2/

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Joel Weight

I'm going from the pdf. I thought it was very good overall. I especially
liked the Advanced Features section.

I consider myself an "advanced beginner", just shy of an intermediate
jsf/facelets user.

slide 7: you have h:repeat instead of ui:repeat.

slide 15: I would think a major con of the first approach would be that the
html is compiled into a java class. Even if you extract it into a
properties file or whatever, it seriously impacts the development cycle when
you have to rebuild a java file and reload a webapp rather than tweaking a
.xhtml file and hitting reload in the browser. You skim this topic in your
con regarding the page author not having control but it may be worth an
explicit mention of this con.

slide 38: I had to read the caveat several times. We have been talking
about ui:repeat over and over and over, and suddenly the caveat refers to
ui:include, but I read it ui:repeat. Probably more my problem than a
problem with the tutorial.

slide 56: This isn't an EL tutorial, so this may be more confusing than
helpful, but the code snippet could be rewritten, going from:

value="#{programmer.languages}" varStatus="status">

  • #{language}

  • #{language}

  • to this:
    varStatus="status">

  • #{language}
  • Thanks,
    Joel Weight

    On Thu, Feb 18, 2010 at 12:28 PM, wrote:

    > Today I uploaded a new section to
    > http://www.coreservlets.com/JSF-Tutorial/jsf2/ This new section is
    > entitled "ui:repeat and Handling Variable-Length Data".
    >
    > It has two main parts:
    >
    > - Options for dealing with arrays and lists (bean getter methods, composite
    > components, h:dataTable, ui:repeat). It briefly covers the pros and cons of
    > each, with short examples.
    >
    > - Details on ui:repeat, with longer examples.
    >
    > I would appreciate gentle feedback from both beginners (is it
    > understandable?) and experts (what errors and omissions did I make?).
    >
    > Thanks!
    >
    > Cheers-
    >
    > - Marty
    > Live JSF 2.0 Training Course:
    > http://courses.coreservlets.com/public-courses/jsf2/
    > [Message sent by forum member 'martyhall' (hall@coreservlets.com)]
    >
    > http://forums.java.net/jive/thread.jspa?messageID=387440
    >
    > ---------------------------------------------------------------------
    > To unsubscribe, e-mail: webtier-unsubscribe@glassfish.dev.java.net
    > For additional commands, e-mail: webtier-help@glassfish.dev.java.net
    >
    >
    [att1.html]

    martyhall
    Offline
    Joined: 2009-08-19
    Points: 0

    Wow! I never expected a reply that was both so fast and so helpful. Thanks Joel!

    I updated the tutorial to take [b]all [/b]of your comments into consideration, including a slide specifically drawing attention to your #{condition ? 'val1' : 'val2'} alternative and a comment about the hot-deploy drawback of the bean option. The updated version should be live now.

    BTW, the java.net forums do not automatically escape HTML characters, so your example on alternatives to ui:fragment was hard to read on the forum page. AFAIK, posters have to manually go through their posting and change '<' to '&lt;'. If there is a better way, I'd love to hear about it.

    Thanks again! Cheers-

    - Marty
    -------
    Live JSF 2.0 Training Course: http://courses.coreservlets.com/public-courses/jsf2/