Hi,

I got a form page with 3 radio buttons. Radio button ,say A,B,C.

billing and shipping address is what the form page consists of . Onclikc of A the user selects hide shipping address. On click of b , copy billing to shipping address as well and on click of C, user would type in a diff shipping address... All works fine.but when i submit the form, and if form not complete, the after validation forms gets all the value but do not retain the selected radio button and the shipping form elements disabled or hidden status..

How could i tackle this issue?


Regards

Hari

> How could i tackle this issue?
By preserving the incomplete data submitted by the user and populating your HTML controls with it. Just store those user preferences in a bean class and store it in a session variable.

On the dynamic page, just read those values. If they are not null, populate the corresponding HTML control with it, otherwise use the default value for that control.

> How could i tackle this issue?
By preserving the incomplete data submitted by the user and populating your HTML controls with it. Just store those user preferences in a bean class and store it in a session variable.

On the dynamic page, just read those values. If they are not null, populate the corresponding HTML control with it, otherwise use the default value for that control.

I've kind of same issue where I've 5 radio buttons of JSF controls, for each selection I would show corresponding text box and validate button, After submission of form and while rendering my response back to page, I would like to retain selected radio button and show data in disabled mode.
Please can you put code snippet here.

I appreciate...

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.