OFBiz
  1. OFBiz
  2. OFBIZ-538

Parameterize CommonFacilityDecorator location in FaclityScreens

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: SVN trunk
    • Component/s: None
    • Labels:
      None

      Description

      Parameterize CommonFacilityDecorator location in FaclityScreens, Just makes it easy to write custom apps.

        Activity

        Hide
        Anil K Patel added a comment -

        I read that in you svn comment, Sorry for that, thanks for fixing it.

        Show
        Anil K Patel added a comment - I read that in you svn comment, Sorry for that, thanks for fixing it.
        Hide
        Jacques Le Roux added a comment -

        There was a little bug in menu.xml (2 "FindShipment" for In and Out) this is corrected in rev. 487666.

        Show
        Jacques Le Roux added a comment - There was a little bug in menu.xml (2 "FindShipment" for In and Out) this is corrected in rev. 487666.
        Hide
        Jacques Le Roux added a comment -

        Thanks Anil,

        I read the thread on Nabble, your patch is in OFBiz revision: 487648.

        Show
        Jacques Le Roux added a comment - Thanks Anil, I read the thread on Nabble, your patch is in OFBiz revision: 487648.
        Show
        Anil K Patel added a comment - http://www.nabble.com/Is-it-ok-to-Parameterize-location-of-Second-level-decorators-like-CommonFacilityDecorator-tf2782078.html#a7762143
        Hide
        Anil K Patel added a comment -

        Jacques,
        I had this discussed on dev list before creating Jira Issue. David had commented on that thread. Please refer to following link. I am waiting on this patch to go so I can submit the assetmaint app.

        http://mail-archives.apache.org/mod_mbox/incubator-ofbiz-dev/200612.mbox/%3c4579BB09.2020405@hlmksw.com%3e

        Regards

        Show
        Anil K Patel added a comment - Jacques, I had this discussed on dev list before creating Jira Issue. David had commented on that thread. Please refer to following link. I am waiting on this patch to go so I can submit the assetmaint app. http://mail-archives.apache.org/mod_mbox/incubator-ofbiz-dev/200612.mbox/%3c4579BB09.2020405@hlmksw.com%3e Regards
        Hide
        Jacques Le Roux added a comment -

        I reviewed this patch and like Adrian it seems a very good idea to me. Nevertheless I will wait at least another commiter opinion before commit it.

        Thanks

        Show
        Jacques Le Roux added a comment - I reviewed this patch and like Adrian it seems a very good idea to me. Nevertheless I will wait at least another commiter opinion before commit it. Thanks
        Hide
        Jacques Le Roux added a comment -

        OK, I see FacilityTabBar.ftl was used by old CommonFacilityDecorator, forget my advice.

        Show
        Jacques Le Roux added a comment - OK, I see FacilityTabBar.ftl was used by old CommonFacilityDecorator, forget my advice.
        Hide
        Anil K Patel added a comment -

        In remember this for Future. Thanks for looking at this patch. Regards

        Show
        Anil K Patel added a comment - In remember this for Future. Thanks for looking at this patch. Regards
        Hide
        Jacques Le Roux added a comment -

        Anil,

        In case like that please make 2 patches (1 for tab bar, 1 for Parameterized Decorator). It makes commiters job easier ;o)

        Thanks

        Show
        Jacques Le Roux added a comment - Anil, In case like that please make 2 patches (1 for tab bar, 1 for Parameterized Decorator). It makes commiters job easier ;o) Thanks
        Hide
        Anil K Patel added a comment -

        Is it possible for somebody to review this patch. I had it discussed on mailing list before creating this Jira issue.

        If there are problems with this Idea or the code submitted please comment. This will help us to make our contribution better and will motivate us to do more work that does not directly benifit our clients.

        Show
        Anil K Patel added a comment - Is it possible for somebody to review this patch. I had it discussed on mailing list before creating this Jira issue. If there are problems with this Idea or the code submitted please comment. This will help us to make our contribution better and will motivate us to do more work that does not directly benifit our clients.
        Hide
        Adrian Crum added a comment -

        Looks like a great idea! Thanks for the explanation.

        Show
        Adrian Crum added a comment - Looks like a great idea! Thanks for the explanation.
        Hide
        Anil K Patel added a comment -

        let's say now you want to use ViewFacilityInventoryByProduct in a some other component e.g assetmaint in hotdeploy folder.

        Define new CommonFacilityDecorator in assetmaint and Then add following line to web.xml file of asssetmaint component.

        <context-param>
        <param-name>commonFacilityDecoratorLocation</param-name>
        <param-value>component://assetmaint/widget/facility/CommonScreens.xml</param-value>
        <description>The location of the CommonFacilityDecorator screen to use for this webapp; referred to as a context variable in screen def XML files.</description>
        </context-param>

        The location of customer decorator is <param-value>component://assetmaint/widget/facility/CommonScreens.xml</param-value> in the above entry.

        View entry in controller.xml file of assetmaint component reads

        <view-map name="ViewFacilityInventoryByProduct" type="screen" page="component://product/widget/facility/FacilityScreens.xml#ViewFacilityInventoryByProduct"/>

        My screen will use decorator from assetmaint component and not from facility component. So now I have a ViewFacilityInventoryByProduct screen without coping it to assetmaint component.

        Hope this helps

        Show
        Anil K Patel added a comment - let's say now you want to use ViewFacilityInventoryByProduct in a some other component e.g assetmaint in hotdeploy folder. Define new CommonFacilityDecorator in assetmaint and Then add following line to web.xml file of asssetmaint component. <context-param> <param-name>commonFacilityDecoratorLocation</param-name> <param-value>component://assetmaint/widget/facility/CommonScreens.xml</param-value> <description>The location of the CommonFacilityDecorator screen to use for this webapp; referred to as a context variable in screen def XML files.</description> </context-param> The location of customer decorator is <param-value>component://assetmaint/widget/facility/CommonScreens.xml</param-value> in the above entry. View entry in controller.xml file of assetmaint component reads <view-map name="ViewFacilityInventoryByProduct" type="screen" page="component://product/widget/facility/FacilityScreens.xml#ViewFacilityInventoryByProduct"/> My screen will use decorator from assetmaint component and not from facility component. So now I have a ViewFacilityInventoryByProduct screen without coping it to assetmaint component. Hope this helps
        Hide
        Adrian Crum added a comment -

        How does it work? It looks like you'll have the decorator location specified in the request parameters. Is that correct?

        Show
        Adrian Crum added a comment - How does it work? It looks like you'll have the decorator location specified in the request parameters. Is that correct?
        Hide
        Anil K Patel added a comment -

        Implements this requirements from this Issue. Migrated Tabbar Menu to xml widget.

        Show
        Anil K Patel added a comment - Implements this requirements from this Issue. Migrated Tabbar Menu to xml widget.

          People

          • Assignee:
            Jacques Le Roux
            Reporter:
            Anil K Patel
          • Votes:
            1 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development