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 variable parameters, and even more, automatically. Why? For example, When I edit a form including a field "name", change name to "aaaa" ,then submit the form page, then the second page also including field "name", the field name automatically get the value "aaaa". It's very strange. Help me, Please! Best Regards, Jack Liu Backend System, Aicent Inc. +86-10-83913108 ext. 2437 (office) +86-10-68028710 (fax) [hidden email] (email) |
I find parameters hold all fields that submitted in the former page.
How can I remove some key-value pair in the map parameters? -----Original Message----- From: Jack Liu [mailto:[hidden email]] Sent: 2009年2月4日 23:42 To: [hidden email] 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 variable parameters, and even more, automatically. Why? For example, When I edit a form including a field "name", change name to "aaaa" ,then submit the form page, then the second page also including field "name", the field name automatically get the value "aaaa". It's very strange. Help me, Please! Best Regards, Jack Liu Backend System, Aicent Inc. +86-10-83913108 ext. 2437 (office) +86-10-68028710 (fax) [hidden email] (email) |
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:[hidden email]] Sent: 2009年2月4日 23:42 To: [hidden email] 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 |
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:[hidden email]] > Sent: 2009年2月4日 23:42 > To: [hidden email] > 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 > > |
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:[hidden email]] Sent: 2009年2月6日 13:08 To: [hidden email] 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:[hidden email]] > Sent: 2009年2月4日 23:42 > To: [hidden email] > 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 > > |
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:[hidden email]] > Sent: 2009年2月6日 13:08 > To: [hidden email] > 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:[hidden email]] >> Sent: 2009年2月4日 23:42 >> To: [hidden email] >> 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 >> >> >> > > |
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:[hidden email]] Sent: 2009年2月6日 14:50 To: [hidden email] 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:[hidden email]] > Sent: 2009年2月6日 13:08 > To: [hidden email] > 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:[hidden email]] >> Sent: 2009年2月4日 23:42 >> To: [hidden email] >> 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 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:[hidden email]] > Sent: 2009年2月6日 14:50 > To: [hidden email] > 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:[hidden email]] >> Sent: 2009年2月6日 13:08 >> To: [hidden email] >> 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:[hidden email]] >>> Sent: 2009年2月4日 23:42 >>> To: [hidden email] >>> 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 >>> >>> >>> >> > > > Version: GnuPG v1.4.6 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFJjA+ArP3NbaWWqE4RAhQXAJ93UjTDcmCJtzxT4eWo2jDWtR1L+wCgtHi3 RVBWP1IPydE2ZAsEZukNLpY= =6w8I -----END PGP SIGNATURE----- |
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:[hidden email]] Sent: 2009年2月6日 18:23 To: [hidden email] 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:[hidden email]] > Sent: 2009年2月6日 14:50 > To: [hidden email] > 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:[hidden email]] >> Sent: 2009年2月6日 13:08 >> To: [hidden email] >> 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:[hidden email]] >>> Sent: 2009年2月4日 23:42 >>> To: [hidden email] >>> 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 >>> >>> >>> >> > > > Version: GnuPG v1.4.6 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFJjA+ArP3NbaWWqE4RAhQXAJ93UjTDcmCJtzxT4eWo2jDWtR1L+wCgtHi3 RVBWP1IPydE2ZAsEZukNLpY= =6w8I -----END PGP SIGNATURE----- |
Administrator
|
BSH is still used in R4 but has been replaced in trunk by Groovy (not totally but near)
About trunk : http://docs.ofbiz.org/display/OFBADMIN/Apache+OFBiz+Getting+Started Jacques From: "Jack Liu" <[hidden email]> > 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:[hidden email]] > Sent: 2009年2月6日 18:23 > To: [hidden email] > 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:[hidden email]] >> Sent: 2009年2月6日 14:50 >> To: [hidden email] >> 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:[hidden email]] >>> Sent: 2009年2月6日 13:08 >>> To: [hidden email] >>> 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:[hidden email]] >>>> Sent: 2009年2月4日 23:42 >>>> To: [hidden email] >>>> 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----- > |
In reply to this post by Jack Liu-2
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1 OFBiz 4.0. does use bsh files.OFBiz 4.0. is the more stable Trunk version has all the new enhancements. do a search through the bsh files for Remove there are examples. Jack Liu sent the following on 2/6/2009 2:33 AM: > 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:[hidden email]] > Sent: 2009年2月6日 18:23 > To: [hidden email] > Subject: Re: OFBiz-unexpected result caused by submitted form > > 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:[hidden email]] >> Sent: 2009t26 Version: GnuPG v1.4.6 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFJjBgsrP3NbaWWqE4RApkhAJwId7AkLEwSMgizUxrga6GR1q/FpgCfbFbi 4ylDPw7O7PyvdX+t8X+W/DE= =+8DO -----END PGP SIGNATURE----- |
Free forum by Nabble | Edit this page |