I think this is not solution for me. Imagine situation, where button (link)
to launch dialog is part of layout, where inputs are placed. If still so,
please, lead my hand where to place subforms... See code snippet below
(notice that immediate attribute on commandLink is set to true to meet
correct functionality for now):
<tr:panelLabelAndMessage for="streetText" label="Street/Number"
showRequired="true">
<tr:inputText id="streetText" simple="true" label="Street"
required="true"
value="#{oxViewController.applicant.street}"
partialTriggers="addressLink"/>
<tr:inputText simple="true" label="Number" columns="5"
required="true" inlineStyle="margin-left:3px;"
value="#{oxViewController.applicant.streetNumber}"
partialTriggers="addressLink"/>
<f:facet name="end">
<tr:commandLink id="addressLink" action="dialog:address"
partialSubmit="true" useWindow="true"
windowWidth="600" windowHeight="745"
shortDesc="Search for address"
immediate="true"
returnListener="#{oxViewController.addressLink_returnListener}">
<tr:image source="#{skinImages['button-lens.gif']}"/>
</tr:commandLink>
</f:facet>
</tr:panelLabelAndMessage>
<tr:inputText label="City"
value="#{oxViewController.applicant.city}"
columns="40" required="true"
partialTriggers="addressLink"/>
<tr:inputText label="Zip"
value="#{oxViewController.applicant.zip}"
columns="10" required="true"
partialTriggers="addressLink"/>
Tom
arobinson74-2 wrote:
>
> use tr:subForm. Something like this:
>
> <tr:subForm id="outer">
> <tr:subForm id="inputs">
> ...required inputs here...
> </tr:subForm>
> <tr:subForm id="dialog">
> ...dialog here...
> </tr:subForm>
> </tr:subForm>
>
> The dialog will cause the validation & update model phase to only be
> run on the dialog's subform and thus the inputs will not throw
> validation errors.
>
> Stay away from the immediate attribute like the plague. Only use it
> for "cancel" or "get me outta here" type functionality.
>
> -Andrew
>
> On Fri, Oct 3, 2008 at 2:41 AM, Havelka Tomáš <[EMAIL PROTECTED]>
> wrote:
>> Hi,
>>
>>
>>
>> I have the following problem.
>>
>> Imagine the use case when page contains form with some required inputs,
>> link
>> to navigate to dialog to fill this inputs and submit button.
>>
>> The problem I have is to achieve solution to fill those inputs from
>> dialog.
>> Those inputs have partialTriggers attribute set to id of dialog link,
>> which
>> defines returnListener. In this listener I simply want to set bean
>> values,
>> which are bound to input components. It's good working when dialog link
>> has
>> not set immediate attribute, but validation error on required fields
>> appear
>> when trying to open dialog. But, when setting immediate attribute on
>> dialog
>> link to true, that when returning from dialog, values are not set in
>> input
>> fields.
>>
>> I think this can be done using coding on server with code which calls
>> resetValue on input components. But is there any solution for this
>> avoiding
>> coding on the server?
>>
>>
>>
>> Tom
>>
>>
>
>
--
View this message in context:
http://www.nabble.com/PPR%2C-dialog-and-validation-problem-tp19801822p20245512.html
Sent from the MyFaces - Users mailing list archive at Nabble.com.