Skip to main content
View by: Most Recent | Topic | Community | Webloggers   
Monthly Archives:    

Blogs by topic J2EE and user mriem

• Accessibility • Ajax • Blogging • Business • Community 
• Databases • Deployment • Distributed • Eclipse • Education 
• EJB • Extreme Programming • Games • GlassFish • Grid 
• GUI • IDE • Instant Messaging • J2EE • J2ME 
• J2SE • Jakarta • JavaFX • JavaOne • Jini 
• JSP • JSR • JXTA • LDAP • Linux 
• Mobility • NetBeans • Open Source • OpenSolaris • OSGi 
• P2P • Patterns • Performance • Porting • Programming 
• Research • RMI • RSS Feeds • Search • Security 
• Servlets • Struts • Swing • Testing • Tools 
• Virtual Machine • Web Applications • Web Design • Web Development Tools • Web Services and XML 


J2EE

Say you have a problem with how a particular component renders and you want to do it a bit different. Well in JSF that is not a problem there is a hook-in that you can use to override how a renderer does it rendering. The sample below shows you how to do it. You will have to do 2 things. 1. Register your own renderer for a given renderer type 2. Implement your own renderer. First lets make sure...
on Nov 5, 2013
JavaEE 7 and Glassfish 4.0 were released a little while ago. What is in the future? Well, see the Aquarium blog for the latest Glassfish Roadmap. And that is it. Enjoy!
on Nov 4, 2013
If you started reading because of the title I got you! Anyway all jokes aside the JCP process is quite unique. It has been serving the purpose of the Java community for quite a while. In the past people have complained that you could only file or influence JSRs if you were part of a big company. Well that has been a thing from the past. For a while now it is possible to join the JCP in different...
on Nov 3, 2013
Tyrus 1.3 has been released, get more information here. Or download it from here. Glassfish users should take all the Tyrus JAR files and replace them in the modules directory with the downloaded ones to get Tyrus 1.3 working in Glassfish. And that is it. Enjoy!
on Nov 2, 2013
See the release notes for what was fixed. If you want to download it, see this page for more information. Enjoy!
on Oct 31, 2013
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 Be aware that...
on Feb 8, 2013
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!   <b>Java Datatype</b>        ...
on Dec 26, 2012
The following blog articles are part of the JSF State Saving series Introduction to JSF State Saving The JSF State Saving APIs The JSF StateHolder API The JSF PartialStateHolder API The StateHelper API
on Dec 19, 2012
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)  ...
on Dec 15, 2012
The definition of a PartialStateHolder according to the PartialStateHolder interface:   void clearInitialState()   boolean initialStateMarked()   void markInitialState()   Note that the methods above do not mention that a PartialStateHolder extends from StateHolder. Be aware that if you want to implement partial state saving you will also need to implement the methods...
on Oct 18, 2012
The definition of a StateHolder according to the StateHolder interface:   boolean isTransient()  void restoreState(FacesContext context, Object state)  Object saveState(FacesContext context)  void setTransient(boolean newTransient) Each of the methods mentioned above have a particular role to fulfill during the JSF lifecycle. Transient or not The setTransient method can...
on Oct 17, 2012
Since state saving happens as part of the JSF lifecycle a component, validator, converter, etcetera that wants to participate in state saving can do so by implementing or using one or all of the below mentioned APIs. StateHolder PartialStateHolder StateHelper StateHolder This is the original API that a component needs to implement if it wants to participate in what is now considered full state...
on Oct 16, 2012
During the JSF lifecycle state will be restored at the beginning of a request (if any state is available) and state will be saved at the end of a request (if any state is available). Why is it important to know what happens during request processing? Well, if you know how JSF state saving works you can optimize your application to perform better. The next blog entry will describe one of...
on Oct 16, 2012
The following blog articles are part of the JSF Converter series Introduction to JSF Converters The JSF Converter API The NumberConverter The DateTimeConverter Writing your own Converter Packaging your JSF Converter
on Oct 11, 2012
In the previous blog entry you learned how to write your own converter. Say you want to distribute this converter to others. How can you make sure the JSF runtime knows about the converter without needing to add it to the faces-config.xml of the web application. As described in the previous blog entry you need to register the converter in a faces-config.xml. To make it a redistributable...
on Oct 5, 2012
Writing you own converter is a pretty straight forward process. It really comes down to implementing the Converter API. Say you want to write a converter that will convert colors. Lets assume we support, "Red", "Green" and "Blue".   package color;  public class ColorConverter implements Converter {    public Object getAsObject(FacesContext context, UIComponent...
on Oct 4, 2012
How would you use the JSF DateTimeConverter? If you are working with dates you probably have had a need to display them in the correct format, or even had to parse them? Well, lets start off with using dateStyle. The example below will use the "long" date style as defined by the server Locale. Valid values are "default", "short", "medium", "long", and "full". &lt;html xmlns:h="http...
on Oct 3, 2012
How do you use the JSF NumberConverter? If you are outputting a value, how would you show a currency code along with it? &lt;html xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core">  &lt;h:outputText value="#{user.income}">   &lt;f:convertNumber currencySymbol="USD" type="currency"/...
on Oct 2, 2012
See what the JSF Validator API is about! The definition of a Converter according to the Converter interface:   Object getAsObject(FacesContext context, UIComponent component, String value)  String getAsString(FacesContext context, UIComponent component, Object value) The Faces Context is passed in so the converter can introspect various aspects of the request and response. The UI...
on Sep 21, 2012

Databases

If you are having a problem with your JPA queries and you are trying to understand what SQL queries it actually sends below the covers you can configure the JPA runtime to show the actual SQL statements it sends over. How? Well for EclipseLink you would add the following to your persistence.xml file.   &lt;property name="eclipselink.logging.level" value="FINEST"/>...
on Oct 27, 2013