You could create a static function in Java and call it from the FTL file.
This is an example of a static call from an FTL file
<#assign defaultGogleMapKey =
Static["org.ofbiz.base.util.UtilProperties"].getPropertyValue("general.properties",
defaultUrl)>
You could also do it in Groovy
The code is like this
GenericDelegator delegator = GenericDelegator.getGenericDelegator("default")
List result = delegator.findByAnd("Product",
UtilMisc.toMap("productId", "10000"));
for(int i =0; i < result.size(); i++)
{
GenericValue product = (GenericValue)(result.get(i));
String imageurl = product.getString("imageurl");
}
Groovy is a good way to do it.
On Tue, Aug 10, 2010 at 1:33 AM, hdv <
[hidden email]> wrote:
>
> hi
>
> I want to fetch records such as productId, imageurl etcfrom product entity
> using some condition and now i want to fetch price for those productids
> which i got from product entity.so how can i do that??
> shud i do coding in groovy or in xml file?which one is better?
> --
> View this message in context:
http://ofbiz.135035.n4.nabble.com/how-to-fetch-records-from-two-entities-tp2319358p2319358.html> Sent from the OFBiz - User mailing list archive at Nabble.com.
>