Skip to main content

Manfred Riem

I love working with a broad range of technologies. At work it is mostly JavaEE and JavaSE technologies, as a hobby I do some Java on devices.

 

mriem's blog

JavaEE 7 Tech Kit

Posted by mriem on August 15, 2013 at 2:58 PM PDT

Are you interested in JavaEE 7 but do not know where to start? Have a look at the JavaEE 7 Tech Kit!

JSF Tip #27 - Do not put code with side effects in a getter method

Posted by mriem on July 31, 2013 at 11:52 AM PDT

What is wrong with the code below?

  @Named
  @RequestScoped
  public class ExampleBean implement Serializable {

    public List getItems() {
      ArrayList items = new ArrayList();
      items.add("TEST1");
      items.add("TEST2");
      return items;
    }
  }

JSF Samples Update

Posted by mriem on April 5, 2013 at 12:21 PM PDT

More programmer to programmer samples on the JSF Samples Github repo. Follow this link.

JSF 2.2

Annotated Flow Enter
Enter and Exit Flow
Passthrough
Style and Layout Resource Library Contract
View-based Resource Library Contract

Emjoy!

JSF Samples

Posted by mriem on March 29, 2013 at 7:18 AM PDT

If you like from programmer to programmer samples you'll love the GitHub javaserverfaces-samples repo. Follow this link

JSF is going spec Stateless

Posted by mriem on February 28, 2013 at 8:22 AM PST

Just wanted to let you all know that the changes to support stateless in JSF are going to be making it into the official JSF 2.2 specification and as such will be supported by all JSF implementations. Enjoy!

JSF Tip #26 - JSF is going Stateless

Posted by mriem on February 8, 2013 at 7:03 AM PST

If you have wanted JSF not to store any state now is your chance to try out the stateless mode of JSF.

It is as easy as doing the following:

<f:view transient="true">
  Your regular content
</f:view>

And voila you are running stateless.

If you decide you do want some state to be kept at the server you can use the @xxxScoped annotations on your beans

JSF Tip #25 - The default JSF Converters

Posted by mriem on December 26, 2012 at 7:23 AM PST

Whenever the JSF runtime needs to perform a conversion it uses a Converter to do so. As explained in previous blog entries you have the ability to implement your own Converter. But does that mean you need to implement it for simple conversions? No, you do not, the default JSF converters come to the rescue!

    
  
  

JSF Tip #24 - The JSF State Saving summary

Posted by mriem on December 19, 2012 at 7:14 PM PST

The following blog articles are part of the JSF State Saving series

JSF Tip #23 - The StateHelper API

Posted by mriem on December 15, 2012 at 10:04 AM PST

To facilitate component developers a convenience API was introduced to make it easier to implement the state saving requirements. Access to this API is made available through UIComponent.getStateHelper().

The API defines the following methods:

  void add(Serializable key, Object value) 
  Object eval(Serializable key) 
  Object eval(Serializable key, Object defaultValue) 
    
  
  

JSF Tip #22 - The JSF PartialStateHolder API

Posted by mriem on October 18, 2012 at 8:53 PM PDT

The definition of a PartialStateHolder according to the PartialStateHolder interface: