Hi Jason, 

I'm a real newbie to JSF and Shale, but maybe the tip that Craig gave me about 
setting the immediate flag in the commandbutton could help you. Then validation 
is skipped, as far as I understood it. This helped me with my first problem. 
Maybe you can use it, too. 

Then you could remove the "H". :)

Greetings, 

Peter


>
>I think you may running into a simular problem that I ran into.
>
>I have the following scenario: page 1 has the user choose from a list
>of options.  On page 2, the form saves the selected option of page 1
>in a hidden field in its form.  In addition the selected value from
>page 1 is used to populate a pull down on page 2.  So the user hits
>the submit button on page 2 to save the changes and KA-BLAMMO, I get a
>NPE.
>
>What was happening was the JSF was attempting to Validate the pulldown
>values in the Validation phase.  This was before any of the hidden
>fields were set.  So because the hidden fields weren't set, the
>retrieve of the pulldown was failing.
>
>I saw 1 of 2 solutions:
>1) Turn off the validation of the pulldown.  Because, hey... why would
>I need to validate a pulldown? - it isn't like a user can mistype
>something.
>OR
>2) somehow get the hidden fields to be set before any retrieval of the
>pulldown is made.
>
>The JSF mailing list from Sun gave no help for turning off the
>validator for the pulldown.
>
>So I had to do the following, for which I give myself a big Capital
>"H" for HACK.  In the contructor of the backing bean, I grabbed the
>request parameters myself and called the setters from there for the
>values that were needed to get through the validation of the pulldown.
>
>Perhaps someone here can help turn off the need to retrieve the
>pulldown values in the validation phase.
>
>I hope this will help your situation, as well.
>
>Cheers,
>Jason
>
>
>
>
>On 2/14/06, Gary VanMatre <[EMAIL PROTECTED]> wrote:
>> >From: Peter Goetz <[EMAIL PROTECTED]>
>> >
>> > Hi again,
>> >
>> > I tried the whole weekend, but I didn't get any results other than those
>> > mentioned in the email below.
>> > Shall I send some code to illustrate the problem or is it really so
>> > unusual, what I'm trying to do?
>> >
>>
>> Make sure that you have a navigation rule setup to handle the immediate 
>command button.  Try adding a rule that directs you to the target viewid 
>(sounds like the page you are submitting from).  If you don't have a 
>navigation case, I think the veiw is just restored using the submitted 
>values.
>>
>>  <navigation-rule>
>>     <from-view-id>/somepage.jsp</from-view-id>
>>     <navigation-case>
>>       <from-outcome>edit</from-outcome>
>>       <to-view-id>/somepage.jsp</to-view-id>
>>     </navigation-case>
>>   </navigation-rule>
>>
>>
>> > Thanks a lot for any help!
>> >
>> > Peter
>>
>> Gary
>>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to