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

Blogs by topic: Web Applications

• 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

Not so long ago Mark Halvorson mentioned in his presentation at the Magnolia Conference 2012 that he doesn't understand why he can't have versioning for templates in Magnolia the same way he has it for content. Then I thought why not? Should be pretty straightforward. The first implementation was indeed easy. Similar to what Magnolia does when dealing with DMS documents - I just configured a...
on Nov 7, 2012
As mentioned in my talks at JavaOne San Francisco 2012, JSF 2.2 will include a new feature I'm calling HTML(5) Friendly Markup. I owe a debt of thanks to Frank Caputo for collaborating with me on ideas and code for the feature, including the code example from this blog entry. The JSR-344 Expert Group also deserves mention. In true lean fashion, this code sample is taken directly from TDD tests...
on Nov 1, 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". <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? <html xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core">  <h:outputText value="#{user.income}">   <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
Introduction to JSF Converters During the JSF lifecycle each input value needs to be converted. As such the JSF runtime allows you to write converters that will take care of that during request processing. Several standard converters are part of the standard JSF runtime. Note that the specification has been written with extension in mind so it is also possible to write your own converter...
on Sep 21, 2012
The LengthValidator is one of the standard validators that is specified by the JavaServerFaces specification. It allows you to verify (validate) if the proposed input (submitted value) on a given component is valid. Say you want to make sure the minimum length of a password is 6 characters and up to 12 characters. The example below describe how you would put this into a JSF page to make that...
on Sep 4, 2012
During the JSF lifecycle each input value can be validated. As such the JSF runtime allows you to write validators that will take care of that during request processing. Several standard validators are part of the standard JSF runtime. Note that the specification has been written with extension in mind so it is also possible to write your own validator and hook it up for request processing...
on Sep 1, 2012

JavaOne

SOAP and/or REST and/or WebSockets Table of Contents 1 Intro 1.1 BOF6984 : SOAP and/or REST and/or WebSockets 1.2 disclaimer 1.3 JavaOne / Oracle 1.4 other WebSockets presentations 1.5 other WebSockets presentations 1.6 other SOAP presentations 1.7 other REST presentations 1.8 other REST presentations 1.9 discussion points 1.10 discussion points 1.11 discussion points 1.12 discussion points...
on Oct 2, 2012

Web Applications

If you want to make sure a value is within given Long range then the LongRangeValidator is for you! Say you want to make sure your users are at least 13 but at most 18. <html xmlns:h="http://java.sun.com/jsf/html"  xmlns:f="http://java.sun.com/jsf/core">  <h:inputText value="#{user.age}">   <f:validateLongRange...
on Sep 5, 2012
Introduction Server-Sent Events (SSE) is a standard describing how servers can initiate data transmission towards clients once an initial client connection has been established. It is commonly used to send message updates or continuous data streams to a browser client and designed to enhance native, cross-browser streaming through a JavaScript API called EventSource, through which a client...
on Apr 21, 2012

Web Design

The definition of a Validator according to the Validator interface: void validate(FacesContext context, UIComponent component, Object value) throws ValidatorException The Faces Context is passed in so the validator can introspect various aspects of the request and response. The UI component is passed in because the actual value will be stored in that UI component after it has been...
on Sep 3, 2012

Servlets

Server-Sent Events (SSE) is part of HTML5 specifications that can be used to push notifications from a server on a HTTP connection. A developer can implement it on top of a servlet but he has to know the details of wire format. We added bit of abstraction so that a developer doesn't have to deal with the wire level details and can work on actual application. The heart of the abstraction is a...
on Apr 20, 2012