Absolutely... thank you.
Gwyn wrote:
>
> The point is that in the constructor, you're actually instantiating an
> anonymous class that *extends* EditForm. It won't work without the
> abstract, because the onXXX methods are abstract and need
> implementing.
>
> /Gwyn
>
> On 19/12/2007, bryan0101 <[EMAIL PROTECTED]> wrote:
>>
>> I have googled this question in many forms without much success. The
>> problem
>> is I'm trying to understand the appfuse wicket example. And the only
>> thing
>> I'm not getting is the use of private static abstract class inner member
>> class.
>>
>> <code>
>> public class UserForm extends BasePage {
>> @SpringBean
>> private UserManager userManager;
>> private final Page backPage;
>>
>> public UserForm(Page backPage) {
>> this(backPage, new User());
>> }
>>
>> public UserForm(final Page backPage, User user) {
>> this.backPage = backPage;
>>
>> // Create and add the form
>> EditForm form = new EditForm("user-form", user) {
>> protected void onSave(User user) {
>> onSaveUser(user);
>> }
>>
>> protected void onCancel() {
>> onCancelEditing();
>> }
>>
>> protected void onDelete(User user) {
>> onDeleteUser(user);
>> }
>> };
>> add(form);
>> }
>> ...
>> ...
>> private void onCancelEditing() {
>> setResponsePage(backPage);
>> }
>> private static abstract class EditForm extends Form {
>> private void add(FormComponent fc, IModel label) {
>> .....
>> </code>
>>
>> Now I understand inner class, static etc etc... But what is the use of
>> abstract in this instant, (all the while instantiating it in enclosing
>> class's constructor. Would it work with just private static class?
>> --
>> View this message in context:
>> http://www.nabble.com/In-appfuse-example%2C-UserForm-instantiate-static-abstract-inner-class---tp14425471p14425471.html
>> Sent from the Wicket - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
--
View this message in context:
http://www.nabble.com/In-appfuse-example%2C-UserForm-instantiate-static-abstract-inner-class---tp14425471p14428257.html
Sent from the Wicket - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]