[MAGNOLIA-535] Button control uses hardcoded events Created: 30/Aug/05 Updated: 17/Mar/09 Resolved: 02/Sep/05 |
|
| Status: | Closed |
| Project: | Magnolia |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 2.1 Final |
| Type: | Bug | Priority: | Major |
| Reporter: | Martin Wehner | Assignee: | Philipp Bärfuss |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
| Template: |
|
| Acceptance criteria: |
Empty
|
| Task DoD: |
[ ]*
Doc/release notes changes? Comment present?
[ ]*
Downstream builds green?
[ ]*
Solution information and context easily available?
[ ]*
Tests
[ ]*
FixVersion filled and not yet released
[ ] 
Architecture Decision Record (ADR)
|
| Bug DoR: |
[ ]*
Steps to reproduce, expected, and actual results filled
[ ]*
Affected version filled
|
| Date of First Response: |
| Description |
|
The Button control class uses hardcoded events instead of using set/getEvent. So you can't add custom events (like a mouseover) when subclassing Button. |
| Comments |
| Comment by Martin Wehner [ 30/Aug/05 ] |
|
This patch adds the push button events via setEvent(). This makes it possible to add own events in subclasses of Button. The drawback of this approach is that if the same instance of Button is rendered twice, the events will get added twice too. However, this problem seems to exist in some other magnolia controls too (mainbar for example), so I'm not sure if it's worth worrying about. |
| Comment by Martin Wehner [ 30/Aug/05 ] |
|
This is a wee bit nicer version of the patch which uses getHtmlCssClass() to render the class attribute. |
| Comment by Martin Wehner [ 30/Aug/05 ] |
|
Wrong bug for the updated patch, sorry for the spam. |
| Comment by Philipp Bracher [ 02/Sep/05 ] |
|
applied. will commit to 2.1 branch and merge with 2.2 trunk later |