//AMIS Technology Blog » Archive for year 2006

Archive for year 2006

SIG Event

How to create a New Custom JSF Component that randomly displays select items in SelectOne… and SelectMany components

Selection components, such as Radio Buttons. Dropdown-lists, Lists, Shuttles  and Check Boxes, are key elements of many a web page. Java Server Faces has a pretty wide range of such selection widgets available, from selectOneRadio to selectManyCheckbox in the RI and a wide range of additional components in distributions such as ADF Faces and MyFaces. The options to choose from are specified through SelectItem and SelectItems elements. For example:

&lt;h:selectOneRadio id=&quot;colorchooser&quot; layout=&quot;pageDirection&quot;&gt;<br /> &lt;f:selectItem itemLabel=&quot;Brown&quot; itemValue=&quot;Brown&quot;/&gt;<br /> &lt;f:selectItem itemLabel=&quot;Red&quot; itemValue=&quot;Red&quot;/&gt;<br /> &lt;f:selectItem itemLabel=&quot;Blue&quot; itemValue=&quot;Blue&quot;/&gt;<br /> &lt;f:selectItem itemLabel=&quot;Yellow&quot; itemValue=&quot;Yellow&quot;/&gt;<br /> &lt;f:selectItem itemLabel=&quot;Green&quot; itemValue=&quot;Green&quot;/&gt; <br />&lt;/h:selectOneRadio&gt;<br /> &nbsp;<br />

The options are presented to the user in the order in which they are defined in the SelectItem and SelectItems elements. In most situations that is perfectly alright or More >

SIG Event

ADF BC – Fun with Bind Parameters Part Four – Choosing between various Pre-Canned Queries by leveraging the View Link bind-parameter

In this article on bind parameter usage in ADF Business Components, we will discuss a feature that I recently found out about and that I think offers a lot of potential. Unfortunately I do not think I quite grasp all the possibilities yet. However, since my understanding is enough to write a nice article, that is exactly what I will do.

The core of the realization I had is that the Bind Parameter(s) defined through a View Link can also be used in the where clause of the Target (details) View Object, as long as that View Object is always queried in the context of the Source (Master). Or, to put it more precisely, the values of bind parameters in a ViewObject can be provided in several ways, one of which is through a ViewLink.

In this article I will show a simple example of how is form of bind parameter value injection can be (ab)used. I am looking for more serious applications. (more…)

SIG Event

Deploying Custom JSF Components – and using them in new JSF Applications

In several previous posts – and some articles yet to be published – I discuss the development of new JSF Components. Of course the true potential of such components can only be realized if they can be packaged and distributed and integrated in an IDE and new JSF application in a very simple way. This articles demonstrates how two simple custom JSF components – a Validator and a UIComponent – can be packaged in a JAR file with supporting configuration files and subsequently be distributed to be used in other applications.

The jar-file is available for download at the end of this article. You can download it and create wonderful new applications with the two custom JSF components: helloworld and greaterThanValidator:

 

(more…)

SIG Event

Implementing Client Side Validation for Custom Validators in ADF Faces

The SUN Reference Implementation of Java Server Faces has a limited number of Validators. The framework has plenty support for creation and integration of custom validators. It does not however come with out of the box support for client side validation. Validation only occurs on the middle tier after a form has been submitted – either in full or partially through an AJAX style operation – from the client to the server.

ADF Faces has extended this approach by providing JavaScript based Client Side validation that occurs inside the browser when the Form is submitted, and therefore before the request is sent to the server. When validation fails, no request is sent at all and the user is notified of this failure to submit as a result of validation errors. Again, the set of out of the box validators in ADF Faces is fairly liimited, but we are free to extend that set with our own validators. It turns out to be quite easy to implement client side validation in our own custom validators as well, utilizing the infrastructure in ADF Faces.

In this article, I will demonstrate how my custom GreaterThan validator is client-side-enabled within the context of ADF Faces. More >

SIG Event

How to create a custom JSF Validator – The Greater Than Validator to enforce one component's value being larger than some other's

One of the major benefits of Java Server Faces (JSF) in comparison to other View frameworks is its easy extensibility. UI Components can be incorporated, custom converters and page-life-cycles can be defined and of course Validators can be developed an integrated into JSF applications. Although there is a number of tutorials and articles available on line on creating new custom Validators, they do not seem to discuss the creation of a validator that deals with more than one component(‘s value). For example I would like to have a Validator that enforces that one component can only have a value that is larger than the value of some other specified component.

Basically I want to be able to specify something like:

&lt;af:inputText label=&quot;Old Salary&quot; id=&quot;oldSalary&quot;<br /> value=&quot;#{SalaryBean.oldSalary}&quot;/&gt;<br /> &lt;af:inputText label=&quot;New Salary&quot; value=&quot;#{SalaryBean.newSalary}&quot;<br /> id=&quot;newSalary&quot;&gt;<br /> &lt;AMISJSF:greaterThan greaterThanId=&quot;mainform:oldSalary&quot;/&gt;<br /> &lt;/af:inputText&gt;<br /> &nbsp;<br />

And have the validator raise an exception if the More >

SIG Event

Funny ESB?

Hi all,

I’ve used my ESB system – installed on SuSE9, connected to a 10.2 E.E. on the same machine – for a few months now, so I thought it would be interesting to take a look at what’s going on in my database schema created by my esb system (oraesb). This led to some questions and raising eyebrows, I hope some of you esb-experts out there might have an answer for or a comment for that matter . (more…)

Go to Top