Hi, Jacques
please check the attached patch
summarize
1. replace FTL with form widget
2. but, the attribute red-when seem like not working
I had also tested the red-when in Ofbiz Demo - ProductForms
https://demo-trunk.ofbiz.apache.org/catalog/control/EditProduct?productId=GZ-2644
introductionDate, salesDiscontinuationDate
It seem like not showing the 'red' wording
Regards,
Jen Sing
On Fri, Feb 28, 2014 at 5:32 AM, Jacques Le Roux <
[email protected]> wrote:
> Hi Jen,
>
> Please yes provide your patch.
>
> I don't remember about
>
> >there are also JIRA (if i not mistaken), to substitute externalLoginKey
> implementation
> But if I have well understood you will provide a patch to replace a FTL
> implementation by a form widget one, so this should not be a pb as you
> stated
>
> Thanks
>
> Jacques
>
>
> Le 27/02/2014 02:53, Jen Sing Choe a écrit :
>
> Hi,
>> Tested against the ofbiz demo trunk
>>
>> https://demo-trunk.ofbiz.apache.org/catalog/control/
>> EditProductParties?productId=FORKLIFT_PROPANE
>>
>> when you click on the hyperlink Party Id
>> ofbiz will open in a new tab and asking for authentication again.
>>
>> https://demo-trunk.ofbiz.apache.org/partymgr/control/
>> viewprofile?partyId=10002
>>
>> But in Catalog Manager -> Catalogs -> Parties
>> https://demo-trunk.ofbiz.apache.org/catalog/control/
>> EditProdCatalogParties?prodCatalogId=DemoCatalog
>>
>> this is not a problem, because the form-widget are appending the
>> externalLoginKey
>>
>> I understand (if i not mistaken), that there is previous JIRA that are
>> going to housekeep ftl to using form widget.
>> there are also JIRA (if i not mistaken), to substitute externalLoginKey
>> implementation
>>
>> if the above is still valid, then i provide the patch. its a simple patch.
>>
>>
--
Disclaimer : This E-mail is intended only for the use of the individual or
entity named above and may contain information that is confidential. If you
are not the intended recipients, please immediately notify us by return
email and delete it from your system. Any unauthorised dissemination,
distribution or copying of this email is strictly prohibited. Thank You.
Index: trunk/applications/product/widget/catalog/ProductForms.xml
===================================================================
--- trunk/applications/product/widget/catalog/ProductForms.xml (revision 1561929)
+++ trunk/applications/product/widget/catalog/ProductForms.xml (working copy)
@@ -2129,7 +2129,36 @@
<form name="EditCommEvent" extends="EditCommEvent" extends-resource="component://party/widget/partymgr/CommunicationEventForms.xml">
<field name="productId" map-name="parameters"><hidden/></field>
</form>
-
+
+ <form name="UpdateProductRole" type="list" target="updatePartyToProduct" title="" list-name="productRoles"
+ odd-row-style="alternate-row" default-table-style="basic-table">
+ <auto-fields-service service-name="updatePartyToProduct"/>
+ <field name="productId"><hidden/></field>
+ <field name="sequenceNum"><text size="5"/></field>
+ <field name="comments"><text size="30"/></field>
+
+ <!-- three possibilities for the Party: person, partyGroup, neither... just print everything and if it's empty, no biggie -->
+ <field name="partyId" title="${uiLabelMap.PartyParty}">
+ <display-entity entity-name="PartyNameView" description="${personalTitle} ${firstName} ${middleName} ${lastName} ${suffix} ${groupName}" also-hidden="true" cache="false">
+ <sub-hyperlink target-type="inter-app" link-style="buttontext" target="/partymgr/control/viewprofile" description="${partyId}">
+ <parameter param-name="party_id" from-field="partyId"/>
+ </sub-hyperlink>
+ </display-entity>
+ </field>
+ <field name="roleTypeId" title="${uiLabelMap.PartyRole}"><display-entity entity-name="RoleType"/></field>
+ <field name="fromDate" title="${uiLabelMap.CommonFromDateTime}" red-when="after-now"><display/></field>
+ <field name="thruDate" title="${uiLabelMap.CommonThruDateTime}" red-when="before-now"></field>
+ <field name="submitButton" title="${uiLabelMap.CommonUpdate}" widget-style="smallSubmit"><submit button-type="button"/></field>
+ <field name="deleteLink" title=" " widget-style="buttontext">
+ <hyperlink target="removePartyFromProduct" description="${uiLabelMap.CommonDelete}" also-hidden="false">
+ <parameter param-name="productId"/>
+ <parameter param-name="partyId"/>
+ <parameter param-name="roleTypeId"/>
+ <parameter param-name="fromDate"/>
+ </hyperlink>
+ </field>
+ </form>
+
<form name="AddProductRole" type="single" target="addPartyToProduct" title=""
header-row-style="header-row" default-table-style="basic-table">
<auto-fields-service service-name="addPartyToProduct"/>
Index: trunk/applications/product/widget/catalog/ProductScreens.xml
===================================================================
--- trunk/applications/product/widget/catalog/ProductScreens.xml (revision 1561929)
+++ trunk/applications/product/widget/catalog/ProductScreens.xml (working copy)
@@ -1231,10 +1231,9 @@
<decorator-screen name="CommonProductDecorator" location="${parameters.productDecoratorLocation}">
<decorator-section name="body">
<screenlet title="${uiLabelMap.PageTitleEditProductParties}">
- <platform-specific>
- <html><html-template location="component://product/webapp/catalog/product/EditProductParties.ftl"/></html>
- </platform-specific>
+ <include-form name="UpadateProductRole" location="component://product/widget/catalog/ProductForms.xml"/>
</screenlet>
+
<screenlet title="${uiLabelMap.ProductAssociatePartyToProduct}">
<include-form name="AddProductRole" location="component://product/widget/catalog/ProductForms.xml"/>
</screenlet>