No client side event like onload in form properties

I have a requirement where i have a form in a view and some componenets inside that form.

i want to run the javascript validations on load of that form,but there is no client-side event like onload in the ‘client-side event’ property of that form.

How can i call that javascript on form load???

Someone please help!!

Hi Sunny ,
can you tell more about this use case.
I think you can validate your out put while populating the values of the components inside your view bean and throw javax.faces.validator.ValidatorException.
hope this will help.


The usecase is i have a texbox and a button.The button is to be enabled only when text box is not empty…

The text box values are coming from previous form.
So in current form they ll be already populated and i have to enable/disable button on load of tht form…
Like i ll be checking if the text box is empty or not at the time when form loads…But i cant find any way to do it here.

hi sunny,

while navigating from the first form check the value of the textbox(which you are going to populate in the next form), i mean to say the value which you are going to populate.

if the value is not empty, assign a value ‘‘false’’ to the bean(boolean variable) otherwise assign “true”.

Bind this boolean value to the button Disabled property in Display properties. so that if value is present the button will be enabled.

You can do the same in the initialize() method of the second form.

hope this will be helpful.


Ok…Thanks Sunil…That resolved the issue
Can you throw some light on waitUntilLoaded method in Event class
Its in the following URl!s!waitUntilLoaded