Hi Mansour,
please search for <form name="UpdateProductCategoryMember"
in the ProductForms.xml file.

There is a <field name="productCategoryId"
that I think is what you want to do.

HTH,
Bruno

2010/8/26 Mansour Al Akeel <mansour.alak...@gmail.com>

> Let me clarify what I want.
> from
> http://www.opensourcestrategies.com/ofbiz/ofbiz_form_widget_cookbook.txt I
> got this:
>
> <field name="glAccountId" title="Account" widget-style="tabletext">
>    <display-entity entity-name="GlAccount" description="${accountName}">
>        <sub-hyperlink
> target="ListGlAccountEntries?glAccountId=${glAccountId}"
> description="[${glAccountId}]" link-style="tabletext"/>
>    </display-entity>
> </field>
>
>
> My code is :
>
>
> <field name="primaryProductCategoryId" title="Primary Category">
>    <display-entity entity-name="ProductCategory"
> key-field-name="productCategoryId" description="${categoryName}">
>        <sub-hyperlink target="EditCategory" description="${categoryName}"
> target-type="intra-app">
>            <parameter param-name="productCategoryId"
> value="${primaryProductCategoryId}" />
>        </sub-hyperlink>
>    </display-entity>
> </field>
>
>
> But this is not working. I need to put the CategoryName and not the
> "categoryId" in the link. Any one can help ?
>
>
>
> On Thu Aug 26,2010 03:20 pm, Mansour Al Akeel wrote:
> > Bruno,
> > this will resolve the issue with exception. But still don't know how to
> > display a value from the related entity.
> > Here's the code:
> >
> >
> >     <field name="primaryProductCategoryId" title="Primary Category">
> >             <display-entity entity-name="ProductCategory"
> >                     key-field-name="productCategoryId"
> description="${categoryName}">
> >                     <sub-hyperlink target="EditCategory"
> >                             description="${categoryName}"
> target-type="intra-app">
> >                             <parameter param-name="productCategoryId"
> value="${primaryProductCategoryId}" />
> >                     </sub-hyperlink>
> >             </display-entity>
> >     </field>
> >
> > How can I use the "${categoryName}" in the sub-hyperlink ?
> >
> >
> >
> > On Thu Aug 26,2010 11:07 am, Bruno Busco wrote:
> > > I think you cannot have "spaces" in field names.
> > > Try <field name="primaryCategory">
> > > instead of
> > > <field name="Primary Catgory">
> > >
> > > 2010/8/26 Mansour Al Akeel <mansour.alak...@gmail.com>
> > >
> > > > Hello all:
> > > > I need to reference a value from a related entity. For example, I am
> > > > displaying a list of Product, and one of the fields is the Category
> > > > Name.
> > > >
> > > >    <field name="Primary Catgory">
> > > >            <display-entity entity-name="ProductCategory"
> > > >                    key-field-name="productCategoryId"
> > > > description="${categoryName}" >
> > > >                    <sub-hyperlink target="EditCategory"
> > > > description="${categoryName}"  >
> > > >                            <parameter param-name="productCategoryId"
> > > > value="${primaryProductCategoryId}" />
> > > >                    </sub-hyperlink>
> > > >            </display-entity>
> > > >    </field>
> > > >
> > > > I want to display ProductCategory.categoryName instead of
> > > > ProductCategory.productCategoryId which is matched on
> > > > Product.primaryProductCategoryId
> > > >
> > > > On the other hand, I keep on getting an exception that I don't
> understand:
> > > > 2010-08-26 08:03:45,061 (http-0.0.0.0-8443-3)
> > > > [FlexibleMapAccessor.java:141:INFO ] UEL exception while getting
> value:
> > > > javax.el.ELException: Error parsing '${Primary Catgory}': syntax
> error at
> > > > position 10, encountered 'Catgory', expected '}', original = Primary
> Catgory
> > > >
> > > >
> > > > Any idea ?
> > > >
> > > >
> > > >
> > > >
>

Reply via email to