Marko,

It sounds like you could dump the special request value and just use a
subForm around your text field and select item picker icon, couldn't
you?  This should get you back to "mainstream" JSF validation
processing.

Is the required map only used for getting around the icon picking
issue?  If so, you should be able to dump it as well.

On 4/10/07, Marko Asplund <[EMAIL PROTECTED]> wrote:
Mike Kienenberger wrote:
> Are you planning on using ajax components (ie, partial-page refresh),
> server side submits with each field change, or java-script (preload
> the data and the logic to manipulate it at page render)?

Mike,

Thanks for your suggestions and feedback, they've been very helpful!

My current approach is based on doing most of the work on the server
side. When a user clicks a select item picker icon next to a text
field the whole input form gets submitted. There's a special request
parameter that is included in the request to signal that "required"
validation should be skipped (similar to how the Optional Validation
Framework works). The response view includes a Javascript onload
handler that checks if the response is triggered by an select item
picker icon click (communicated through backing bean properties
included in the view). If the icon was clicked and conversions went
fine, Javascript code opens a popup window by submitting a hidden form
with a different target frame. A separate view is shown in the popup
window which just includes a selectmanylistbox based on which picker
icon was clicked. The communication between the parent window's input
field and the select item list in the popup window happens via
Javascript. Each required input component has its required attribute
bound to a backing bean property map. The map getter returns an empty
map when validation should be skipped and the actual map normally.
Once I managed to fix a few bugs in my component's decode and
validation logic this approach appears to be working now (knock,
knock).

Unfortunately, i was unable to use normal validators for implementing
custom "required" validation because validators don't get run for
components with empty values.


marko

Reply via email to