Package org.apache.wicket.markup.html.basic

Examples of org.apache.wicket.markup.html.basic.Label


        return parameters;
    }
   
    public CustomerTicketsPage(PageParameters parameters) {
        UUID customerId = UUID.fromString(parameters.getString("id"));
        add(new Label("customerName", lotteryQueryService.getCustomerName(customerId)));
        add(new ListView<CustomerTicketsQueryResult>("tickets", lotteryQueryService.findLotteryTicketsForCustomer(customerId)) {
            private static final long serialVersionUID = 1L;

            @Override
            protected void populateItem(ListItem<CustomerTicketsQueryResult> item) {
                item.add(new Label("number", item.getModelObject().getTicketNumber()));
                item.add(new Label("lotteryName", item.getModelObject().getLotteryName()));
            }
        });
    }
View Full Code Here


            private static final long serialVersionUID = 1L;
           
            @Override
            protected void populateItem(final ListItem<LotteryInfoQueryResult> item) {
                LotteryInfo info = item.getModelObject().getLotteryInfo();
                item.add(new Label("name", info.getName()));
                item.add(new Label("drawingTimestamp", formatDate(info.getDrawingTimestamp())));
                item.add(new Label("prizeAmount", String.valueOf(info.getPrizeAmount())));
                item.add(new Label("ticketPrice", String.valueOf(info.getTicketPrice())));
                item.add(new Link<Void>("drawLottery") {
                    private static final long serialVersionUID = 1L;
                   
                    @SpringBean private Bus bus;
                   
View Full Code Here

        add(new ListView<CustomerAccountQueryResult>("customers", lotteryQueryService.findCustomers()) {
            private static final long serialVersionUID = 1L;

            @Override
            protected void populateItem(ListItem<CustomerAccountQueryResult> item) {
                item.add(new Label("name", item.getModelObject().getCustomerName()));
                item.add(new Label("accountBalance", String.valueOf(item.getModelObject().getCurrentBalance())));
                item.add(new BookmarkablePageLink<CustomerTicketsPage>("tickets", CustomerTicketsPage.class, CustomerTicketsPage.link(item.getModelObject().getCustomerId().getId())));
            }
        });
        add(new FeedbackPanel("feedback"));
        add(new CreateCustomerForm("createCustomerForm"));
View Full Code Here

    // Set up the dynamic behavior for the page, widgets bound by id
    public ListContacts() {

        // Add the dynamic welcome message, specified in web.xml
        add(new Label("welcomeMessage", welcome));
        add(new ListView<Contact>("contacts", contactDao.getContacts()) {

            // Populate the table of contacts
            @Override
            protected void populateItem(final ListItem<Contact> item) {
                Contact contact = item.getModelObject();
                item.add(new Label("name", contact.getName()));
                item.add(new Label("email", contact.getEmail()));
                item.add(new Link<Contact>("delete", item.getModel()) {

                    @Override
                    public void onClick() {
                        contactDao.remove(item.getModelObject());
View Full Code Here

    // Set up the dynamic behavior for the page, widgets bound by id
    public ListContacts() {

        // Add the dynamic welcome message, specified in web.xml
        add(new Label("welcomeMessage", welcome));
       
        // Populate the table of contacts
        add(new ListView<Contact>("contacts", contactDao.getContacts()) {

            @Override
            protected void populateItem(final ListItem<Contact> item) {
                Contact contact = item.getModelObject();
                item.add(new Label("name", contact.getName()));
                item.add(new Label("email", contact.getEmail()));
                item.add(new Link<Contact>("delete", item.getModel()) {

                    // Add a click handler
                    @Override
                    public void onClick() {
View Full Code Here

        public InformationTab(String id, JetspeedDocument document)
        {
            super(id, document);
            Form infoForm = new Form("infoForm");
            Label nameLabel = new Label("name",
                    new ResourceModel("common.name"));
            TextField nameField = new TextField("nameField", new PropertyModel(
                    this, "document.name"));
            infoForm.add(nameLabel);
            infoForm.add(nameField);
            Label titleLabel = new Label("title", new ResourceModel("Title"));
            TextField titleField = new TextField("titleField",
                    new PropertyModel(this, "document.title"));
            infoForm.add(titleLabel);
            infoForm.add(titleField);
            Label shortTitleLabel = new Label("shortTitle", new ResourceModel(
                    "ShortTitle"));
            TextField shortTitleField = new TextField("shortTitleField",
                    new PropertyModel(this, "document.shortTitle"));
            infoForm.add(shortTitleField);
            infoForm.add(shortTitleLabel);
            Label pageDecoratorLabel = new Label("pageDecorator",
                    "Page Decorator");
            DropDownChoice decoratorsList = new DropDownChoice(
                    "decoratorsList", new PropertyModel(this,
                            "document.pageDecorator"), getPageDecorators());
            infoForm.add(decoratorsList);
            infoForm.add(pageDecoratorLabel);
            Label portletDecoratorLabel = new Label("portletDecorator",
                    "Portlet Decorator");
            DropDownChoice portletDecoratorsList = new DropDownChoice(
                    "portletDecoratorsList", new PropertyModel(this,
                            "document.portletDecorator"),
                    getPortletDecorators());
            infoForm.add(portletDecoratorLabel);
            infoForm.add(portletDecoratorsList);
            Label themeLabel = new Label("theme", "Theme");
            DropDownChoice themeField = new DropDownChoice("themeList",
                    new PropertyModel(this, "document.desktopTheme"),
                    getThemes());
            themeField.setVisibilityAllowed(true);
            themeLabel.setVisibilityAllowed(true);
            infoForm.add(themeField);
            infoForm.add(themeLabel);
            Label visibleLabel = new Label("visible", new ResourceModel(
                    "Hidden"));
            CheckBox visibleCheckbox = new CheckBox("visibleCheck",
                    new PropertyModel(this, "document.hidden"));
            infoForm.add(visibleLabel);
            infoForm.add(visibleCheckbox);
            Label urlLabel = new Label("urlLabel", new ResourceModel("Url"));
            TextField urlField = new TextField("urlField", new PropertyModel(
                    this, "document.url"));
            infoForm.add(urlLabel);
            infoForm.add(urlField);
            urlLabel.setVisibilityAllowed(true);
            urlField.setVisibilityAllowed(true);
            Label targetLabel = new Label("targetLabel", "Target Window");
            DropDownChoice targetField = new DropDownChoice("target",
                    new PropertyModel(this, "document.target"), getTargetList());
            infoForm.add(targetLabel);
            infoForm.add(targetField);
            targetLabel.setVisibilityAllowed(true);
            targetField.setVisibilityAllowed(true);
            Label defaultPageLabel = new Label("defaultPage",
                    new ResourceModel("DefaultPage"));
            TextField defaultPageField = new TextField("defaultPageField",
                    new PropertyModel(this, "document.page"));
            infoForm.add(defaultPageLabel);
            infoForm.add(defaultPageField);
            defaultPageLabel.setVisibilityAllowed(true);
            defaultPageField.setVisibilityAllowed(true);
            final ModalWindow metaDataModalWindow;
            add(metaDataModalWindow = new ModalWindow("modalwindow"));
           
            AjaxButton addFolder = new AjaxButton("addFolder",new ResourceModel("add.subfolder"),infoForm)
            {
                @Override
                protected void onSubmit(AjaxRequestTarget target, Form<?> form)
                {
                    metaDataModalWindow.setContent(new AddFolderPanel(metaDataModalWindow.getContentId()));
                    metaDataModalWindow.show(target);
                }
            };
            infoForm.add(addFolder);
           
            AjaxButton addPage = new AjaxButton("addPage",new ResourceModel("add.page"),infoForm)
            {
                @Override
                protected void onSubmit(AjaxRequestTarget target, Form<?> form)
                {
                    metaDataModalWindow.setContent(new AddPagePanel(
                            metaDataModalWindow.getContentId()));
                    metaDataModalWindow.show(target);
                }
            };
            infoForm.add(addPage);
           
            AjaxButton addLink = new AjaxButton("addLink",new ResourceModel("add.link"),infoForm)
            {
                @Override
                protected void onSubmit(AjaxRequestTarget target, Form<?> form)
                {
                    metaDataModalWindow.setContent(new AddLinkPanel(metaDataModalWindow.getContentId()));
                    metaDataModalWindow.show(target);
                }
            };
            infoForm.add(addLink);
           
            addFolder.setVisibilityAllowed(true);
            addPage.setVisibilityAllowed(true);
            addLink.setVisibilityAllowed(true);
            SiteTreeNode node = getUserSelectedNode();
           
            if (node.getDocType() == SiteTreeNode.FileType.Folder)
            {
                urlLabel.setVisible(false);
                urlField.setVisible(false);
                targetLabel.setVisible(false);
                targetField.setVisible(false);
                addFolder.setVisible(true);
                addPage.setVisible(true);
                addLink.setVisible(true);
            }
            else if (node.getDocType() == SiteTreeNode.FileType.Page)
            {
                defaultPageLabel.setVisible(false);
                defaultPageField.setVisible(false);
                urlLabel.setVisible(false);
                urlField.setVisible(false);
                targetLabel.setVisible(false);
                targetField.setVisible(false);
                addFolder.setVisible(false);
                addPage.setVisible(false);
                addLink.setVisible(false);
            }
            else if (node.getDocType() == SiteTreeNode.FileType.Link)
            {
                defaultPageLabel.setVisible(false);
                defaultPageField.setVisible(false);
                targetLabel.setVisible(true);
                defaultPageField.setVisible(false);
                pageDecoratorLabel.setVisible(false);
                decoratorsList.setVisible(false);
View Full Code Here

                @Override
                protected Component newContentComponent(String componentId,
                        BaseTree tree, IModel model)
                {
                    return new Label(componentId, getNodeTextModel(model));
                }

                @Override
                protected void onNodeLinkClicked(Object node, BaseTree tree,
                        AjaxRequestTarget target)
View Full Code Here

            final String name = options.getOptions();
            this.optionsDefinition = new OptionsDefinitionBean(options);
            final Form menuform = new Form("menuForm");
            menuform.add(new TextField("optionsField", new PropertyModel(this,
                    "optionsDefinition.options")));
            menuform.add(new Label("optionLabel",new ResourceModel("menu.option")));
            menuform.add(new TextField("depthField", new PropertyModel(this,
                    "optionsDefinition.depth")));
            menuform.add(new Label("depthLabel",new ResourceModel("menu.depth")));
            menuform.add(new CheckBox("pathField", new PropertyModel(this,
                    "optionsDefinition.paths")));
            menuform.add(new Label("pathLabel",new ResourceModel("menu.path")));
            menuform.add(new CheckBox("regExpField", new PropertyModel(this,
                    "optionsDefinition.regexp")));
            menuform.add(new Label("regExpLabel",new ResourceModel("menu.regExp")));
            menuform.add(new TextField("profileField", new PropertyModel(this,
                    "optionsDefinition.profile")));
            menuform.add(new Label("profileLabel",new ResourceModel("menu.profile")));
            menuform.add(new TextField("skinField", new PropertyModel(this,
                    "optionsDefinition.skin")));
            menuform.add(new Label("skinLabel",new ResourceModel("menu.skin")));
            menuform.add(new TextField("orderField", new PropertyModel(this,
                    "optionsDefinition.order")));
            menuform.add(new Label("orderLabel",new ResourceModel("menu.order")));
            menuform.add(new AjaxButton("save",new ResourceModel("common.save"))
            {

                protected void onSubmit(AjaxRequestTarget target, Form menuform)
                {
View Full Code Here

            feedback.setOutputMarkupId(true);
            add(feedback);
            Form menuform = new Form("menuForm");
            TextField nameField = new RequiredTextField("nameField",
                    new PropertyModel(this, "menuDef.name"));
            menuform.add(new Label("nameLabel",new ResourceModel("common.name")));
            menuform.add(nameField);
            TextField optionsField = new TextField("optionsField",
                    new PropertyModel(this, "menuDef.options"));
            menuform.add(new Label("optionLabel",new ResourceModel("menu.option")));
            menuform.add(optionsField);
            TextField depthField = new TextField("depthField",
                    new PropertyModel(this, "menuDef.depth"));
            menuform.add(new Label("depthLabel",new ResourceModel("menu.depth")));
            menuform.add(depthField);
            CheckBox pathField = new CheckBox("pathField", new PropertyModel(
                    this, "menuDef.paths"));
            menuform.add(new Label("pathLabel",new ResourceModel("menu.path")));
            menuform.add(pathField);
            CheckBox regExpField = new CheckBox("regExpField",
                    new PropertyModel(this, "menuDef.regexp"));
            menuform.add(new Label("regExpLabel",new ResourceModel("menu.regExp")));
            menuform.add(regExpField);
            TextField profileField = new TextField("profileField",
                    new PropertyModel(this, "menuDef.profile"));
            menuform.add(new Label("profileLabel",new ResourceModel("menu.profile")));
            menuform.add(profileField);
            TextField titleField = new TextField("titleField",
                    new PropertyModel(this, "menuDef.title"));
            menuform.add(new Label("titleLabel",new ResourceModel("menu.title")));
            menuform.add(titleField);
            TextField skinField = new TextField("skinField", new PropertyModel(
                    this, "menuDef.skin"));
            menuform.add(new Label("skinLabel",new ResourceModel("menu.skin")));
            menuform.add(skinField);
            TextField orderField = new TextField("orderField",
                    new PropertyModel(this, "menuDef.order"));
            menuform.add(new Label("orderLabel",new ResourceModel("menu.order")));
            menuform.add(orderField);
            menuform.add(new AjaxButton("save",new ResourceModel("common.save"), menuform)
            {

                @Override
View Full Code Here

        public ImportDataTab(String id, JetspeedDocument jetspeeeDoc)
        {
            super(id, jetspeeeDoc);
            final SiteTreeNode node = getUserSelectedNode();
            Form exportForm = new Form("exportForm");
            Label exportLabel = new Label("exportName", "Export recursively");
            AjaxCheckBox exportChkBox = new AjaxCheckBox("recursively",
                    new PropertyModel(this, "recursively"))
            {

                @Override
                protected void onUpdate(AjaxRequestTarget target)
                {
                }
            };
            Label exporNameLabel = new Label("expLabel", "Export Object");
            TextField exportName = new TextField("expName", new PropertyModel(
                    this, "document.name"));
            exportLabel.setVisibilityAllowed(true);
            exportChkBox.setVisibilityAllowed(true);
            if (node.getDocType() != SiteTreeNode.FileType.Folder)
View Full Code Here

TOP

Related Classes of org.apache.wicket.markup.html.basic.Label

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.