Hi Pierre, You need to add the EntityCondition class to the list of imports: import org.ofbiz.entity.condition.EntityCondition;
Regards Scott HotWax Media http://www.hotwaxmedia.com On 23/08/2010, at 7:49 PM, Pierre Smits wrote: > The error more readable: > > Problems with the response writer/output stream: > org.ofbiz.widget.screen.ScreenRenderException: Error rendering screen > [component://profiler/widget/ProfilerPrintScreens.xml#PrintProfilePDF]: > groovy.lang.MissingPropertyException: No such property: EntityCondition for > class: ProfileExperiences (No such property: EntityCondition for class: > ProfileExperiences) > > Regards, > > Pierre > > 2010/8/23 Pierre Smits <pierre.sm...@gmail.com> > >> Hi Scott, >> >> Thanks for the pointer. I think it should be on the money.... However after >> some tweaking I got following error: >> >> <p>Problems with the response writer/output stream: >> >> org.ofbiz.widget.screen.ScreenRenderException: >> Error rendering screen >> [component://profiler/widget/ProfilerPrintScreens.xml#PrintProfilePDF]: >> >> groovy.lang.MissingPropertyException: No such property: >> EntityCondition for class: ProfileExperiences (No such property: >> EntityCondition for class: ProfileExperiences) >> >> </p> >> >> >> The complete code in the groovy file is: >> import org.ofbiz.base.util.*; >> import org.ofbiz.entity.*; >> import org.ofbiz.entity.util.*; >> import org.ofbiz.party.contact.*; >> import javolution.util.FastMap; >> >> List experienceItems = []; >> >> profileOwnerId = profileSummary.profileOwnerId; >> selectedExperiences = parameters.experienceSelected; >> >> >> condList = []; >> condList.add(EntityCondition.makeCondition("profileOwnerId", >> profileOwnerId)); >> if (selectedExperiences) { >> condList.add(EntityCondition.makeCondition("experienceId", >> EntityOperator.IN, selectedExperiences as List)); >> } >> cond = EntityCondition.makeCondition(condList); >> experienceItemList = delegator.findList("ProfileExperience", cond, null, >> null, null, false); >> >> if (experienceItemList) { >> experienceItemList.each { profileExperience -> >> experienceDesc = profileExperience.experienceDesc; >> experienceStartDate = profileExperience.experienceStartDate; >> experienceEndDate = profileExperience.experienceEndDate; >> experienceCustomerId = profileExperience.experienceCustomerId; >> experienceIndustryId = profileExperience.experienceIndustryId; >> experienceProjectId = profileExperience.experienceProjectId; >> experienceTaskId = profileExperience.experienceTaskId; >> experienceBackground = profileExperience.experienceBackground; >> experienceContext = profileExperience.experienceContext; >> experienceTask = profileExperience.experienceTask; >> experienceMethods = profileExperience.experienceMethods; >> experienceTools = profileExperience.experienceTools; >> >> Map experienceItemMap = FastMap.newInstance(); >> experienceItemMap.putAll((Map) profileExperience); >> >> experienceItems.add(experienceItemMap); >> } >> context.experienceItems = experienceItems; >> } >> >> Any suggestions? >> >> Regards, >> >> Pierre >> >> >> 2010/8/21 Scott Gray <scott.g...@hotwaxmedia.com> >> >> Hi Pierre, >>> >>> See my other response to Michal for the correct code, it was only from >>> memory though so may not actually work without tweaking. >>> >>> Regards >>> Scott >>> >>> On 21/08/2010, at 12:02 AM, Pierre Smits wrote: >>> >>>> Hi Scott, >>>> >>>> Thanks for the pointer! >>>> >>>> Unfortunately, I am a total groovy-newbie.... >>>> >>>> Would >>>> selectedExperiences = parameter.selectedExperiences; >>>> if (selectedExperiences==""){ >>>> experienceItemList = delegator.findByAnd("ProfileExperience", >>>> [profileOwnerId : profileOwnerId]); >>>> } >>>> else{ >>>> experienceItemList = delegator.findList("ProfileExperience", >>>> [experienceId : selectedExperiences]); >>>> >>>> } >>>> >>>> do the trick? >>>> >>>> Regards, >>>> >>>> Pierre >>>> >>>> >>>> 2010/8/20 Scott Gray <scott.g...@hotwaxmedia.com> >>>> >>>>> Hi Pierre, >>>>> >>>>> You'll want to use delegator.findList(...) with an EntityOperator.IN >>>>> condition for the experience field. >>>>> >>>>> Regards >>>>> Scott >>>>> >>>>> HotWax Media >>>>> http://www.hotwaxmedia.com >>>>> >>>>> On 20/08/2010, at 10:31 PM, Pierre Smits wrote: >>>>> >>>>>> In a url I pass following parameters: >>>>>> >>>>>> ?profile=10000&experience=10000,100010 >>>>>> >>>>>> In a groovy file I get the parameters.... >>>>>> parameter.profile >>>>>> parameter.experience >>>>>> >>>>>> My question is: how do I get the delegator to find entities in the >>>>> database >>>>>> based on both parameter.profile and parameter.experience? >>>>>> >>>>>> In all the other codes in groovy files that I see it seems that >>>>> parameters >>>>>> have only 1 value... Or I might be overlooking one... >>>>>> >>>>>> Regards,, >>>>>> >>>>>> Pierre >>>>> >>>>> >>> >>> >>
smime.p7s
Description: S/MIME cryptographic signature