Re: Related entity's data in a form field
Ravi thank you. I got it working. One thing is still missing, how do I extract the variable name in the parameter ? See the comments. actions entity-condition entity-name=Product order-by field-name=internalName / /entity-condition service service-name=findPartiesById result-map=myParty !-- I have the value hard coded to 1, but I want to use the manufacturerPartyId. -- field-map field-name=idToFind value=1 / /service set field=manufacturerDescription value=${myParty.party['description']} / /actions Thank you. On Mon Sep 06,2010 10:24 am, Ravindra Mandre wrote: Hi, I have not gone through all posting but based on your last post I am only getting the idea that you are getting a generic value of party and also getting the createdByUserLogin value as admin , so simply you can get the by party.createdByUserLogin . Ravi On Sun, Sep 5, 2010 at 1:43 PM, Mansour Al Akeel mansour.alak...@gmail.comwrote: To clarify my issue, the code I have posted results in a field showing the who map (or list). What I need is a single value only from this map. Here's an example output: {responseMessage=success, party=[GenericEntity:Party][createdByUserLogin,admin(java.lang.String)][createdDate,2010-08-30 19:49:06.594(java.sql.Timestamp)][createdStamp,2010-08-30 19:49:06.663(java.sql.Timestamp)][createdTxStamp,2010-08-30 19:49:06.594(java.sql.Timestamp)][dataSourceId,null()][description,SomeManufacturer manufacturer(java.lang.String)][externalId,null()][isUnread,null()][lastModifiedByUserLogin,admin(java.lang.String)][lastModifiedDate,2010-08-30 19:49:06.594(java.sql.Timestamp)][lastUpdatedStamp,2010-09-04 10:01:11.346(java.sql.Timestamp)][lastUpdatedTxStamp,2010-09-04 10:01:11.22(java.sql.Timestamp)][partyId,1(java.lang.String)][partyTypeId,PARTY_GROUP(java.lang.String)][preferredCurrencyUomId,USD(java.lang.String)][statusId,PARTY_ENABLED(java.lang.String)], partiesFound={}}
Re: Related entity's data in a form field
On Mon, Sep 6, 2010 at 1:06 PM, Mansour Al Akeel mansour.alak...@gmail.comwrote: Ravi thank you. I got it working. One thing is still missing, how do I extract the variable name in the parameter ? See the comments. actions entity-condition entity-name=Product order-by field-name=internalName / /entity-condition service service-name=findPartiesById result-map=myParty !-- I have the value hard coded to 1, but I want to use the manufacturerPartyId. -- field-map field-name=idToFind value=1 / /service set field=manufacturerDescription value=${myParty.party['description']} / /actions you have do field-map idToFind from genericValueName.manufacturePartyId in from-field element and you job is done . Ravi
Re: Related entity's data in a form field
Cool, but what is the genericValueName here in my case ? Here's the form definition: form name=ListProducts type=list title=Products List default-table-style=basic-table odd-row-style=alternate-row use-row-submit=false actions entity-condition entity-name=Product order-by field-name=internalName / /entity-condition service service-name=findPartiesById result-map=myParty field-map field-name=idToFind value=${manufacturerPartyId} / /service set field=manufacturerDescription value=${myParty.party['description']} / /actions field name=internalName title=Name hyperlink target=EditProduct?productId=${productId} description=${internalName} / /field field name=manufacturerId title=Manufacturer hyperlink description=${manufacturerDescription} target=/partymgr/control/viewprofile target-type=content parameter param-name=partyId value=${manufacturerPartyId} / /hyperlink /field /form In other words, how do I refrence the current entity ? Thank you, Ravi On Mon Sep 06,2010 02:12 pm, Ravindra Mandre wrote: On Mon, Sep 6, 2010 at 1:06 PM, Mansour Al Akeel mansour.alak...@gmail.comwrote: Ravi thank you. I got it working. One thing is still missing, how do I extract the variable name in the parameter ? See the comments. actions entity-condition entity-name=Product order-by field-name=internalName / /entity-condition service service-name=findPartiesById result-map=myParty !-- I have the value hard coded to 1, but I want to use the manufacturerPartyId. -- field-map field-name=idToFind value=1 / /service set field=manufacturerDescription value=${myParty.party['description']} / /actions you have do field-map idToFind from genericValueName.manufacturePartyId in from-field element and you job is done . Ravi
Re: Related entity's data in a form field
On Mon, Sep 6, 2010 at 2:19 PM, Mansour Al Akeel mansour.alak...@gmail.comwrote: Cool, but what is the genericValueName here in my case ? Here's the form definition: form name=ListProducts type=list title=Products List default-table-style=basic-table odd-row-style=alternate-row use-row-submit=false actions entity-condition entity-name=Product order-by field-name=internalName / /entity-condition service service-name=findPartiesById result-map=myParty field-map field-name=idToFind value=${manufacturerPartyId} / /service Use this service in row-actions tag and do simple mapping as follow service service-name=findPartiesById result-map=myParty field-map field-name=idToFind from-field=manufacturerPartyId / /service the value of manufacturerPartyId will be available though the list which you getting from entity-condition so it will map . if further does not work then post you comment HTH Ravi set field=manufacturerDescription value=${myParty.party['description']} / /actions field name=internalName title=Name hyperlink target=EditProduct?productId=${productId} description=${internalName} / /field field name=manufacturerId title=Manufacturer hyperlink description=${manufacturerDescription} target=/partymgr/control/viewprofile target-type=content parameter param-name=partyId value=${manufacturerPartyId} / /hyperlink /field /form In other words, how do I refrence the current entity ? Thank you, Ravi On Mon Sep 06,2010 02:12 pm, Ravindra Mandre wrote: On Mon, Sep 6, 2010 at 1:06 PM, Mansour Al Akeel mansour.alak...@gmail.comwrote: Ravi thank you. I got it working. One thing is still missing, how do I extract the variable name in the parameter ? See the comments. actions entity-condition entity-name=Product order-by field-name=internalName / /entity-condition service service-name=findPartiesById result-map=myParty !-- I have the value hard coded to 1, but I want to use the manufacturerPartyId. -- field-map field-name=idToFind value=1 / /service set field=manufacturerDescription value=${myParty.party['description']} / /actions you have do field-map idToFind from genericValueName.manufacturePartyId in from-field element and you job is done . Ravi
Re: Related entity's data in a form field
It worked great. Thank you Ravi. :) On Mon Sep 06,2010 02:36 pm, Ravindra Mandre wrote: On Mon, Sep 6, 2010 at 2:19 PM, Mansour Al Akeel mansour.alak...@gmail.comwrote: Cool, but what is the genericValueName here in my case ? Here's the form definition: form name=ListProducts type=list title=Products List default-table-style=basic-table odd-row-style=alternate-row use-row-submit=false actions entity-condition entity-name=Product order-by field-name=internalName / /entity-condition service service-name=findPartiesById result-map=myParty field-map field-name=idToFind value=${manufacturerPartyId} / /service Use this service in row-actions tag and do simple mapping as follow service service-name=findPartiesById result-map=myParty field-map field-name=idToFind from-field=manufacturerPartyId / /service the value of manufacturerPartyId will be available though the list which you getting from entity-condition so it will map . if further does not work then post you comment HTH Ravi set field=manufacturerDescription value=${myParty.party['description']} / /actions field name=internalName title=Name hyperlink target=EditProduct?productId=${productId} description=${internalName} / /field field name=manufacturerId title=Manufacturer hyperlink description=${manufacturerDescription} target=/partymgr/control/viewprofile target-type=content parameter param-name=partyId value=${manufacturerPartyId} / /hyperlink /field /form In other words, how do I refrence the current entity ? Thank you, Ravi On Mon Sep 06,2010 02:12 pm, Ravindra Mandre wrote: On Mon, Sep 6, 2010 at 1:06 PM, Mansour Al Akeel mansour.alak...@gmail.comwrote: Ravi thank you. I got it working. One thing is still missing, how do I extract the variable name in the parameter ? See the comments. actions entity-condition entity-name=Product order-by field-name=internalName / /entity-condition service service-name=findPartiesById result-map=myParty !-- I have the value hard coded to 1, but I want to use the manufacturerPartyId. -- field-map field-name=idToFind value=1 / /service set field=manufacturerDescription value=${myParty.party['description']} / /actions you have do field-map idToFind from genericValueName.manufacturePartyId in from-field element and you job is done . Ravi
Re: Related entity's data in a form field
To clarify my issue, the code I have posted results in a field showing the who map (or list). What I need is a single value only from this map. Here's an example output: {responseMessage=success, party=[GenericEntity:Party][createdByUserLogin,admin(java.lang.String)][createdDate,2010-08-30 19:49:06.594(java.sql.Timestamp)][createdStamp,2010-08-30 19:49:06.663(java.sql.Timestamp)][createdTxStamp,2010-08-30 19:49:06.594(java.sql.Timestamp)][dataSourceId,null()][description,SomeManufacturer manufacturer(java.lang.String)][externalId,null()][isUnread,null()][lastModifiedByUserLogin,admin(java.lang.String)][lastModifiedDate,2010-08-30 19:49:06.594(java.sql.Timestamp)][lastUpdatedStamp,2010-09-04 10:01:11.346(java.sql.Timestamp)][lastUpdatedTxStamp,2010-09-04 10:01:11.22(java.sql.Timestamp)][partyId,1(java.lang.String)][partyTypeId,PARTY_GROUP(java.lang.String)][preferredCurrencyUomId,USD(java.lang.String)][statusId,PARTY_ENABLED(java.lang.String)], partiesFound={}} Let's say I need the value for createdByUserLogin, how do I extract this value and put it in a hyperlink ? The documentaion doesn't show this. On Sat Sep 04,2010 10:56 am, Mansour Al Akeel wrote: Bruno, this is what I have so far. In the manufacturer field I want to display the name, if the name doesn't exist as it's not required, then it should display the id. Note that, I have the manufacturer id hard coded, as I couldn't find a way yet to extract the value and pass it to the service findPartiesById. Any idea? form name=ListProducts type=list title=Products List default-table-style=basic-table odd-row-style=alternate-row actions entity-condition entity-name=Product order-by field-name=internalName / /entity-condition service service-name=findPartiesById result-map=myParty field-map field-name=idToFind value=1 / !-- HARD CODED THE VALUE FOR NOW -- /service set field=manufacturer from-field=myParty / /actions field name=internalName title=Name hyperlink target=EditProduct?productId=${productId} description=${internalName} / /field field name=partyId title=Manufacturer display-entity entity-name=Party key-field-name=partyId description=${manufacturerPartyId} sub-hyperlink target=/partymgr/control/viewprofile description=${manufacturer} target-type=content !--Here I need the description or any other field from Party -- parameter param-name=partyId value=${manufacturerPartyId} / /sub-hyperlink /display-entity /field /form On Thu Sep 02,2010 08:16 pm, Bruno Busco wrote: Could this help? (cut and paste from http://www.opensourcestrategies.com/ofbiz/ofbiz_form_widget_cookbook.txt) * How to use the same field or value more than once on the form Let's say you need to display productId twice on your form, once as productId and once as the product description. The form widget will only display each field name= once. You can explicitly set the 'entry-name' attribute (by default the 'entry-name' attribute is equals to the 'name' attribute) to make it display the same field twice. field name=productIddisplay//field field name=productDescription entry-name=productId display-entity entity-name=Product/ !-- defaults to display description -- /field 2010/8/30 Mansour Al Akeel mansour.alak...@gmail.com Hello all: This question is still unanswered. I am not sure if I missunderstand the documentation from widget_cookbook. If there's something unclear, please let me know. Thank you. On Sat Aug 28,2010 06:10 am, Mansour Al Akeel wrote: Hello Bruno, No, that didn't help. It extracts the filed from an entity obtained by calling another service. I don't see a need for this. THe entity I want to use its field is in hand, it's just the matter of how to reference it, and use its field. On Thu Aug 26,2010 08:32 pm, Bruno Busco wrote: Hi Mansour, please search for form name=UpdateProductCategoryMember in the ProductForms.xml file. There is a field name=productCategoryId that I think is what you want to do. HTH, Bruno 2010/8/26 Mansour Al Akeel mansour.alak...@gmail.com Let me clarify what I want. from http://www.opensourcestrategies.com/ofbiz/ofbiz_form_widget_cookbook.txt I got this: field name=glAccountId title=Account widget-style=tabletext display-entity entity-name=GlAccount description=${accountName} sub-hyperlink target=ListGlAccountEntries?glAccountId=${glAccountId} description=[${glAccountId}] link-style=tabletext/ /display-entity /field My code is : field name=primaryProductCategoryId title=Primary Category
Re: Related entity's data in a form field
Hi, I have not gone through all posting but based on your last post I am only getting the idea that you are getting a generic value of party and also getting the createdByUserLogin value as admin , so simply you can get the by party.createdByUserLogin . Ravi On Sun, Sep 5, 2010 at 1:43 PM, Mansour Al Akeel mansour.alak...@gmail.comwrote: To clarify my issue, the code I have posted results in a field showing the who map (or list). What I need is a single value only from this map. Here's an example output: {responseMessage=success, party=[GenericEntity:Party][createdByUserLogin,admin(java.lang.String)][createdDate,2010-08-30 19:49:06.594(java.sql.Timestamp)][createdStamp,2010-08-30 19:49:06.663(java.sql.Timestamp)][createdTxStamp,2010-08-30 19:49:06.594(java.sql.Timestamp)][dataSourceId,null()][description,SomeManufacturer manufacturer(java.lang.String)][externalId,null()][isUnread,null()][lastModifiedByUserLogin,admin(java.lang.String)][lastModifiedDate,2010-08-30 19:49:06.594(java.sql.Timestamp)][lastUpdatedStamp,2010-09-04 10:01:11.346(java.sql.Timestamp)][lastUpdatedTxStamp,2010-09-04 10:01:11.22(java.sql.Timestamp)][partyId,1(java.lang.String)][partyTypeId,PARTY_GROUP(java.lang.String)][preferredCurrencyUomId,USD(java.lang.String)][statusId,PARTY_ENABLED(java.lang.String)], partiesFound={}}
Re: Related entity's data in a form field
Bruno, this is what I have so far. In the manufacturer field I want to display the name, if the name doesn't exist as it's not required, then it should display the id. Note that, I have the manufacturer id hard coded, as I couldn't find a way yet to extract the value and pass it to the service findPartiesById. Any idea? form name=ListProducts type=list title=Products List default-table-style=basic-table odd-row-style=alternate-row actions entity-condition entity-name=Product order-by field-name=internalName / /entity-condition service service-name=findPartiesById result-map=myParty field-map field-name=idToFind value=1 / !-- HARD CODED THE VALUE FOR NOW -- /service set field=manufacturer from-field=myParty / /actions field name=internalName title=Name hyperlink target=EditProduct?productId=${productId} description=${internalName} / /field field name=partyId title=Manufacturer display-entity entity-name=Party key-field-name=partyId description=${manufacturerPartyId} sub-hyperlink target=/partymgr/control/viewprofile description=${manufacturer} target-type=content !--Here I need the description or any other field from Party -- parameter param-name=partyId value=${manufacturerPartyId} / /sub-hyperlink /display-entity /field /form On Thu Sep 02,2010 08:16 pm, Bruno Busco wrote: Could this help? (cut and paste from http://www.opensourcestrategies.com/ofbiz/ofbiz_form_widget_cookbook.txt) * How to use the same field or value more than once on the form Let's say you need to display productId twice on your form, once as productId and once as the product description. The form widget will only display each field name= once. You can explicitly set the 'entry-name' attribute (by default the 'entry-name' attribute is equals to the 'name' attribute) to make it display the same field twice. field name=productIddisplay//field field name=productDescription entry-name=productId display-entity entity-name=Product/ !-- defaults to display description -- /field 2010/8/30 Mansour Al Akeel mansour.alak...@gmail.com Hello all: This question is still unanswered. I am not sure if I missunderstand the documentation from widget_cookbook. If there's something unclear, please let me know. Thank you. On Sat Aug 28,2010 06:10 am, Mansour Al Akeel wrote: Hello Bruno, No, that didn't help. It extracts the filed from an entity obtained by calling another service. I don't see a need for this. THe entity I want to use its field is in hand, it's just the matter of how to reference it, and use its field. On Thu Aug 26,2010 08:32 pm, Bruno Busco wrote: Hi Mansour, please search for form name=UpdateProductCategoryMember in the ProductForms.xml file. There is a field name=productCategoryId that I think is what you want to do. HTH, Bruno 2010/8/26 Mansour Al Akeel mansour.alak...@gmail.com Let me clarify what I want. from http://www.opensourcestrategies.com/ofbiz/ofbiz_form_widget_cookbook.txt I got this: field name=glAccountId title=Account widget-style=tabletext display-entity entity-name=GlAccount description=${accountName} sub-hyperlink target=ListGlAccountEntries?glAccountId=${glAccountId} description=[${glAccountId}] link-style=tabletext/ /display-entity /field My code is : field name=primaryProductCategoryId title=Primary Category display-entity entity-name=ProductCategory key-field-name=productCategoryId description=${categoryName} sub-hyperlink target=EditCategory description=${categoryName} target-type=intra-app parameter param-name=productCategoryId value=${primaryProductCategoryId} / /sub-hyperlink /display-entity /field But this is not working. I need to put the CategoryName and not the categoryId in the link. Any one can help ? On Thu Aug 26,2010 03:20 pm, Mansour Al Akeel wrote: Bruno, this will resolve the issue with exception. But still don't know how to display a value from the related entity. Here's the code: field name=primaryProductCategoryId title=Primary Category display-entity entity-name=ProductCategory key-field-name=productCategoryId description=${categoryName} sub-hyperlink target=EditCategory description=${categoryName} target-type=intra-app parameter param-name=productCategoryId value=${primaryProductCategoryId} / /sub-hyperlink /display-entity /field
Re: Related entity's data in a form field
Could this help? (cut and paste from http://www.opensourcestrategies.com/ofbiz/ofbiz_form_widget_cookbook.txt) * How to use the same field or value more than once on the form Let's say you need to display productId twice on your form, once as productId and once as the product description. The form widget will only display each field name= once. You can explicitly set the 'entry-name' attribute (by default the 'entry-name' attribute is equals to the 'name' attribute) to make it display the same field twice. field name=productIddisplay//field field name=productDescription entry-name=productId display-entity entity-name=Product/ !-- defaults to display description -- /field 2010/8/30 Mansour Al Akeel mansour.alak...@gmail.com Hello all: This question is still unanswered. I am not sure if I missunderstand the documentation from widget_cookbook. If there's something unclear, please let me know. Thank you. On Sat Aug 28,2010 06:10 am, Mansour Al Akeel wrote: Hello Bruno, No, that didn't help. It extracts the filed from an entity obtained by calling another service. I don't see a need for this. THe entity I want to use its field is in hand, it's just the matter of how to reference it, and use its field. On Thu Aug 26,2010 08:32 pm, Bruno Busco wrote: Hi Mansour, please search for form name=UpdateProductCategoryMember in the ProductForms.xml file. There is a field name=productCategoryId that I think is what you want to do. HTH, Bruno 2010/8/26 Mansour Al Akeel mansour.alak...@gmail.com Let me clarify what I want. from http://www.opensourcestrategies.com/ofbiz/ofbiz_form_widget_cookbook.txt I got this: field name=glAccountId title=Account widget-style=tabletext display-entity entity-name=GlAccount description=${accountName} sub-hyperlink target=ListGlAccountEntries?glAccountId=${glAccountId} description=[${glAccountId}] link-style=tabletext/ /display-entity /field My code is : field name=primaryProductCategoryId title=Primary Category display-entity entity-name=ProductCategory key-field-name=productCategoryId description=${categoryName} sub-hyperlink target=EditCategory description=${categoryName} target-type=intra-app parameter param-name=productCategoryId value=${primaryProductCategoryId} / /sub-hyperlink /display-entity /field But this is not working. I need to put the CategoryName and not the categoryId in the link. Any one can help ? On Thu Aug 26,2010 03:20 pm, Mansour Al Akeel wrote: Bruno, this will resolve the issue with exception. But still don't know how to display a value from the related entity. Here's the code: field name=primaryProductCategoryId title=Primary Category display-entity entity-name=ProductCategory key-field-name=productCategoryId description=${categoryName} sub-hyperlink target=EditCategory description=${categoryName} target-type=intra-app parameter param-name=productCategoryId value=${primaryProductCategoryId} / /sub-hyperlink /display-entity /field How can I use the ${categoryName} in the sub-hyperlink ? On Thu Aug 26,2010 11:07 am, Bruno Busco wrote: I think you cannot have spaces in field names. Try field name=primaryCategory instead of field name=Primary Catgory 2010/8/26 Mansour Al Akeel mansour.alak...@gmail.com Hello all: I need to reference a value from a related entity. For example, I am displaying a list of Product, and one of the fields is the Category Name. field name=Primary Catgory display-entity entity-name=ProductCategory key-field-name=productCategoryId description=${categoryName} sub-hyperlink target=EditCategory description=${categoryName} parameter param-name=productCategoryId value=${primaryProductCategoryId} / /sub-hyperlink /display-entity /field I want to display ProductCategory.categoryName instead of ProductCategory.productCategoryId which is matched on Product.primaryProductCategoryId On the other hand, I keep on getting an exception that I don't understand: 2010-08-26 08:03:45,061 (http-0.0.0.0-8443-3) [FlexibleMapAccessor.java:141:INFO ] UEL exception while getting value: javax.el.ELException: Error parsing '${Primary Catgory}': syntax error at position 10, encountered 'Catgory',
Re: Related entity's data in a form field
Hello all: This question is still unanswered. I am not sure if I missunderstand the documentation from widget_cookbook. If there's something unclear, please let me know. Thank you. On Sat Aug 28,2010 06:10 am, Mansour Al Akeel wrote: Hello Bruno, No, that didn't help. It extracts the filed from an entity obtained by calling another service. I don't see a need for this. THe entity I want to use its field is in hand, it's just the matter of how to reference it, and use its field. On Thu Aug 26,2010 08:32 pm, Bruno Busco wrote: Hi Mansour, please search for form name=UpdateProductCategoryMember in the ProductForms.xml file. There is a field name=productCategoryId that I think is what you want to do. HTH, Bruno 2010/8/26 Mansour Al Akeel mansour.alak...@gmail.com Let me clarify what I want. from http://www.opensourcestrategies.com/ofbiz/ofbiz_form_widget_cookbook.txt I got this: field name=glAccountId title=Account widget-style=tabletext display-entity entity-name=GlAccount description=${accountName} sub-hyperlink target=ListGlAccountEntries?glAccountId=${glAccountId} description=[${glAccountId}] link-style=tabletext/ /display-entity /field My code is : field name=primaryProductCategoryId title=Primary Category display-entity entity-name=ProductCategory key-field-name=productCategoryId description=${categoryName} sub-hyperlink target=EditCategory description=${categoryName} target-type=intra-app parameter param-name=productCategoryId value=${primaryProductCategoryId} / /sub-hyperlink /display-entity /field But this is not working. I need to put the CategoryName and not the categoryId in the link. Any one can help ? On Thu Aug 26,2010 03:20 pm, Mansour Al Akeel wrote: Bruno, this will resolve the issue with exception. But still don't know how to display a value from the related entity. Here's the code: field name=primaryProductCategoryId title=Primary Category display-entity entity-name=ProductCategory key-field-name=productCategoryId description=${categoryName} sub-hyperlink target=EditCategory description=${categoryName} target-type=intra-app parameter param-name=productCategoryId value=${primaryProductCategoryId} / /sub-hyperlink /display-entity /field How can I use the ${categoryName} in the sub-hyperlink ? On Thu Aug 26,2010 11:07 am, Bruno Busco wrote: I think you cannot have spaces in field names. Try field name=primaryCategory instead of field name=Primary Catgory 2010/8/26 Mansour Al Akeel mansour.alak...@gmail.com Hello all: I need to reference a value from a related entity. For example, I am displaying a list of Product, and one of the fields is the Category Name. field name=Primary Catgory display-entity entity-name=ProductCategory key-field-name=productCategoryId description=${categoryName} sub-hyperlink target=EditCategory description=${categoryName} parameter param-name=productCategoryId value=${primaryProductCategoryId} / /sub-hyperlink /display-entity /field I want to display ProductCategory.categoryName instead of ProductCategory.productCategoryId which is matched on Product.primaryProductCategoryId On the other hand, I keep on getting an exception that I don't understand: 2010-08-26 08:03:45,061 (http-0.0.0.0-8443-3) [FlexibleMapAccessor.java:141:INFO ] UEL exception while getting value: javax.el.ELException: Error parsing '${Primary Catgory}': syntax error at position 10, encountered 'Catgory', expected '}', original = Primary Catgory Any idea ?
Re: Related entity's data in a form field
Hello Bruno, No, that didn't help. It extracts the filed from an entity obtained by calling another service. I don't see a need for this. THe entity I want to use its field is in hand, it's just the matter of how to reference it, and use its field. On Thu Aug 26,2010 08:32 pm, Bruno Busco wrote: Hi Mansour, please search for form name=UpdateProductCategoryMember in the ProductForms.xml file. There is a field name=productCategoryId that I think is what you want to do. HTH, Bruno 2010/8/26 Mansour Al Akeel mansour.alak...@gmail.com Let me clarify what I want. from http://www.opensourcestrategies.com/ofbiz/ofbiz_form_widget_cookbook.txt I got this: field name=glAccountId title=Account widget-style=tabletext display-entity entity-name=GlAccount description=${accountName} sub-hyperlink target=ListGlAccountEntries?glAccountId=${glAccountId} description=[${glAccountId}] link-style=tabletext/ /display-entity /field My code is : field name=primaryProductCategoryId title=Primary Category display-entity entity-name=ProductCategory key-field-name=productCategoryId description=${categoryName} sub-hyperlink target=EditCategory description=${categoryName} target-type=intra-app parameter param-name=productCategoryId value=${primaryProductCategoryId} / /sub-hyperlink /display-entity /field But this is not working. I need to put the CategoryName and not the categoryId in the link. Any one can help ? On Thu Aug 26,2010 03:20 pm, Mansour Al Akeel wrote: Bruno, this will resolve the issue with exception. But still don't know how to display a value from the related entity. Here's the code: field name=primaryProductCategoryId title=Primary Category display-entity entity-name=ProductCategory key-field-name=productCategoryId description=${categoryName} sub-hyperlink target=EditCategory description=${categoryName} target-type=intra-app parameter param-name=productCategoryId value=${primaryProductCategoryId} / /sub-hyperlink /display-entity /field How can I use the ${categoryName} in the sub-hyperlink ? On Thu Aug 26,2010 11:07 am, Bruno Busco wrote: I think you cannot have spaces in field names. Try field name=primaryCategory instead of field name=Primary Catgory 2010/8/26 Mansour Al Akeel mansour.alak...@gmail.com Hello all: I need to reference a value from a related entity. For example, I am displaying a list of Product, and one of the fields is the Category Name. field name=Primary Catgory display-entity entity-name=ProductCategory key-field-name=productCategoryId description=${categoryName} sub-hyperlink target=EditCategory description=${categoryName} parameter param-name=productCategoryId value=${primaryProductCategoryId} / /sub-hyperlink /display-entity /field I want to display ProductCategory.categoryName instead of ProductCategory.productCategoryId which is matched on Product.primaryProductCategoryId On the other hand, I keep on getting an exception that I don't understand: 2010-08-26 08:03:45,061 (http-0.0.0.0-8443-3) [FlexibleMapAccessor.java:141:INFO ] UEL exception while getting value: javax.el.ELException: Error parsing '${Primary Catgory}': syntax error at position 10, encountered 'Catgory', expected '}', original = Primary Catgory Any idea ?
Re: Related entity's data in a form field
I think you cannot have spaces in field names. Try field name=primaryCategory instead of field name=Primary Catgory 2010/8/26 Mansour Al Akeel mansour.alak...@gmail.com Hello all: I need to reference a value from a related entity. For example, I am displaying a list of Product, and one of the fields is the Category Name. field name=Primary Catgory display-entity entity-name=ProductCategory key-field-name=productCategoryId description=${categoryName} sub-hyperlink target=EditCategory description=${categoryName} parameter param-name=productCategoryId value=${primaryProductCategoryId} / /sub-hyperlink /display-entity /field I want to display ProductCategory.categoryName instead of ProductCategory.productCategoryId which is matched on Product.primaryProductCategoryId On the other hand, I keep on getting an exception that I don't understand: 2010-08-26 08:03:45,061 (http-0.0.0.0-8443-3) [FlexibleMapAccessor.java:141:INFO ] UEL exception while getting value: javax.el.ELException: Error parsing '${Primary Catgory}': syntax error at position 10, encountered 'Catgory', expected '}', original = Primary Catgory Any idea ?
Re: Related entity's data in a form field
Bruno, this will resolve the issue with exception. But still don't know how to display a value from the related entity. Here's the code: field name=primaryProductCategoryId title=Primary Category display-entity entity-name=ProductCategory key-field-name=productCategoryId description=${categoryName} sub-hyperlink target=EditCategory description=${categoryName} target-type=intra-app parameter param-name=productCategoryId value=${primaryProductCategoryId} / /sub-hyperlink /display-entity /field How can I use the ${categoryName} in the sub-hyperlink ? On Thu Aug 26,2010 11:07 am, Bruno Busco wrote: I think you cannot have spaces in field names. Try field name=primaryCategory instead of field name=Primary Catgory 2010/8/26 Mansour Al Akeel mansour.alak...@gmail.com Hello all: I need to reference a value from a related entity. For example, I am displaying a list of Product, and one of the fields is the Category Name. field name=Primary Catgory display-entity entity-name=ProductCategory key-field-name=productCategoryId description=${categoryName} sub-hyperlink target=EditCategory description=${categoryName} parameter param-name=productCategoryId value=${primaryProductCategoryId} / /sub-hyperlink /display-entity /field I want to display ProductCategory.categoryName instead of ProductCategory.productCategoryId which is matched on Product.primaryProductCategoryId On the other hand, I keep on getting an exception that I don't understand: 2010-08-26 08:03:45,061 (http-0.0.0.0-8443-3) [FlexibleMapAccessor.java:141:INFO ] UEL exception while getting value: javax.el.ELException: Error parsing '${Primary Catgory}': syntax error at position 10, encountered 'Catgory', expected '}', original = Primary Catgory Any idea ?
Re: Related entity's data in a form field
Let me clarify what I want. from http://www.opensourcestrategies.com/ofbiz/ofbiz_form_widget_cookbook.txt I got this: field name=glAccountId title=Account widget-style=tabletext display-entity entity-name=GlAccount description=${accountName} sub-hyperlink target=ListGlAccountEntries?glAccountId=${glAccountId} description=[${glAccountId}] link-style=tabletext/ /display-entity /field My code is : field name=primaryProductCategoryId title=Primary Category display-entity entity-name=ProductCategory key-field-name=productCategoryId description=${categoryName} sub-hyperlink target=EditCategory description=${categoryName} target-type=intra-app parameter param-name=productCategoryId value=${primaryProductCategoryId} / /sub-hyperlink /display-entity /field But this is not working. I need to put the CategoryName and not the categoryId in the link. Any one can help ? On Thu Aug 26,2010 03:20 pm, Mansour Al Akeel wrote: Bruno, this will resolve the issue with exception. But still don't know how to display a value from the related entity. Here's the code: field name=primaryProductCategoryId title=Primary Category display-entity entity-name=ProductCategory key-field-name=productCategoryId description=${categoryName} sub-hyperlink target=EditCategory description=${categoryName} target-type=intra-app parameter param-name=productCategoryId value=${primaryProductCategoryId} / /sub-hyperlink /display-entity /field How can I use the ${categoryName} in the sub-hyperlink ? On Thu Aug 26,2010 11:07 am, Bruno Busco wrote: I think you cannot have spaces in field names. Try field name=primaryCategory instead of field name=Primary Catgory 2010/8/26 Mansour Al Akeel mansour.alak...@gmail.com Hello all: I need to reference a value from a related entity. For example, I am displaying a list of Product, and one of the fields is the Category Name. field name=Primary Catgory display-entity entity-name=ProductCategory key-field-name=productCategoryId description=${categoryName} sub-hyperlink target=EditCategory description=${categoryName} parameter param-name=productCategoryId value=${primaryProductCategoryId} / /sub-hyperlink /display-entity /field I want to display ProductCategory.categoryName instead of ProductCategory.productCategoryId which is matched on Product.primaryProductCategoryId On the other hand, I keep on getting an exception that I don't understand: 2010-08-26 08:03:45,061 (http-0.0.0.0-8443-3) [FlexibleMapAccessor.java:141:INFO ] UEL exception while getting value: javax.el.ELException: Error parsing '${Primary Catgory}': syntax error at position 10, encountered 'Catgory', expected '}', original = Primary Catgory Any idea ?
Re: Related entity's data in a form field
Hi Mansour, please search for form name=UpdateProductCategoryMember in the ProductForms.xml file. There is a field name=productCategoryId that I think is what you want to do. HTH, Bruno 2010/8/26 Mansour Al Akeel mansour.alak...@gmail.com Let me clarify what I want. from http://www.opensourcestrategies.com/ofbiz/ofbiz_form_widget_cookbook.txt I got this: field name=glAccountId title=Account widget-style=tabletext display-entity entity-name=GlAccount description=${accountName} sub-hyperlink target=ListGlAccountEntries?glAccountId=${glAccountId} description=[${glAccountId}] link-style=tabletext/ /display-entity /field My code is : field name=primaryProductCategoryId title=Primary Category display-entity entity-name=ProductCategory key-field-name=productCategoryId description=${categoryName} sub-hyperlink target=EditCategory description=${categoryName} target-type=intra-app parameter param-name=productCategoryId value=${primaryProductCategoryId} / /sub-hyperlink /display-entity /field But this is not working. I need to put the CategoryName and not the categoryId in the link. Any one can help ? On Thu Aug 26,2010 03:20 pm, Mansour Al Akeel wrote: Bruno, this will resolve the issue with exception. But still don't know how to display a value from the related entity. Here's the code: field name=primaryProductCategoryId title=Primary Category display-entity entity-name=ProductCategory key-field-name=productCategoryId description=${categoryName} sub-hyperlink target=EditCategory description=${categoryName} target-type=intra-app parameter param-name=productCategoryId value=${primaryProductCategoryId} / /sub-hyperlink /display-entity /field How can I use the ${categoryName} in the sub-hyperlink ? On Thu Aug 26,2010 11:07 am, Bruno Busco wrote: I think you cannot have spaces in field names. Try field name=primaryCategory instead of field name=Primary Catgory 2010/8/26 Mansour Al Akeel mansour.alak...@gmail.com Hello all: I need to reference a value from a related entity. For example, I am displaying a list of Product, and one of the fields is the Category Name. field name=Primary Catgory display-entity entity-name=ProductCategory key-field-name=productCategoryId description=${categoryName} sub-hyperlink target=EditCategory description=${categoryName} parameter param-name=productCategoryId value=${primaryProductCategoryId} / /sub-hyperlink /display-entity /field I want to display ProductCategory.categoryName instead of ProductCategory.productCategoryId which is matched on Product.primaryProductCategoryId On the other hand, I keep on getting an exception that I don't understand: 2010-08-26 08:03:45,061 (http-0.0.0.0-8443-3) [FlexibleMapAccessor.java:141:INFO ] UEL exception while getting value: javax.el.ELException: Error parsing '${Primary Catgory}': syntax error at position 10, encountered 'Catgory', expected '}', original = Primary Catgory Any idea ?