Package com.dodo.blog.ui.component.container

Examples of com.dodo.blog.ui.component.container.Form


    @Override
    public void onRender()
    {
        setHeader( localize( "header.playgroundEdit" ) );

        Form form = new Form( PLAYGROUND_FORM, Playground.class );
        add( form );

        FieldSet fieldSet = new FieldSet( localize( "title.playgroundEdit" ) );
        form.add( fieldSet );

        fieldSet.add( new FormRow( localize( "label.description" ), new TextBox( "description" ).setAutoFocus( true ) ) );
        fieldSet.add( new FormRow( localize( "label.code" ), new TextArea( "code" ) ) );

        form.add( new AjaxSubmitButton( "save", localize( "button.save" ) ) );
        form.add( new Anchor( "cancel", localize( "button.cancel" ), PlaygroundList.class ) );
    }
View Full Code Here


    @Override
    public void onRender()
    {
        setHeader( localize( "header.categoryEdit" ) );

        Form form = new Form( CATEGORY_FORM, Category.class );
        add( form );

        FieldSet fieldSet = new FieldSet( localize( "title.categoryEdit" ) );
        form.add( fieldSet );

        fieldSet.add( new FormRow( localize( "label.name" ), new TextBox( "name" ).setAutoFocus( true ) ) );

        form.add( new AjaxSubmitButton( "save", localize( "button.save" ) ) );
        form.add( new Anchor( "cancel", localize( "button.cancel" ), CategoryList.class ) );
    }
View Full Code Here

    @Override
    public void onRender()
    {
        setHeader( localize( "header.tagEdit" ) );

        Form form = new Form( TAG_FORM, Tag.class );
        add( form );

        FieldSet fieldSet = new FieldSet( localize( "title.tagEdit" ) );
        form.add( fieldSet );

        fieldSet.add( new FormRow( localize( "label.name" ), new TextBox( "name" ).setAutoFocus( true ) ) );

        form.add( new AjaxSubmitButton( "save", localize( "button.save" ) ) );
        form.add( new Anchor( "cancel", localize( "button.cancel" ), TagList.class ) );
    }
View Full Code Here

    @Override
    public void onRender()
    {
        setHeader( localize( "header.articleEdit" ) );

        Form form = new Form( ARTICLE_FORM, Article.class );
        add( form );

        FieldSet fieldSet = new FieldSet( localize( "title.articleEdit" ) );
        form.add( fieldSet );

        fieldSet.add( new FormRow( localize( "label.name" ), new TextBox( "title" ).setAutoFocus( true ) ) );
        fieldSet.add( new FormRow( localize( "label.content" ), new TextArea( "content" ) ) );
        fieldSet.add( new FormRow( localize( "label.category" ), new Select<Category>( "category", getCategories(), new EntityChoiceRenderer(), true ) ) );

        for ( int i = 1; i <= 5; i++ )
        {
            fieldSet.add( new FormRow( localize( "label.tag" ) + "_" + i, new Select<Tag>( "tag_" + i, getTags(), new EntityChoiceRenderer(), true ) ) );
        }

        form.add( new AjaxSubmitButton( "save", localize( "button.save" ) ) );
        form.add( new Anchor( "cancel", localize( "button.cancel" ), ArticleList.class ) );
    }
View Full Code Here

    @Override
    public void onRender()
    {
        setHeader( localize( "header.registration" ) );

        Form form = new Form( REGISTRATION_FORM, Account.class );
        add( form );

        FieldSet loginInfo = new FieldSet( localize( "title.loginInfo" ) );
        form.add( loginInfo );

        loginInfo.add( new FormRow( localize( "label.loginProvider" ), new Select<LoginProvider>( "loginProvider", LoginProvider.class.getEnumConstants(), new EnumChoiceRenderer() ) ) );
        loginInfo.add( new FormRow( localize( "label.email" ), new TextBox( "email" ) ) );
        loginInfo.add( new FormRow( localize( "label.login" ), new TextBox( "login" ) ) );
        loginInfo.add( new FormRow( localize( "label.password" ), new TextBox( "password" ) ) );
        loginInfo.add( new FormRow( localize( "label.passwordAgain" ), new TextBox( "passwordAgain" ) ) );

        FieldSet additionalInfo = new FieldSet( localize( "title.additionalInfo" ) );
        form.add( additionalInfo );

        additionalInfo.add( new FormRow( localize( "label.name" ), new TextBox( "name" ) ) );
        additionalInfo.add( new FormRow( localize( "label.surname" ), new TextBox( "surname" ) ) );
        additionalInfo.add( new FormRow( localize( "label.notify" ), new CheckBox( "notify" ) ) );

        // TODO: captcha

        form.add( new AjaxSubmitButton( "save", localize( "button.register" ) ) );
    }
View Full Code Here

    @Override
    public void onRender()
    {
        setHeader( localize( "header.myAccount" ) );

        Form form = new Form( MY_ACCOUNT_FORM, Account.class );
        add( form );

        FieldSet loginInfo = new FieldSet( localize( "title.loginInfo" ) );
        form.add( loginInfo );

        loginInfo.add( new FormRow( localize( "label.email" ), new ReadOnlyBox( "userInfo" ) ) );

        FieldSet additionalInfo = new FieldSet( localize( "title.additionalInfo" ) );
        form.add( additionalInfo );

        additionalInfo.add( new FormRow( localize( "label.name" ), new TextBox( "name" ) ) );
        additionalInfo.add( new FormRow( localize( "label.surname" ), new TextBox( "surname" ) ) );
        additionalInfo.add( new FormRow( localize( "label.notify" ), new CheckBox( "notify" ) ) );

        form.add( new AjaxSubmitButton( "save", localize( "button.save" ) ) );
    }
View Full Code Here

    private FieldSet renderLoginPanel( LoginProperties loginProperties )
    {
        FieldSet classicLoginFieldSet = new FieldSet( localize( "title.classicLogin" ) );
        classicLoginFieldSet.setClassName( "login-classic-panel" );

        Form form = new Form( loginProperties.getLoginServletPath() );
        classicLoginFieldSet.add( form );

        form.add( new FormRow( localize( "label.login" ), new TextBox( loginProperties.getLoginParamName() ) ) );
        form.add( new FormRow( localize( "label.password" ), new PasswordBox( loginProperties.getLoginParamPassword() ) ) );
        form.add( new SubmitButton( "login", localize( "button.login" ) ) );

        return classicLoginFieldSet;
    }
View Full Code Here

            menu.add( menuItem );
        }

        // TODO: implement search
        Form form = new Form( "search-form" );
        form.add( new TextBox( "search" ).setPlaceHolder( localize( "placeholder.search" ) ) );
        add( form );
    }
View Full Code Here

TOP

Related Classes of com.dodo.blog.ui.component.container.Form

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.