You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ofbiz.apache.org by chaohua wang <ch...@gmail.com> on 2010/06/29 18:02:48 UTC
how to update a field value?
Hi, Folks,
in the orderstatus.bsh file.
oii = orderItems.iterator();
while (oii.hasNext()) {
oitem = oii.next();
String itDes = oitem.getString("itemDescription");
...........................
}
I want to update itemDescription value. I tried to use
oitem.updateString("itemDescription", "®");
but threw the exceptions:
Method updateString( java.lang.String, java.lang.String ) not found in
class'org.ofbiz.entity.GenericValue'))
Could you tell me how to update itemDescription of orderitem?
Thanks
Chwang
Re: how to update a field value?
Posted by BJ Freeman <bj...@free-man.net>.
forget this post.
=========================
BJ Freeman
http://bjfreeman.elance.com
Strategic Power Office with Supplier Automation <http://www.businessesnetwork.com/automation/viewforum.php?f=52>
Specialtymarket.com <http://www.specialtymarket.com/>
Systems Integrator-- Glad to Assist
Chat Y! messenger: bjfr33man
Linkedin
<http://www.linkedin.com/profile?viewProfile=&key=1237480&locale=en_US&trk=tab_pro>
BJ Freeman sent the following on 6/29/2010 9:32 AM:
> https://demo-trunk.ofbiz.apache.org/webtools/control/FindGeneric?entityName=OrderItem&find=true&VIEW_SIZE=50&VIEW_INDEX=0
>
> orderItem does not have that field.
> that is in ProductContent.
> handy feature is to use the relationships to navigate what has what.
> https://demo-trunk.ofbiz.apache.org/webtools/control/ViewRelations?entityName=OrderItem
>
> the other way is to find how EditProductContent page references it
> https://demo-trunk.ofbiz.apache.org/catalog/control/EditProductContent?productId=WG-9943
>
>
>
> =========================
> BJ Freeman
> http://bjfreeman.elance.com
> Strategic Power Office with Supplier Automation
> <http://www.businessesnetwork.com/automation/viewforum.php?f=52>
> Specialtymarket.com <http://www.specialtymarket.com/>
>
> Systems Integrator-- Glad to Assist
>
> Chat Y! messenger: bjfr33man
> Linkedin
> <http://www.linkedin.com/profile?viewProfile=&key=1237480&locale=en_US&trk=tab_pro>
>
>
>
> chaohua wang sent the following on 6/29/2010 9:02 AM:
>> Hi, Folks,
>>
>> in the orderstatus.bsh file.
>>
>> oii = orderItems.iterator();
>>
>> while (oii.hasNext()) {
>> oitem = oii.next();
>>
>> String itDes = oitem.getString("itemDescription");
>> ...........................
>> }
>>
>> I want to update itemDescription value. I tried to use
>>
>> oitem.updateString("itemDescription", "®");
>>
>> but threw the exceptions:
>>
>> Method updateString( java.lang.String, java.lang.String ) not found in
>> class'org.ofbiz.entity.GenericValue'))
>>
>> Could you tell me how to update itemDescription of orderitem?
>>
>> Thanks
>>
>> Chwang
>>
>
>
Re: how to update a field value?
Posted by BJ Freeman <bj...@free-man.net>.
https://demo-trunk.ofbiz.apache.org/webtools/control/FindGeneric?entityName=OrderItem&find=true&VIEW_SIZE=50&VIEW_INDEX=0
orderItem does not have that field.
that is in ProductContent.
handy feature is to use the relationships to navigate what has what.
https://demo-trunk.ofbiz.apache.org/webtools/control/ViewRelations?entityName=OrderItem
the other way is to find how EditProductContent page references it
https://demo-trunk.ofbiz.apache.org/catalog/control/EditProductContent?productId=WG-9943
=========================
BJ Freeman
http://bjfreeman.elance.com
Strategic Power Office with Supplier Automation <http://www.businessesnetwork.com/automation/viewforum.php?f=52>
Specialtymarket.com <http://www.specialtymarket.com/>
Systems Integrator-- Glad to Assist
Chat Y! messenger: bjfr33man
Linkedin
<http://www.linkedin.com/profile?viewProfile=&key=1237480&locale=en_US&trk=tab_pro>
chaohua wang sent the following on 6/29/2010 9:02 AM:
> Hi, Folks,
>
> in the orderstatus.bsh file.
>
> oii = orderItems.iterator();
>
> while (oii.hasNext()) {
> oitem = oii.next();
>
> String itDes = oitem.getString("itemDescription");
> ...........................
> }
>
> I want to update itemDescription value. I tried to use
>
> oitem.updateString("itemDescription", "®");
>
> but threw the exceptions:
>
> Method updateString( java.lang.String, java.lang.String ) not found in
> class'org.ofbiz.entity.GenericValue'))
>
> Could you tell me how to update itemDescription of orderitem?
>
> Thanks
>
> Chwang
>
Re: how to update a field value?
Posted by Bilgin Ibryam <bi...@gmail.com>.
oitem is a GenericValue object, you have to use the methods of this object.
Use setString(key, value) instead.
Bilgin
On Tue, Jun 29, 2010 at 5:02 PM, chaohua wang <ch...@gmail.com> wrote:
> Hi, Folks,
>
> in the orderstatus.bsh file.
>
> oii = orderItems.iterator();
>
> while (oii.hasNext()) {
> oitem = oii.next();
>
> String itDes = oitem.getString("itemDescription");
> ...........................
> }
>
> I want to update itemDescription value. I tried to use
>
> oitem.updateString("itemDescription", "®");
>
> but threw the exceptions:
>
> Method updateString( java.lang.String, java.lang.String ) not found in
> class'org.ofbiz.entity.GenericValue'))
>
> Could you tell me how to update itemDescription of orderitem?
>
> Thanks
>
> Chwang
>