You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Rens Verhage (JIRA)" <ji...@apache.org> on 2008/04/03 17:08:25 UTC
[jira] Created: (WICKET-1477) Constructor code obstructs
extendibility of components
Constructor code obstructs extendibility of components
------------------------------------------------------
Key: WICKET-1477
URL: https://issues.apache.org/jira/browse/WICKET-1477
Project: Wicket
Issue Type: Improvement
Components: wicket, wicket-extensions
Affects Versions: 1.3.2
Reporter: Rens Verhage
Fix For: 1.4-M1
A lot of components contain way too much initializing code in their constructors. In my opinion a constructor ideally should only call super and set some private properties. In the current situation I'm very limited in extending components for custom usage. An example:
I'd like to change the hierarchy of the DataGridView in a DataTable. Therefore I'd like to extend DataTable. However, since the DataTable constructs its DataGridView inside its constructor, I'm obliged to implement my own DataTable by copy pasting everything from the wicket-extensions DataTable class. I can live with that, but now I have lost the ability to add toolbars to my DataTable as the AbstractToolbar expects a wicket-extensions DataTable as one of its constructor parameters. Is it possible to revise Wicket's components and move initializing code to a init() method so I can just override 1 simple method instead of reimplementing the whole Wicket framework ;) ?
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (WICKET-1477) Constructor code obstructs
extendibility of components
Posted by "Igor Vaynberg (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-1477?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Igor Vaynberg resolved WICKET-1477.
-----------------------------------
Resolution: Won't Fix
Assignee: Igor Vaynberg
the way dataview is created and managed inside datatable is datatable's encapsulated implementation detail which it chooses not to expose. this has nothing to do with where the dataview is added, how, and when. this is a design choice that was made.
you can still tweak it by moving it in onbeforerender(), but you are doing so at your own risk.
> Constructor code obstructs extendibility of components
> ------------------------------------------------------
>
> Key: WICKET-1477
> URL: https://issues.apache.org/jira/browse/WICKET-1477
> Project: Wicket
> Issue Type: Improvement
> Components: wicket, wicket-extensions
> Affects Versions: 1.3.2
> Reporter: Rens Verhage
> Assignee: Igor Vaynberg
> Fix For: 1.4-M1
>
>
> A lot of components contain way too much initializing code in their constructors. In my opinion a constructor ideally should only call super and set some private properties. In the current situation I'm very limited in extending components for custom usage. An example:
> I'd like to change the hierarchy of the DataGridView in a DataTable. Therefore I'd like to extend DataTable. However, since the DataTable constructs its DataGridView inside its constructor, I'm obliged to implement my own DataTable by copy pasting everything from the wicket-extensions DataTable class. I can live with that, but now I have lost the ability to add toolbars to my DataTable as the AbstractToolbar expects a wicket-extensions DataTable as one of its constructor parameters. Is it possible to revise Wicket's components and move initializing code to a init() method so I can just override 1 simple method instead of reimplementing the whole Wicket framework ;) ?
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Closed: (WICKET-1477) Constructor code obstructs
extendibility of components
Posted by "Martijn Dashorst (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-1477?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Martijn Dashorst closed WICKET-1477.
------------------------------------
> Constructor code obstructs extendibility of components
> ------------------------------------------------------
>
> Key: WICKET-1477
> URL: https://issues.apache.org/jira/browse/WICKET-1477
> Project: Wicket
> Issue Type: Improvement
> Components: wicket, wicket-extensions
> Affects Versions: 1.3.2
> Reporter: Rens Verhage
> Assignee: Igor Vaynberg
>
> A lot of components contain way too much initializing code in their constructors. In my opinion a constructor ideally should only call super and set some private properties. In the current situation I'm very limited in extending components for custom usage. An example:
> I'd like to change the hierarchy of the DataGridView in a DataTable. Therefore I'd like to extend DataTable. However, since the DataTable constructs its DataGridView inside its constructor, I'm obliged to implement my own DataTable by copy pasting everything from the wicket-extensions DataTable class. I can live with that, but now I have lost the ability to add toolbars to my DataTable as the AbstractToolbar expects a wicket-extensions DataTable as one of its constructor parameters. Is it possible to revise Wicket's components and move initializing code to a init() method so I can just override 1 simple method instead of reimplementing the whole Wicket framework ;) ?
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (WICKET-1477) Constructor code obstructs
extendibility of components
Posted by "Frank Bille Jensen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-1477?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Frank Bille Jensen updated WICKET-1477:
---------------------------------------
Fix Version/s: (was: 1.4-M1)
> Constructor code obstructs extendibility of components
> ------------------------------------------------------
>
> Key: WICKET-1477
> URL: https://issues.apache.org/jira/browse/WICKET-1477
> Project: Wicket
> Issue Type: Improvement
> Components: wicket, wicket-extensions
> Affects Versions: 1.3.2
> Reporter: Rens Verhage
> Assignee: Igor Vaynberg
>
> A lot of components contain way too much initializing code in their constructors. In my opinion a constructor ideally should only call super and set some private properties. In the current situation I'm very limited in extending components for custom usage. An example:
> I'd like to change the hierarchy of the DataGridView in a DataTable. Therefore I'd like to extend DataTable. However, since the DataTable constructs its DataGridView inside its constructor, I'm obliged to implement my own DataTable by copy pasting everything from the wicket-extensions DataTable class. I can live with that, but now I have lost the ability to add toolbars to my DataTable as the AbstractToolbar expects a wicket-extensions DataTable as one of its constructor parameters. Is it possible to revise Wicket's components and move initializing code to a init() method so I can just override 1 simple method instead of reimplementing the whole Wicket framework ;) ?
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (WICKET-1477) Constructor code obstructs
extendibility of components
Posted by "Eelco Hillenius (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-1477?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12585150#action_12585150 ]
Eelco Hillenius commented on WICKET-1477:
-----------------------------------------
So what if the initialization would have been done in an overridable init method? What do you want to change? I bet that what you'll end up with isn't in any way better maintainable than just creating your own DataTable-like component from scratch, and doing the latter means that you can create a base class exactly to your liking and over which you'll have full control.
> Constructor code obstructs extendibility of components
> ------------------------------------------------------
>
> Key: WICKET-1477
> URL: https://issues.apache.org/jira/browse/WICKET-1477
> Project: Wicket
> Issue Type: Improvement
> Components: wicket, wicket-extensions
> Affects Versions: 1.3.2
> Reporter: Rens Verhage
> Fix For: 1.4-M1
>
>
> A lot of components contain way too much initializing code in their constructors. In my opinion a constructor ideally should only call super and set some private properties. In the current situation I'm very limited in extending components for custom usage. An example:
> I'd like to change the hierarchy of the DataGridView in a DataTable. Therefore I'd like to extend DataTable. However, since the DataTable constructs its DataGridView inside its constructor, I'm obliged to implement my own DataTable by copy pasting everything from the wicket-extensions DataTable class. I can live with that, but now I have lost the ability to add toolbars to my DataTable as the AbstractToolbar expects a wicket-extensions DataTable as one of its constructor parameters. Is it possible to revise Wicket's components and move initializing code to a init() method so I can just override 1 simple method instead of reimplementing the whole Wicket framework ;) ?
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (WICKET-1477) Constructor code obstructs
extendibility of components
Posted by "Johan Compagner (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-1477?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12585160#action_12585160 ]
Johan Compagner commented on WICKET-1477:
-----------------------------------------
and if we had such an init method
when is that thing called?
not from a super class constructor i hope?
Then we are again in another balgame because then we have to have after constructor call initialization
> Constructor code obstructs extendibility of components
> ------------------------------------------------------
>
> Key: WICKET-1477
> URL: https://issues.apache.org/jira/browse/WICKET-1477
> Project: Wicket
> Issue Type: Improvement
> Components: wicket, wicket-extensions
> Affects Versions: 1.3.2
> Reporter: Rens Verhage
> Fix For: 1.4-M1
>
>
> A lot of components contain way too much initializing code in their constructors. In my opinion a constructor ideally should only call super and set some private properties. In the current situation I'm very limited in extending components for custom usage. An example:
> I'd like to change the hierarchy of the DataGridView in a DataTable. Therefore I'd like to extend DataTable. However, since the DataTable constructs its DataGridView inside its constructor, I'm obliged to implement my own DataTable by copy pasting everything from the wicket-extensions DataTable class. I can live with that, but now I have lost the ability to add toolbars to my DataTable as the AbstractToolbar expects a wicket-extensions DataTable as one of its constructor parameters. Is it possible to revise Wicket's components and move initializing code to a init() method so I can just override 1 simple method instead of reimplementing the whole Wicket framework ;) ?
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.