[
https://issues.apache.org/jira/browse/PIVOT-694?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13080020#comment-13080020
]
Sandro Martini commented on PIVOT-694:
--------------------------------------
Greg (and others), I try to write here a short summary of things to make this
issue resolved, at least for ListButton (currently the same issue happens even
in other components, and this is the reason because I haven't resolved this
issue now):
to have an event after a clear on a component like ListButton, you have to set
(for example in bxml) the attribute listDataKey (other components have similar
names) a value for it. Then (when data has to be resetted in the component)
call its clear() method, BUT after call even its repaint() method ... is this
right ?
Hope to be clear.
Note: I haven't found a sample for this in all Pivot, so could be useful to
move related test sources to something like ClearTest (under tests subproject
one time this issue will be completely resolved).
And for 2.1 extend this for clearSelection etc ... but this will be handled in
another ticket.
Comments ?
> Improvement in ListButton clear() method
> ----------------------------------------
>
> Key: PIVOT-694
> URL: https://issues.apache.org/jira/browse/PIVOT-694
> Project: Pivot
> Issue Type: Improvement
> Components: wtk
> Affects Versions: 2.0
> Environment: Pivot 2.0
> Win 7
> Reporter: Luiz Gustavo Stábile de Souza
> Assignee: Greg Brown
> Priority: Minor
> Fix For: 2.0.1
>
> Attachments: listButton problem.png
>
>
> I'm having problems with ListButton.
> When I try to clean a ListButton the last text selected before remains
> selected, even with no item in the ListData of the ListButton.
> I tried listButton.clear() and listButton.getListData().clear(), but with
> none of this I can scape the problem.
> I debugged the application, and the listData of the ListButton is clear after
> getListData().clear(), but the last selected text remains showing.
> See attached image.
> Perhaps listButton.setButtonData(null) should be performed in
> ListButton#clear().
> Cheers
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira