Pages

Friday, November 14, 2014

Setting Button Action from ActionListener

Control the button Action based on the logic inside ActionListener 

 This post talks about how to control the button Action based on the logic inside ActionListener. Lets say there is a commandButton "Go to View2" on pageFragment "View1" . On Click of this button conditionally a navigation is required. Here goes the code :

That's all ..enjoy.


Tuesday, November 11, 2014

SelectBooleanCheckbox with [Y, N] values using a custom converter

How to show selectBooleanCheckbox with [Y,N} values using a custom converter.

So first we need a converter which converts [Y,N] to [true, false] and viceversa. Here goes the converter code :-


Converter needs to be declared in faces-config.xml ..

Next goes the code snippet showing usage of our converter in selectBooleanCheckbox.


Enjoy!!

Wednesday, October 15, 2014

Retain current row after Rollback or refresh

It is very common requirement to retain the current row on rollback or after executing VO. To retain the current Row, first get the current Row key and then call rollback. Now you have the rowKey to set the currentRow again.