[ 
https://issues.apache.org/jira/browse/OFBIZ-1550?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12554939
 ] 

BJ Freeman commented on OFBIZ-1550:
-----------------------------------

See if we are using the pattern that you are suggesting then we can't directly 
use the "Screen" definition from the other component's controller file (i.e 
controller.xml.) if we want to change the behaviour or decoration pattern of 
that screen.For this we may need to create new "Screen" definition for each 
section that we are using from other component and we can only use the "Form" 
definition from other component.

When you using mor

Although if we are using the pattern in which location = 
${parameters.mainDecoratorLocation} is specified then we can override the 
definition
using "mainDecoratorLocation" from the component that is using that screen from 
controller.xml file.

You can only use one componet if you directly define mainDecoratorLocation

Scott showed me how to clone :
File Structure:

mycomponent/webapp/party/WEB-INF/controller.xml
mycomponent/webapp/party/WEB-INF/web.xml
mycomponent/webapp/catalog/WEB-INF/controller.xml
mycomponent/webapp/catalog/WEB-INF/web.xml
mycomponent/webapp/ordermgr/WEB-INF/controller.xml
mycomponent/webapp/ordermgr/WEB-INF/web.xml
mycomponent/widget/party/CommonScreens.xml
mycomponent/widget/catalog/CommonScreens.xml
mycomponent/widget/ordermgr/CommonScreens.xml
mycomponent/ofbiz-component.xml
------------------------------------------------------
mycomponent/webapp/party/WEB-INF/controller.xml:

<site-conf xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
        
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/site-conf.xsd";>
    <include 
location="component://party/webapp/partymgr/WEB-INF/controller.xml"/>
    <description>OFBiz: Cloned Party Controller Configuration File</description>
</site-conf>


mycomponent/webapp/party/WEB-INF/web.xml:
    <context-param>
        <param-name>mainDecoratorLocation</param-name>
        
<param-value>component://mycomponent/widget/party/CommonScreens.xml</param-value>
        <description>The location of the main-decorator screen to use for this 
webapp;</description>
    </context-param>

------------------------------------------------------
mycomponent/webapp/catalog/WEB-INF/controller.xml:
<site-conf xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
        
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/site-conf.xsd";>
    <include 
location="component://product/webapp/catalog/WEB-INF/controller.xml"/>
    <description>OFBiz: Cloned Catalog Controller Configuration 
File</description>
</site-conf>

mycomponent/webapp/catalogy/WEB-INF/web.xml:
    <context-param>
        <param-name>mainDecoratorLocation</param-name>
        
<param-value>component://mycomponent/widget/catalog/CommonScreens.xml</param-value>
        <description>The location of the main-decorator screen to use for this 
webapp;</description>
    </context-param>

------------------------------------------------------
mycomponent/webapp/ordermgr/WEB-INF/controller.xml:
<site-conf xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
        
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/site-conf.xsd";>
    <include 
location="component://order/webapp/ordermgr/WEB-INF/controller.xml"/>
    <description>OFBiz: Cloned OrderMgr Controller Configuration 
File</description>
</site-conf>

mycomponent/webapp/ordermgr/WEB-INF/web.xml:
    <context-param>
        <param-name>mainDecoratorLocation</param-name>
        
<param-value>component://mycomponent/widget/ordermgr/CommonScreens.xml</param-value>
        <description>The location of the main-decorator screen to use for this 
webapp;</description>
    </context-param>
-------------------------------------------------------
mycomponent/ofbiz-component.xml

<ofbiz-component name="mycomponent"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
        
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/ofbiz-component.xsd";>
    <resource-loader name="main" type="component"/>
    <webapp name="party"
        title="party"
        server="default-server"
        location="webapp/party"
        mount-point="/party"/>
    <webapp name="catalog"
        title="catalog Clone"
        server="default-server"
        location="webapp/catalog"
        mount-point="/catalog"/>
    <webapp name="ordermgr"
        title="ordermgr Clone"
        server="default-server"
        location="webapp/ordermgr"
        mount-point="/ordermgr"/>
</ofbiz-component>

You have to comment out the equivalent  in each component's ofbiz-component.xml 

> implement Screens to manage services for PartyInvitation Entity
> ---------------------------------------------------------------
>
>                 Key: OFBIZ-1550
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1550
>             Project: OFBiz
>          Issue Type: New Feature
>          Components: party
>    Affects Versions: SVN trunk
>            Reporter: Alok Agnihotri
>            Assignee: Ashish Vijaywargiya
>         Attachments: PartyInvitation_CRUD_UI.patch, 
> PartyInvitation_Crud_UI.patch
>
>
> implement UI to manage PartyInvitation with Search Form.
> You can Add the Screen at  Party ->Invitation
> https://localhost:8443/partymgr/control/partyInvitation
> Screen will Show Search Form with Search Button on click 
> it will show list of all PartyInvitations, with 
> update link on partyInvitationId and 
> delete link at the end of each record.
> Screen will also have a new PartyInvitation Link to create a new 
> PartyInvitation
> Link Should Display a Create Form in turn will display new Editable Screen 
> for the same partyInvitationId.
> The Editable Screen also include a Menu with Tab 
>  -Invitation, GroupAssoc, RoleAssoc
> Entity Used :
> 1) PartyInvitation
> 2)PartyInvitationGroupAssoc
> 3)PartyInvitation RoleAssoc
> You May Find Similar Screen Example ->Example for Reference
> https://localhost:8443/example/control/FindExample

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to