Re: Error handling in PartyMapProcs.xml not working?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: Error handling in PartyMapProcs.xml not working?

Jacques Le Roux
Administrator
Hi,

All: It seems weird to me that updatePerson has those fields mandatory and not createPerson. I don't see any obvious reason to not
have them consistent.
So I think we should fix that.

FooShyn: For your problem you should follow the same way and add your field as mandatory not only in your customisation of
PartyMapProcs but also in createPerson/updatePerson

Jacques

From: "Foo Shyn Chung" <[hidden email]>

> Hi all,
>
> I was trying to add on a field to the Person entity, and to make this field
> a compulsory field.
>
> I added a check in the "person" map processor in the PartyMapProcs.xml as
> below:
>
> <process field="nric"><copy/><not-empty><fail-property
> resource="PartyUiLabels" property="PartyNricMissing"/></not-empty></process>
>
> and the relevant message in the PartyUiLabels.xml
>
> However when i try to test run, the form can actually be submitted although
> i didn't put in anything in the nric field. I found that for the First Name
> and Last Name field, during creation, i can leave it blank, while in the
> update screen an error will be prompt.
>
> There was this attribute override being stated in the services.xml for
> updatePerson service, while there are none for the createPerson service:
>
> <override name="firstName" optional="false"/>
> <override name="lastName" optional="false"/>
>
>
> Which leads me to ask, is the error handling in the PartyMapProcs.xml not
> working? or am i missing something to make it work?
>
> Some pointer please, thanks!
>
> FooShyn
>
Reply | Threaded
Open this post in threaded view
|

Re: Error handling in PartyMapProcs.xml not working?

Jacques Le Roux
Administrator
Ha... this has been fixed by Sascha on Ravindra Mandre's report at r1094007 report but not backported, I will...

Jacques

From: "Jacques Le Roux" <[hidden email]>

> Hi,
>
> All: It seems weird to me that updatePerson has those fields mandatory and not createPerson. I don't see any obvious reason to not
> have them consistent.
> So I think we should fix that.
>
> FooShyn: For your problem you should follow the same way and add your field as mandatory not only in your customisation of
> PartyMapProcs but also in createPerson/updatePerson
>
> Jacques
>
> From: "Foo Shyn Chung" <[hidden email]>
>> Hi all,
>>
>> I was trying to add on a field to the Person entity, and to make this field
>> a compulsory field.
>>
>> I added a check in the "person" map processor in the PartyMapProcs.xml as
>> below:
>>
>> <process field="nric"><copy/><not-empty><fail-property
>> resource="PartyUiLabels" property="PartyNricMissing"/></not-empty></process>
>>
>> and the relevant message in the PartyUiLabels.xml
>>
>> However when i try to test run, the form can actually be submitted although
>> i didn't put in anything in the nric field. I found that for the First Name
>> and Last Name field, during creation, i can leave it blank, while in the
>> update screen an error will be prompt.
>>
>> There was this attribute override being stated in the services.xml for
>> updatePerson service, while there are none for the createPerson service:
>>
>> <override name="firstName" optional="false"/>
>> <override name="lastName" optional="false"/>
>>
>>
>> Which leads me to ask, is the error handling in the PartyMapProcs.xml not
>> working? or am i missing something to make it work?
>>
>> Some pointer please, thanks!
>>
>> FooShyn
>>