ofbiz-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Justin Robinson <jus...@venturenet.co.za>
Subject Re: Modifying a veiw entity...?
Date Tue, 22 Feb 2011 07:49:32 GMT
Hi Scott,
Well spotted. Thanks that did the trick.

-- 
Regards,
Justin
Venture-Net Research & Development


On Tue, Feb 22, 2011 at 9:32 AM, Scott Gray <scott.gray@hotwaxmedia.com> wrote:
> Hi Justin,
>
> Try reversing your view-link tag so that CR is pointing to PRDS (and the key-map to match),
just a quick guess after a 30 second look.
>
> Regards
> Scott
>
> HotWax Media
> http://www.hotwaxmedia.com
>
> On 22/02/2011, at 8:26 PM, Justin Robinson wrote:
>
>> I'm trying to modify a view entitymodel.xml def, to link in another
>> view's field. I've read ofbiz web resources, ofbiz cookbook & ofbiz
>> developer beginners tutorial with regards to this & still don't get
>> how it's done. My intension is to link
>> PartyRoleNameDetailSupplementalData into the
>> CustRequestAndPartyRelationshipAndRole view which would be
>> accomplished by a relation between "partyIdFrom" and "partyId", so
>> that "groupName" from PartyRoleNameDetailSupplementalData, will become
>> one of CustRequestAndPartyRelationshipAndRole's fields.
>> I'm getting this error:
>> Caused by: org.ofbiz.entity.GenericModelException: Tried to link the
>> PRDS alias to the CR alias of the
>> CustRequestAndPartyRelationshipAndRole view-entity, but it is not the
>> first view-link and has not been included in a previous view-link. In
>> other words, the left/main alias isn't connected to the rest of the
>> member-entities yet.
>>
>>
>> <view-entity entity-name="CustRequestAndPartyRelationshipAndRole"
>>                 package-name="com.opensourcestrategies.crmsfa.marketing"
>>                 title="CustRequest plus status,type and category info">
>>        <member-entity entity-alias="CR" entity-name="CustRequest"/>
>>        <member-entity entity-alias="SI" entity-name="StatusItem"/>
>>        <member-entity entity-alias="CRT" entity-name="CustRequestType"/>
>>        <member-entity entity-alias="CRC" entity-name="CustRequestCategory"/>
>>        <member-entity entity-alias="CRR" entity-name="CustRequestRole"/>
>>        <member-entity entity-alias="PR" entity-name="PartyRelationship"/>
>>        <!--this is my modification-->
>>        <member-entity entity-alias="PRDS"
>> entity-name="PartyRoleNameDetailSupplementalData"/>
>>        <alias-all entity-alias="CR">
>>          <exclude field="reason"/>
>>        </alias-all>
>>        <alias entity-alias="CR" name="custRequestId"/>
>>        <alias entity-alias="SI" name="status" field="description"/>
>>        <!-- this field value will replaced in CaseLookupService, I
>> just want a field to contain the updated value -->
>>        <alias entity-alias="SI" name="updated" field="statusCode"/>
>>        <alias entity-alias="CRT" name="custRequestType" field="description"/>
>>        <alias entity-alias="CRC" name="reason" field="description"/>
>>        <alias entity-alias="CRR" name="partyId"/>
>>        <alias entity-alias="CRR" name="roleTypeId"/>
>>        <alias entity-alias="PR" name="partyIdTo"/>
>>        <alias entity-alias="PR" name="partyIdFrom"/>
>>        <alias entity-alias="PR" name="roleTypeIdFrom"/>
>>        <alias entity-alias="PR" name="fromDate"/>
>>        <alias entity-alias="PR" name="thruDate"/>
>>        <!--this is my modification-->
>>        <alias entity-alias="PRDS" name="groupName"/>
>>
>>        <view-link entity-alias="CR" rel-entity-alias="SI" rel-optional="true">
>>            <key-map field-name="statusId" rel-field-name="statusId"/>
>>        </view-link>
>>        <view-link entity-alias="CR" rel-entity-alias="CRT" rel-optional="true">
>>            <key-map field-name="custRequestTypeId"
>> rel-field-name="custRequestTypeId"/>
>>        </view-link>
>>        <view-link entity-alias="CR" rel-entity-alias="CRC" rel-optional="true">
>>            <key-map field-name="custRequestCategoryId"
>> rel-field-name="custRequestCategoryId"/>
>>        </view-link>
>>        <view-link entity-alias="CR" rel-entity-alias="CRR">
>>            <key-map field-name="custRequestId"/>
>>        </view-link>
>>        <view-link entity-alias="CRR" rel-entity-alias="PR" rel-optional="true">
>>            <key-map field-name="partyId" rel-field-name="partyIdFrom"/>
>>        </view-link>
>>        <!--this is my modification-->
>>        <view-link entity-alias="PRDS" rel-entity-alias="CR"
>> rel-optional="true">
>>            <key-map field-name="partyId" rel-field-name="partyIdFrom"/>
>>        </view-link>
>>    </view-entity>
>>
>> --
>> Regards,
>> Justin
>> Venture-Net Research & Development
>
>

Mime
View raw message