Wondering how you programmatically create a flow and use it?
1. Create the Java annotated flow
2. Create the pages
package flow;import java.io.Serializable;import javax.enterprise.inject.Produces;import javax.faces.flow.Flow;import javax.faces.flow.builder.FlowBuilder;import javax.faces.flow.builder.FlowBuilderParameter;import javax.faces.flow.builder.FlowDefinition;public class EnterFlow...
When I posted JSF Tip #32 - Override a JSF renderer Twitter user @john_waterwood asked me how you would define a new tag for an existing component and the overridden renderer. Well it is fairly easy, see the 2 steps below!
1. Create your renderer
2. Register it
Creating your renderer
package org.glassfish.jsf.overrideRenderer;import java.io.IOException;import javax.faces.component.UIComponent;...
In a previous blog entry I blogged about stateless JSF before, this time I will include the entire page so you can see how silly simple it actually is. And you can also go directly to Subversion to get the sample there.
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...
If you read the blog entry about migrating to @Named annotation you might wonder how you would migrate your @ManagedProperty annotations.
Since CDI is a specification on its own, it does not deal with JSF specific artifacts. However with very little work you can have a very similar setup.
First we define our own custom annotation @ManagedProperty
package test.managedproperty;import java.lang....
See the release notes for what was fixed. If you want to download it, see this page for more information.
This blog shows how to use Bean Validation with JAX-RS
Since Mojarra is available as a standalone JAR you can opt to update your Glassfish installation with a newer version. How would you do that? Well it is simple.
Make sure your Glassfish container is not running
Grab the latest JAR from http://repo1.maven.org/maven2/org/glassfish/javax.faces/
Replace the javax.faces.jar in the modules directory of your Glassfish directory with the downloaded JAR...
Sometimes when you are working with JSF you might need to understand what is happening beneath the covers. It could be because you think a component is misbehaving and you want to make sure that is the case before you file a bug. To facilitate this you can turn the logging up and in Mojarra there are several loggers that you can use.
The following is a non-exhaustive list:
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.
<property name="eclipselink.logging.level" value="FINEST"/>...
Developing RESTful Services with JAX-RS 2.0, WebSockets, and JSON
I’ve been talking about JSF 2.2 new features out on the conference trail for quite a while now. I usually talk about the big three: Flows, Resource Library Contracts, and HTML5 Friendly Markup. This blog entry talks about another, mostly behind-the-scenes, feature: ClientWindow. I introduce the concept of ClientWindow and give a simple example illustrating one solution to a common web browser problem: the browser’s "open in new tab” or "open in new window” feature.
What happens if you configure a Hadoop-centric scalable big data infrastructure running on the Amazon EC2 cloud, that's programmed to perform some very basic processing on delimited ASCII data records (about 30 characters in each record), and you feed it a single data record? ...
Java User Groups
a little discussion in a television series here that i am the speaker. the topic is Java. The host, TV Excelence, said any update for Java and why Java is silence now.
I said there are Java worlds which use Java but we cannot said it is Java, but use Java.
1. BigData with Hadoop under Apache , is a new ecosystem that based on Java.
2. Smartphone/Gadget with Android under Google with Apache...
A brief report on Silicon Valley Code Camp 2013
Recently, I was asked to participate in creating another Java application at my company.
It was to be our team's third major Java application since 2002.
We felt we had plenty of wisdom from our previous two Java applications to apply to our third one.
One of our first steps was to form an application architecture sub-team.
This sub-team's purpose was to provide the development team with a solid...
Java Web Services and XML
Here are the details of my sessions at Silicon Valley Code Camp
This blog entry summarizes my session participation at JavaOne 2013. I plan to update this entry with links to the content on Parleys.com as it becomes available.
Government... Isn't interacting with it your favorite social pastime? What? It's not? OK, so what don't you like about it? What? You're saying that, in your country, you can't just log into your favorite government sites and experience speedy, reliable, secure services? I'll guess, then, that you must not live in Ecuador... Poor you! ...
At the JavaOne 2013 Java Technical Keynote, there was a series of demos of software that enables two people to play chess, using some of Java's latest features, including Java EE 7 Websockets, many variations of Java 8 (recent weekly builds), Lambda Expressions, Java ME, Embedded Java, ... It was an impressive demo of many of Java's recently-released and not-yet-finally-released capabilities, which included the introduction of the DukePad...