Issue 121 in wicketforge: rethink: support components via factory methods

0 views
Skip to first unread message

wicke...@googlecode.com

unread,
Feb 9, 2013, 7:37:07 AM2/9/13
to wicketforge...@googlegroups.com
Status: Accepted
Owner: minas.ma...@gmail.com
Labels: Type-Task Priority-Low

New issue 121 by minas.ma...@gmail.com: rethink: support components via
factory methods
http://code.google.com/p/wicketforge/issues/detail?id=121

check if there is a straightforward way to add basic support for
components, created through factory methods like

onInitialize() {
add(newNameEditor("firstName"));
}

TextField<String> newNameEditor(String id) {
return new TextField<String>(id);
}

see issue 72

wicke...@googlecode.com

unread,
Feb 9, 2013, 7:48:38 AM2/9/13
to wicketforge...@googlegroups.com

Comment #1 on issue 121 by minas.ma...@gmail.com: rethink: support
We have to reference the method call (PsiMethodCallExpression) and not the
new component creation of TextField (PsiNewExpression). So we dont have a
PsiNewExpression anymore, how can we deal with it?

wicke...@googlecode.com

unread,
Feb 24, 2013, 2:20:16 PM2/24/13
to wicketforge...@googlegroups.com

Comment #5 on issue 121 by minas.ma...@gmail.com: rethink: support
Issue 101 has been merged into this issue.

--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

wicke...@googlecode.com

unread,
Mar 14, 2014, 3:49:01 AM3/14/14
to wicketforge...@googlegroups.com

Comment #7 on issue 121 by paul.hui...@gmail.com: rethink: support
Maybe add a @ComponentFactory annotation?

wicke...@googlecode.com

unread,
Mar 14, 2014, 4:54:21 AM3/14/14
to wicketforge...@googlegroups.com

Comment #8 on issue 121 by minas.ma...@gmail.com: rethink: support
Thanks for the input.

The annotation would be probably a good solution (because IDEA supports
also to annotate libs, needed for Date Component Factories).

On the opposite, I don't like the idea that developers need to have
annotations in their code only to make the plugin work properly (without
any need for the project itself). Another point is, this annotation is also
needed to compile the project (so you need to add another dependency, again
without any need). In bigger teams (with devs using different IDE) someone
might wonder about the annotation.

I've also think about a comment instead of an annotation, so you don't need
an additional jar to compile, but still: 'code' only for the plugin and lib
methods cannot marked as factories. :-/

wicke...@googlecode.com

unread,
Jun 25, 2014, 3:20:59 PM6/25/14
to wicketforge...@googlegroups.com

Comment #9 on issue 121 by minas.ma...@gmail.com: rethink: support
Well, I thought that every method with string parameter and returning a
wicket component could be recognized as a factory method, but I'm afraid
that this would also hit a lot of unwanted methods.
Reply all
Reply to author
Forward
0 new messages