It would maybe help to initialize firstChoice:
Course firstChoice = new Course()
JSF tries to set the value title of firstChoice by
calling:
firstChoice.setTitle(title)
Of course this is not possible if firstChoice == null.
Under these circumstances you get the error which you
described. If firstChoice != null you can save the state
of firstChoice with the saveState tag <t:saveState
value="#{applicant.firstChoice}" />
Regards
René
On Tue, 31 Oct 2006 22:42:23 +0800
"Damar Thapa" <[EMAIL PROTECTED]> wrote:
Hi Rene,
Possibly, it is null. I am still getting ""firstChoice":
Error during
model data update." error. I can add two more attribues
of type
String to hold firstChoice and secondChoice in Applicant
class, but as
a matter of interest and learning, how it works in JSF?
Thanks,
Damar
n 10/31/06, Rene Guenther <[EMAIL PROTECTED]>
wrote:
Is firstChoice != null?
Regards
Rene
On Tue, 31 Oct 2006 20:32:40 +0800
"Damar Thapa" <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I have following classes:
>
> Class Course(
> String title,
> String startDate.
> …..
> ….
>
> }
>
> and
>
> Class Apply{
>
> String studnetName;
> Course firstChoice;
> .....
> …….
> …..
> }
>
> In the apply form (page), I havae a field to accept
>course title from
> the applicant ie <h:inputText id="firstChoice"
> value="#{applicant.firstChoice.title}"/>. Since title
is
>unique, I can
> retrieve Course object for firstChoice properties
later
>before saving
> Apply object. But, I am getting ""firstChoice": Error
>during model
> data update." error on "#{applicant.firstChoice.title}
.
>Can somebody
> on the list point me what am I missing?
>
> Any pointers would be highly appreciated.
>
> Thanks,
>
> Damar
--
With regards,
Damar Thapa