What's the trunk version? I am using OFBiz 4.0. If bsh files can't be used,then how to remove some entry in map parameters?
Thank you -----Original Message----- From: BJ Freeman [mailto:bjf...@free-man.net] Sent: 2009年2月6日 18:23 To: user@ofbiz.apache.org Subject: Re: OFBiz-unexpected result caused by submitted form -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 just as a side note, the trunk version of ofbiz does not use bsh files any more, though the code is there to support them. Jack Liu sent the following on 2/5/2009 11:27 PM: > Thank you for your patience! > > Method parameters.clear() in the bsh file can't be used because it clear all > the entries in map parameters. > > > -----Original Message----- > From: Ashish Nagar [mailto:ashish.na...@hotwaxmedia.com] > Sent: 2009年2月6日 14:50 > To: user@ofbiz.apache.org > Subject: Re: OFBiz-unexpected result caused by submitted form > > If you want to have those fields empty in the form , you can make change > in ftl. For instance you can use this field > <input id="firstName" name="firstName" type="text" > value="${parameters.firstName!}"/> > as <input id="firstName" name="firstName" type="text" > value="${firstName!}"/> > > Then also if you wish to empty all fields in parameters you can use > parameters.clear() in the bsh file. > Let me know if you want something else. > > Regards: > -- > Ashish Nagar > > Jack Liu wrote: >> Yes, you are right. >> Now I don't hope this happen or I want remove some entry from map parameters. >> In my screen >> <screen name="lookupCustomers"> >> <section> >> <actions> >> <script >> location="component://ccb/webapp/ccb/WEB-INF/actions/removekeys.bsh" /> >> >> Then, in removekeys.bsh >> parameters.remove("name"); >> parameters.remove("businessaddr"); >> parameters.remove("country"); >> >> it does work, unexpected result doesn't happen in the next page. >> >> But it's a little complex, do you have alternative ways to do this? >> >> Thank you! >> >> -----Original Message----- >> From: Ashish Nagar [mailto:ashish.na...@hotwaxmedia.com] >> Sent: 2009年2月6日 13:08 >> To: user@ofbiz.apache.org >> Subject: Re: OFBiz-unexpected result caused by submitted form >> >> Hi Jack, >> The fields you fill get sets in the environment so that the next page >> can retrieve their values.Such values are retrieved from parameters >> map.You find the values against those fields are automatically >> filled,this is because the values are fetched as parameters.firstName etc. >> >> Thanks & Regards: >> - - >> Ashish Nagar >> >> Jack Liu wrote: >> >>> Hi all >>> I find map parameters hold all fields that submitted in the previous page. >>> How can I remove some key-value pair in the map parameters? >>> And I can't understand why ofbiz automatically set a field which has an >>> entry in the map parameters. >>> >>> I am new to OFBiz, Please help me,thanks. >>> >>> -----Original Message----- >>> From: Jack Liu [mailto:jack....@aicent.com] >>> Sent: 2009年2月4日 23:42 >>> To: user@ofbiz.apache.org >>> Subject: OFBiz-unexpected result caused by submitted form >>> >>> Hi >>> I've encountered a problem when I am learning OFBiz. I submit a form to >>> create a customer and save it in database, then page navigates to >>> another page, in which i can get the customer's id by <set field="id" >>> from-field="parameters.id"/> . Why? >>> I can get all the fields submitted in the previous page through map >>> parameters, and even more, automatically. Why? >>> For example, When I edit a form including a field "city", change city to >>> "Beijing" ,then submit the form page, then the second page also including a >>> field "city", the field "city" automatically get the value "Beijing", but >>> the tow fields with the same name city belongs to different entity . It's >>> very strange. >>> >>> Help me, Please! >>> >>> >>> Best Regards, >>> >>> Jack Liu >>> >>> >>> >> > > > -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFJjA+ArP3NbaWWqE4RAhQXAJ93UjTDcmCJtzxT4eWo2jDWtR1L+wCgtHi3 RVBWP1IPydE2ZAsEZukNLpY= =6w8I -----END PGP SIGNATURE-----