tapestry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tadeáš Palusga (JIRA) <j...@apache.org>
Subject [jira] [Updated] (TAP5-2222) Allow NODE_SELECTED and NODE_UNSELECTED events for inner tree nodes
Date Wed, 13 Nov 2013 21:55:21 GMT

     [ https://issues.apache.org/jira/browse/TAP5-2222?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Tadeáš Palusga updated TAP5-2222:
---------------------------------

    Attachment: Tree.patch

> Allow NODE_SELECTED and NODE_UNSELECTED events for inner tree nodes
> -------------------------------------------------------------------
>
>                 Key: TAP5-2222
>                 URL: https://issues.apache.org/jira/browse/TAP5-2222
>             Project: Tapestry 5
>          Issue Type: Improvement
>          Components: tapestry-core
>    Affects Versions: 5.3.7
>            Reporter: Tadeáš Palusga
>            Priority: Trivial
>              Labels: component, features, patch
>         Attachments: Tree.patch
>
>
> Hi, 
>   I run into the situation that I need to use NODE_SELECTED and NODE_UNSELECTED events
not only for leaf nodes but for inner nodes too.
> I think the previous sentence is as describing as it can be :)
> I'm new in committing/pull-requesting/patch-requesting to open-source project so please
be lenient to me :)
> I provide simple patch - I added parameter "selectableNodes", which is used to determine
if inner nodes should be selectable - default is false due to backward compatibility
> 72,79d71
> < 
> <     /**
> <      * Optional parameter used to specify whether inner nodes should be selectable
or not. Default value
> <      * is false.
> <      */
> <     @Parameter
> <     private boolean selectableNodes;
> < 
> 184,185d175
> < 
> < 
> 198,200d187
> < 
> <                     if (selectableNodes)
> <                         addSelectLinkBinding(spec);
> 203c190,202
> <                     addSelectLinkBinding(spec);
> ---
> >                     if (selectionModel != null)
> >                     {
> >                         // May need to address this in the future; in other tree
implementations I've constructed,
> >                         // folders are selectable, and selections even propagate
up and down the tree.
> > 
> >                         Link selectLeaf = resources.createEventLink("select", node.getId());
> > 
> >                         spec.put("selectURL", selectLeaf.toString());
> >                         if (selectionModel.isSelected(node))
> >                         {
> >                             spec.put("selected", true);
> >                         }
> >                     }
> 225a225
> >         }
> 227,242c227
> <             private void addSelectLinkBinding(JSONObject spec) {
> <                 if (selectionModel != null)
> <                 {
> <                     // May need to address this in the future; in other tree implementations
I've constructed,
> <                     // folders are selectable, and selections even propagate up
and down the tree.
> < 
> <                     Link selectLeaf = resources.createEventLink("select", node.getId());
> < 
> <                     spec.put("selectURL", selectLeaf.toString());
> <                     if (selectionModel.isSelected(node))
> <                     {
> <                         spec.put("selected", true);
> <                     }
> <                 }
> <             }
> <         };
> ---
> >                 ;



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Mime
View raw message