You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by "Daniel Riquelme (JIRA)" <ji...@apache.org> on 2012/07/22 17:34:33 UTC

[jira] [Created] (OFBIZ-4971) Improve Tree Widget to support Multiple PK Entities

Daniel Riquelme created OFBIZ-4971:
--------------------------------------

             Summary: Improve Tree Widget to support Multiple PK Entities
                 Key: OFBIZ-4971
                 URL: https://issues.apache.org/jira/browse/OFBIZ-4971
             Project: OFBiz
          Issue Type: Improvement
          Components: framework
    Affects Versions: SVN trunk
            Reporter: Daniel Riquelme
             Fix For: SVN trunk


The PKs are used to keep track of which nodes have been rendered when performing recursion inside Tree Widget rendering code.
Currently Multiple PKs Entities can't be used as nodes in a Tree Widget because the rendering code does not handle them.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (OFBIZ-4971) Improve Tree Widget to support Multiple PK Entities

Posted by "Jacques Le Roux (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OFBIZ-4971?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13420192#comment-13420192 ] 

Jacques Le Roux commented on OFBIZ-4971:
----------------------------------------

This sounds good Daniel, have you an use case to test?
                
> Improve Tree Widget to support Multiple PK Entities
> ---------------------------------------------------
>
>                 Key: OFBIZ-4971
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-4971
>             Project: OFBiz
>          Issue Type: Improvement
>          Components: framework
>    Affects Versions: SVN trunk
>            Reporter: Daniel Riquelme
>              Labels: patch
>             Fix For: SVN trunk
>
>         Attachments: OFBIZ-4971.patch
>
>
> The PKs are used to keep track of which nodes have been rendered when performing recursion inside Tree Widget rendering code.
> Currently Multiple PKs Entities can't be used as nodes in a Tree Widget because the rendering code does not handle them.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (OFBIZ-4971) Improve Tree Widget to support Multiple PK Entities

Posted by "Jacques Le Roux (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OFBIZ-4971?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13450431#comment-13450431 ] 

Jacques Le Roux commented on OFBIZ-4971:
----------------------------------------

Thanks Daniel,

Indeed this fixes a NPE which is throwed else.

Now I wanted to see if there are no regressions. And I used https://localhost:8443/workeffort/control/ChildWorkEfforts?workEffortId=9002&workEffortId={9002%2C+9002}&trail=9002|9003|9005

Unfortunately this fails when you click on the root node. It's *not related to this patch* since it can be reproduced at https://demo-trunk.ofbiz.apache.org/workeffort/control/ChildWorkEfforts?workEffortId=9002&workEffortId={9002%2C+{9002%2C+9002}}&trail=

My time is over this morning, I will get to it later when I will get a chance. Of course no needs to say that any help is appreciated.
                
> Improve Tree Widget to support Multiple PK Entities
> ---------------------------------------------------
>
>                 Key: OFBIZ-4971
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-4971
>             Project: OFBiz
>          Issue Type: Improvement
>          Components: framework
>    Affects Versions: SVN trunk
>            Reporter: Daniel Riquelme
>              Labels: patch
>             Fix For: SVN trunk
>
>         Attachments: OFBIZ-4971.patch
>
>
> The PKs are used to keep track of which nodes have been rendered when performing recursion inside Tree Widget rendering code.
> Currently Multiple PKs Entities can't be used as nodes in a Tree Widget because the rendering code does not handle them.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (OFBIZ-4971) Improve Tree Widget to support Multiple PK Entities

Posted by "Jacques Le Roux (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OFBIZ-4971?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jacques Le Roux updated OFBIZ-4971:
-----------------------------------

    Issue Type: Bug  (was: Improvement)
    
> Improve Tree Widget to support Multiple PK Entities
> ---------------------------------------------------
>
>                 Key: OFBIZ-4971
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-4971
>             Project: OFBiz
>          Issue Type: Bug
>          Components: framework
>    Affects Versions: SVN trunk
>            Reporter: Daniel Riquelme
>            Assignee: Jacques Le Roux
>              Labels: patch
>             Fix For: Release Branch 10.04, Release Branch 11.04, SVN trunk, Release Branch 12.04
>
>         Attachments: OFBIZ-4971.patch
>
>
> The PKs are used to keep track of which nodes have been rendered when performing recursion inside Tree Widget rendering code.
> Currently Multiple PKs Entities can't be used as nodes in a Tree Widget because the rendering code does not handle them.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (OFBIZ-4971) Improve Tree Widget to support Multiple PK Entities

Posted by "Daniel Riquelme (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OFBIZ-4971?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Daniel Riquelme updated OFBIZ-4971:
-----------------------------------

    Attachment: OFBIZ-4971.patch

Fixes Multiple PK Entities handling in Tree Widget
                
> Improve Tree Widget to support Multiple PK Entities
> ---------------------------------------------------
>
>                 Key: OFBIZ-4971
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-4971
>             Project: OFBiz
>          Issue Type: Improvement
>          Components: framework
>    Affects Versions: SVN trunk
>            Reporter: Daniel Riquelme
>              Labels: patch
>             Fix For: SVN trunk
>
>         Attachments: OFBIZ-4971.patch
>
>
> The PKs are used to keep track of which nodes have been rendered when performing recursion inside Tree Widget rendering code.
> Currently Multiple PKs Entities can't be used as nodes in a Tree Widget because the rendering code does not handle them.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Closed] (OFBIZ-4971) Improve Tree Widget to support Multiple PK Entities

Posted by "Jacques Le Roux (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OFBIZ-4971?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jacques Le Roux closed OFBIZ-4971.
----------------------------------

       Resolution: Fixed
    Fix Version/s: Release Branch 12.04
                   Release Branch 11.04
                   Release Branch 10.04
         Assignee: Jacques Le Roux

Thanks Daniel,

Your patch is in
trunk r1387884
R12.04 r1387885
R11.04 r1387886
R10.04 r1387887

I also created OFBIZ-5041 for the NPE I found

                
> Improve Tree Widget to support Multiple PK Entities
> ---------------------------------------------------
>
>                 Key: OFBIZ-4971
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-4971
>             Project: OFBiz
>          Issue Type: Improvement
>          Components: framework
>    Affects Versions: SVN trunk
>            Reporter: Daniel Riquelme
>            Assignee: Jacques Le Roux
>              Labels: patch
>             Fix For: Release Branch 10.04, Release Branch 11.04, SVN trunk, Release Branch 12.04
>
>         Attachments: OFBIZ-4971.patch
>
>
> The PKs are used to keep track of which nodes have been rendered when performing recursion inside Tree Widget rendering code.
> Currently Multiple PKs Entities can't be used as nodes in a Tree Widget because the rendering code does not handle them.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (OFBIZ-4971) Improve Tree Widget to support Multiple PK Entities

Posted by "Daniel Riquelme (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OFBIZ-4971?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13422600#comment-13422600 ] 

Daniel Riquelme commented on OFBIZ-4971:
----------------------------------------

Sorry for the delay, here is a test tree that will fail when the patch is not applied.
NOTE: entity-name must be provided for each node tag for this patch to work.

Create the file:

/ofbiz/specialpurpose/example/widget/example/ExampleTrees.xml


With the following content:
{code:title=ExampleTrees.xml|borderStyle=solid}
<trees xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/widget-tree.xsd">

	<tree name="ExampleTree" entity-name="ExampleFeatureAppl" root-node-name="node-root" default-render-style="expand-collapse" default-wrap-style="accountItem" expand-collapse-request="GlAccountNavigate">
        <node name="node-root" render-style="simple" entity-name="ExampleFeatureAppl">
            <sub-node node-name="node-body">
                <entity-condition entity-name="ExampleFeatureAppl">
                	<condition-expr field-name="exampleId" operator="not-equals" from-field="nullValue"/>
                </entity-condition>
            </sub-node>
        </node>
        <node name="node-body" entity-name="ExampleFeatureAppl">
            <entity-one entity-name="ExampleFeatureAppl" value-field="glAccount"></entity-one>
            <link target="EditExampleFeatureAppl" text="asd">
                <parameter param-name="exampleId"/>
                <parameter param-name="exampleFeatureId"/>
                <parameter param-name="fromDate"/>
            </link>
            <sub-node node-name="node-body">
                <entity-and entity-name="ExampleFeatureAppl">
                    <field-map field-name="exampleId" from-field="exampleId"/>
                    
                </entity-and>
            </sub-node>
        </node>
    </tree>
</trees>
{code}


Include the tree in any Screen, for example:
{code:title=ExampleScreens.xml#FindExample|borderStyle=solid}
...
<decorator-section name="search-results">
    <include-form name="ListExamples" location="component://example/widget/example/ExampleForms.xml"/>
    <include-tree location="component://example/widget/example/ExampleTrees.xml" name="ExampleTree"/>
...
</decorator-section>
{code}
                
> Improve Tree Widget to support Multiple PK Entities
> ---------------------------------------------------
>
>                 Key: OFBIZ-4971
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-4971
>             Project: OFBiz
>          Issue Type: Improvement
>          Components: framework
>    Affects Versions: SVN trunk
>            Reporter: Daniel Riquelme
>              Labels: patch
>             Fix For: SVN trunk
>
>         Attachments: OFBIZ-4971.patch
>
>
> The PKs are used to keep track of which nodes have been rendered when performing recursion inside Tree Widget rendering code.
> Currently Multiple PKs Entities can't be used as nodes in a Tree Widget because the rendering code does not handle them.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira