actually the answer is there.
you need to compare what you wrote to it.
but from now on, I will not respond to you emails
:)
Milind W sent the following on 8/17/2008 4:16 PM:
> Exactly what I am doing (using the debugger).
> But it would be nice if the "real findParty author could please stand up"
> :)
>
>> might want to go over the partyscreens.xml#findparty
>>
>>
>> Milind W sent the following on 8/17/2008 2:32 PM:
>>> hi,
>>> I think someone who understands the findParty method is probably the
>>> best
>>> person to answer this.
>>> I have a screen and form as detailed below.
>>> I am trying to get the data from the person entity for the logged in
>>> user
>>> and display it in a form.
>>> Am I missing some parameters? or something else?
>>> I am trying to debug this looking at the existing screens and forms but
>>> if
>>> someone who understands this method can help, I would appreciate it.
>>> Thanks
>>> -Milind
>>>
>>>
>>> The error:
>>>
>>> org.ofbiz.base.util.GeneralException: Error rendering screen
>>> [component://ebp/widget/EBPScreens.xml#main]:
>>> org.ofbiz.base.util.GeneralException: Error rendering screen
>>> [component://ebp/widget/EBPScreens.xml#main-decorator]:
>>> java.lang.IllegalArgumentException: Error getting value from the
>>> database
>>> for display of field [firstName] on form [profile]:
>>> org.ofbiz.entity.GenericModelException:
>>> [GenericDelegator.findByPrimaryKey] Passed primary key is not a valid
>>> primary key: [GenericEntity:Person][firstName,THE(java.lang.String)]
>>> (Error getting value from the database for display of field [firstName]
>>> on
>>> form [profile]: org.ofbiz.entity.GenericModelException:
>>> [GenericDelegator.findByPrimaryKey] Passed primary key is not a valid
>>> primary key: [GenericEntity:Person][firstName,THE(java.lang.String)])
>>> (Error rendering screen
>>> [component://ebp/widget/EBPScreens.xml#main-decorator]:
>>> java.lang.IllegalArgumentException: Error getting value from the
>>> database
>>> for display of field [firstName] on form [profile]:
>>> org.ofbiz.entity.GenericModelException:
>>> [GenericDelegator.findByPrimaryKey] Passed primary key is not a valid
>>> primary key: [GenericEntity:Person][firstName,THE(java.lang.String)]
>>> (Error getting value from the database for display of field [firstName]
>>> on
>>> form [profile]: org.ofbiz.entity.GenericModelException:
>>> [GenericDelegator.findByPrimaryKey] Passed primary key is not a valid
>>> primary key: [GenericEntity:Person][firstName,THE(java.lang.String)]))
>>>
>>>
>>> The Screen:
>>> <screen name="main">
>>> <section>
>>> <actions>
>>> <set field="headerItem" value="Main"/>
>>> <set field="roleTypeId" value="CONTACT"/>
>>> <set field="partyTypeId" value="PERSON"/>
>>> <set field="headerItem" value="Contacts"/>
>>> <set field="partyId"
>>> value="${userLogin.partyId}"/>
>>> <set field="lookupFlag" value="Y"/>
>>> <set field="extInfo" value="N"/>
>>> <set field="roleTypeId" value="ANY"/>
>>> <entity-one entity-name="Person"
>>> value-name="Person" />
>>> </actions>
>>> <widgets>
>>> <decorator-screen name="main-decorator"
>>> location="component://ebp/widget/EBPScreens.xml">
>>> <decorator-section name="body">
>>> <section>
>>>
>>> <actions>
>>> <service service-name="findParty"
>>> auto-field-map="true"/>
>>> </actions>
>>> <widgets>
>>> <container style="screenlet">
>>> <container style="screenlet-body">
>>> <section>
>>> <condition>
>>> <not><if-empty
>>> field-name="partyList"/></not>
>>> </condition>
>>> <widgets>
>>> <include-form
>>> name="profile"
>>> location="component://ebp/widget/EBPForms.xml"/>
>>> </widgets>
>>> <fail-widgets>
>>> <container style="h3">
>>> <label
>>> text="PARTY_NOT_FOUND"/>
>>> </container>
>>> </fail-widgets>
>>> </section>
>>> </container>
>>> </container>
>>> </widgets>
>>> </section>
>>> </decorator-section>
>>> </decorator-screen>
>>> </widgets>
>>> </section>
>>> </screen>
>>>
>>> The FORM:
>>> <form name="profile" type="list" target="Person"
>>> default-entity-name="Person" >
>>> <actions>
>>> <entity-condition entity-name="Person">
>>> <condition-expr field-name="partyId"
>>> value="${userLogin.partyId}"/>
>>> <order-by field-name="partyId"/>
>>> </entity-condition>
>>> <entity-one entity-name="PartyType"
>>> value-name="partyType">
>>> <field-map field-name="partyTypeId"
>>> env-name="partyRow.partyTypeId"/>
>>> </entity-one>
>>> </actions>
>>> <field name="partyId" title="PartyId" ><display-entity
>>> entity-name="Person"/></field>
>>> <field name="firstName"><display-entity
>>> entity-name="Person"/></field>
>>> <field name="middleName"><display-entity
>>> entity-name="Person"/></field>
>>> <field name="lastName"><display-entity
>>> entity-name="Person"/></field>
>>> <field name="personalTitle"><display-entity
>>> entity-name="Person"/></field>
>>> <field name="gender"><display-entity
>>> entity-name="Person"/></field>
>>> <field name="birthDate"><display-entity
>>> entity-name="Person"/></field>
>>> <field name="occupation"><display-entity
>>> entity-name="Person"/></field>
>>> <field name="lastModifiedDate"><display-entity
>>> entity-name="Person"/></field>
>>> <field name="lastModifiedByUserLogin"><display-entity
>>> entity-name="Person"/></field>
>>> </form>
>>>
>>>
>>>
>>>
>>>
>>>
>>
>
>
>
>
>