Package org.apache.wicket.behavior

Examples of org.apache.wicket.behavior.SimpleAttributeModifier


   
    @Override
    protected Link newPagingNavigationLink(String id, IPageable pageable, int pageNumber) {
        Link link = super.newPagingNavigationLink(id, pageable, pageNumber);
        // we turn the id into the css class
        link.add(new SimpleAttributeModifier("class", id));
        return link;
    }
View Full Code Here


   
    @Override
    protected Link newPagingNavigationIncrementLink(String id, IPageable pageable, int increment) {
        Link link = super.newPagingNavigationIncrementLink(id, pageable, increment);
        // we turn the id into the css class
        link.add(new SimpleAttributeModifier("class", id));
        return link;
    }
View Full Code Here

        add(feedback);
        {
            final String titleKey = RESOURCE_KEY_PREFIX + ".tableNameChoice.title";
            ResourceModel titleModel = new ResourceModel(titleKey);
            String title = String.valueOf(titleModel.getObject());
            choice.add(new SimpleAttributeModifier("title", title));
        }

        final AjaxSubmitLink refreshTablesLink = new AjaxSubmitLink("refresh", storeEditForm) {
            private static final long serialVersionUID = 1L;

            /**
             * We're not doing any validation here, just want to perform the same attempt to get to
             * the list of connection parameters than at {@link #onSumbit}
             */
            @Override
            protected void onError(AjaxRequestTarget target, Form form) {
                onSubmit(target, form);
            }

            @Override
            protected void onSubmit(final AjaxRequestTarget target, final Form form) {

                final String server = serverComponent.getValue();
                final String port = portComponent.getValue();
                final String instance = instanceComponent.getValue();
                final String user = userComponent.getValue();
                final String password = passwordComponent.getValue();

                final ISessionPoolFactory sessionFac = getSessionFactory();

                List<String> rasterColumns;
                try {
                    rasterColumns = getRasterColumns(server, port, instance, user, password,
                            sessionFac);
                } catch (IllegalArgumentException e) {
                    rasterColumns = Collections.emptyList();
                    String message = "Refreshing raster tables list: " + e.getMessage();
                    storeEditForm.error(message);
                    target.addComponent(storeEditForm);// refresh
                }

                choice.setChoices(rasterColumns);
                target.addComponent(choice);
                // do nothing else, so we return to the same page...
            }
        };
        add(refreshTablesLink);
        {
            final String titleKey = RESOURCE_KEY_PREFIX + ".refresh.title";
            ResourceModel titleModel = new ResourceModel(titleKey);
            String title = String.valueOf(titleModel.getObject());
            refreshTablesLink.add(new SimpleAttributeModifier("title", title));
        }
    }
View Full Code Here

        form.add(new HiddenField("username", new PropertyModel(model, "userName")));
        form.add(new HiddenField("password", new PropertyModel(model, "password")));

        // override the action property of the form to submit to the TestWfsPost
        // servlet
        form.add(new SimpleAttributeModifier("action", "../TestWfsPost"));

        // Set the same markup is as in the html page so wicket does not
        // generates
        // its own and the javascript code in the onLoad event for the <body>
        // element
View Full Code Here

            final String titleKey = resourceKey + ".title";
            ResourceModel titleModel = new ResourceModel(titleKey);
            String title = String.valueOf(titleModel.getObject());

            tableNamePanel.add(new SimpleAttributeModifier("title", title));
        }

        return tableNameComponent;
    }
View Full Code Here

        String defaultTitle = String.valueOf(PASSWORD_PARAM.title);

        ResourceModel titleModel = new ResourceModel(resourceKey + ".title", defaultTitle);
        String title = String.valueOf(titleModel.getObject());

        pwdPanel.add(new SimpleAttributeModifier("title", title));

        return pwdPanel.getFormComponent();
    }
View Full Code Here

        String defaultTitle = String.valueOf(param.title);

        ResourceModel titleModel = new ResourceModel(resourceKey + ".title", defaultTitle);
        String title = String.valueOf(titleModel.getObject());

        textParamPanel.add(new SimpleAttributeModifier("title", title));

        add(textParamPanel);
        return textParamPanel.getFormComponent();
    }
View Full Code Here

    private void addConnectionPrototypePanel(final CoverageStoreInfo storeInfo) {

        final String resourceKey = RESOURCE_KEY_PREFIX + ".prototype";
        Label label = new Label("prototypeLabel", new ResourceModel(resourceKey));
        final String title = String.valueOf(new ResourceModel(resourceKey + ".title").getObject());
        final SimpleAttributeModifier titleSetter = new SimpleAttributeModifier("title", title);
        label.add(titleSetter);
        add(label);

        final DropDownChoice existingArcSDECoverages;
        existingArcSDECoverages = new DropDownChoice("connectionPrototype", new Model(),
View Full Code Here

            @Override
            protected void populateItem(ListItem item) {
               
                // odd/even style
                item.add(new SimpleAttributeModifier("class",
                        item.getIndex() % 2 == 0 ? "even" : "odd"));

                // link info
                DropDownChoice dropDownChoice = new DropDownChoice("type",
                        new PropertyModel(item.getModel(), "metadataType"), LINK_TYPES);
View Full Code Here

            @Override
            protected void populateItem(ListItem item) {
               
                // odd/even style
                item.add(new SimpleAttributeModifier("class",
                        item.getIndex() % 2 == 0 ? "even" : "odd"));

                // dump the attribute information we have
                AttributeTypeInfo attribute = (AttributeTypeInfo) item.getModelObject();
                item.add(new Label("name", attribute.getName()));
View Full Code Here

TOP

Related Classes of org.apache.wicket.behavior.SimpleAttributeModifier

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.