getter « Data « JSF Q&A

1. JSF 1.2 - Does PostConstruct execute before or after getters

I have this code for a backing bean:

 public void refreshData()
  rows  = (int) dd.getRows();
  pages = dd.getPages();

// action
 public void getCount(String sql, Object... ...

2. Why JSF calls getters multiple times

Let's say I specify an outputText component like this:

<h:outputText value="#{ManagedBean.someProperty}"/>
If I print a log message when the getter for someProperty is called and load the page, it is trivial to notice ...

3. JSF getter methods called BEFORE beforePhase fires

I got a recommendation to put all data lookups in the beforePhase for a given page, however, now that I am doing some deeper analysis it appears that some getter methods ...

4. JSF 2 Lifecycle

I have this code for

@Table(name = "BOOK")
@NamedNativeQuery(name = "BookModel.findBookTitle", query = "SELECT @rownum:=@rownum+1 'no', m.title,, REPLACE(SUBSTRING_INDEX(m.content, ' ', 30), '<br>', ' '), m.viewed, m.hashid FROM book m, (SELECT @rownum:=0) ...

5. Figuring out why JSF getters are called when I don't expect them to be called

I'm working with jsf 2 and I'm getting some behaviour which I find hard to explain or understand. I have several independent h:forms. one of which looks like this:


6. How to get rid of getters and setters from the Netbeans Navigator window

It is not uncommon to create many getters and setters in a Java class. In many of the circumstances, we don't really need them but have to create them due to ...

7. getter method error handling

9. getters and setters

10. Getter called too many times

11. NullPointerException in getter method

12. jsf getter is calling more than once