am i going on a logical way about sitemap

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

am i going on a logical way about sitemap

subhasis
i am new user of OFBiz,for create a sitemap all require things are not get from product table,  totalTimesViewed is require from ProductCalculatedInfo.


delegator = request.getAttribute("delegator");
 persons = delegator.findAll("Product");
context.put("persons", persons);
pro=person.getRelatedOne("ProductCalculatedInfo");

but with getRelated i cant access both entity.

So i create a view entity in order/entitymodel_view named "ProductCalculatedInfoAndProduct" and rewrite the code following & get my needs

delegator = request.getAttribute("delegator");
persons = delegator.findAll("ProductCalculatedInfoAndProduct");
context.put("persons", persons);

is this a right way ,if not please guide me & if possible give the exact.
Reply | Threaded
Open this post in threaded view
|

Re: am i going on a logical way about sitemap

Jacques Le Roux
Administrator
This is a right way to do it.

Jacques
De : "subhasis" <[hidden email]>
>
> i am new user of OFBiz,for create a sitemap all require things are not
get
> from product table,  totalTimesViewed is require from
ProductCalculatedInfo.

>
>
> delegator = request.getAttribute("delegator");
>  persons = delegator.findAll("Product");
> context.put("persons", persons);
> pro=person.getRelatedOne("ProductCalculatedInfo");
>
> but with getRelated i cant access both entity.
>
> So i create a view entity in order/entitymodel_view named
> "ProductCalculatedInfoAndProduct" and rewrite the code following & get
my
> needs
>
> delegator = request.getAttribute("delegator");
> persons = delegator.findAll("ProductCalculatedInfoAndProduct");
> context.put("persons", persons);
>
> is this a right way ,if not please guide me & if possible give the
exact.
> --
> View this message in context:
http://www.nabble.com/am-i-going-on-a-logical-way-about-sitemap-tf3565246.html#a9958558
> Sent from the OFBiz - User mailing list archive at Nabble.com.