Package org.apache.wicket.markup.html.link

Examples of org.apache.wicket.markup.html.link.Link$AnchorChange


           
         }), new PropertyModel(booking, "smoking"), false));
         add(new FormInputBorder("creditCardBorder", "Credit Card #", new TextField("creditCard").setRequired(true), new PropertyModel(booking, "creditCard")));
         add(new FormInputBorder("creditCardNameBorder", "Credit Card Name", new TextField("creditCardName").setRequired(true), new PropertyModel(booking, "creditCardName")));
         add(new FormInputBorder("creditCardExpiryBorder", "Credit Card Expiry", new DropDownChoice("creditCardExpiryMonth", monthOptions).setRequired(true), new PropertyModel(booking, "creditCardExpiryMonth")).add(new DropDownChoice("creditCardExpiryYear", yearOptions).setRequired(true), new PropertyModel(booking, "creditCardExpiryYear")));
         add(new Link("cancel")
         {

            @Override
            @End
            public void onClick()
View Full Code Here


            item.add(new Label("hotelName", hotel.getName()));
            item.add(new Label("hotelAddress", hotel.getAddress()));
            item.add(new Label("hotelCityStateCountry", hotel.getCity() + ", " + hotel.getState() + ", " + hotel.getCountry()));
            item.add(new Label("hotelZip", hotel.getZip()));
            //item.add(new BookmarkablePageLink("viewHotel", org.jboss.seam.example.wicket.Hotel.class).setParameter("hotelId", hotel.getId()));
            item.add(new Link("viewHotel")
            {

               @Begin
               @Override
               public void onClick()
               {
                  hotelBooking.selectHotel(hotel);
                  setResponsePage(new org.jboss.seam.example.wicket.Hotel(new PageParameters()));
               }
           
            });
         }
        
      };
     
      // Set the maximum items per page
      hotelDataView.setItemsPerPage(hotelSearchForm.getPageSize());
      hotelDataView.setOutputMarkupId(true);
      hotels = new WebMarkupContainer("hotels");
      hotels.add(hotelDataView).setOutputMarkupId(true);
     
     
      // Add a pager
      hotels.add(new AjaxPagingNavigator("hotelPager", hotelDataView)
      {
         @Override
         public boolean isVisible()
         {
            return hotelDataView.isVisible();
         }

      });
     
      body.add(hotels);
     
      /*
       * Existing hotel booking
       */
      bookedHotelDataView = new DataView("bookedHotel", new SimpleDataProvider()
      {
         public Iterator iterator(int from, int count)
         {
            return bookings.subList(from, from + count).iterator();
         }

         public int size()
         {
            return bookings.size();
         }
        
        

      })
      {

         @Override
         protected void populateItem(Item item)
         {
            final Booking booking = (Booking) item.getModelObject();
            item.add(new Label("hotelName", booking.getHotel().getName()));
            item.add(new Label("hotelAddress", booking.getHotel().getAddress()));
            item.add(new Label("hotelCityStateCountry", booking.getHotel().getCity() + ", " + booking.getHotel().getState() + ", " + booking.getHotel().getState()));
            item.add(new Label("hotelCheckInDate", booking.getCheckinDate().toString()));
            item.add(new Label("hotelCheckOutDate", booking.getCheckoutDate().toString()));
            item.add(new Label("hotelConfirmationNumber", booking.getId().toString()));
            item.add(new Link("cancel")
            {

               @Override
               public void onClick()
               {
View Full Code Here

     body.add(new HotelViewPanel("hotel", booking.getHotel()));
     body.add(new OutputBorder("totalBorder", "Total Payment", new Label("total", DecimalFormat.getCurrencyInstance(Locale.US).format(booking.getTotal()))));
     body.add(new OutputBorder("checkinDateBorder", "Check in", new Label("checkinDate", new SimpleDateFormat().format(booking.getCheckinDate()))));
     body.add(new OutputBorder("checkoutDateBorder", "Check out", new Label("checkoutDate", new SimpleDateFormat().format(booking.getCheckoutDate()))));
     body.add(new OutputBorder("creditCardNumberBorder", "Credit Card #", new Label("creditCardNumber", booking.getCreditCard())));
     body.add(new Link("revise")
      {
         @Override
         public void onClick()
         {
            setResponsePage(new Book(new PageParameters()));
         }
      });
      body.add(new Link("confirm")
      {
         @Override
         @RaiseEvent("bookingConfirmed")
         public void onClick()
         {
            hotelBooking.confirm();
            setResponsePage(Main.class);
         }
      });
      body.add(new Link("cancel")
      {
         @Override
         public void onClick()
         {
            hotelBooking.cancel();
View Full Code Here

   private Identity identity;
  
   public Template(String id)
   {
      super(id);
      add(new Link("search")
      {
         @Override
         public void onClick()
         {
            Manager.instance().leaveConversation();
            setResponsePage(Main.class);
         }
      });
      add(new Link("settings")
      {
         @Override
         public void onClick()
         {
            Manager.instance().leaveConversation();
            setResponsePage(Password.class);
         }
      });
      add(new Link("logout")
      {
         @Override
         public void onClick()
         {
            identity.logout();
View Full Code Here

  public Hotel(final PageParameters parameters)
  {
     super(parameters);
     Template body = new Template("body");
     body.add(new Link("bookHotel")
     {
        @Override
        public void onClick()
        {
           hotelBooking.bookHotel();
           setResponsePage(new Book(new PageParameters()));
        }
     });
     body.add(new Link("cancel")
      {
         @Override
         @End
         public void onClick()
         {
View Full Code Here

        MetaDataRoleAuthorizationStrategy.authorize(createConfigurationLink, ENABLE, xmlRolesReader.getAllAllowedRoles(
                "Configuration", "create"));
        add(createConfigurationLink);

        Link dbExportLink = new Link<Void>("dbExportLink") {

            private static final long serialVersionUID = -4331619903296515985L;

            @Override
            public void onClick() {
View Full Code Here

        MetaDataRoleAuthorizationStrategy.authorize(createConfigurationLink, ENABLE, xmlRolesReader.getAllAllowedRoles(
                "Configuration", "create"));
        add(createConfigurationLink);

        Link dbExportLink = new Link<Void>("dbExportLink") {

            private static final long serialVersionUID = -4331619903296515985L;

            @Override
            public void onClick() {
View Full Code Here

        {
            @Override
            protected void populateItem(Item<JetspeedPrincipal> item)
            {
                final JetspeedPrincipal user = (JetspeedPrincipal) item.getModelObject();
                Link editLink = new Link("link", item.getModel())
                {
                    @Override
                    public void onClick()
                    {
                        JetspeedPrincipal user = (JetspeedPrincipal) getModelObject();
                        setPrincipal(user);
                        controlPannels(true);
                    }
                };
                editLink.add(new Label("name", user.getName()));
                item.add(editLink);
            }
        };
        principalView.setItemsPerPage(10);
        group.add(principalView);
View Full Code Here

                public void populateItem(final ListItem listItem)
                {
                    final JetspeedPrincipal principal = (JetspeedPrincipal) listItem
                            .getModelObject();
                    listItem.add(new Label("Name", principal.getName()));
                    Link deleteLink = new Link("delete")
                    {

                        @Override
                        public void onClick()
                        {
                            try
                            {
                                if (!associationsFrom)
                                {
                                    getManager().removeAssociation(principal,
                                            getPrincipal(), assoctionName);
                                } else
                                {
                                    getManager().removeAssociation(
                                            getPrincipal(), principal,
                                            assoctionName);
                                }
                                refreshList();
                            } catch (Exception e)
                            {
                                // TODO: handle exception
                            }
                        }
                    };
                    deleteLink.add(new Label("deleteLabel", new ResourceModel(
                            "common.delete")));
                    listItem.add(deleteLink);
                }
            };
            if(AssociationType.getFromPrincipalType().equals(principalType))
View Full Code Here

                item.add(new Label("groupId", application.getGroupId()));
                item.add(new Label("artifactId", application.getArtifactId()));
                item.add(new Label("name", application.getName()));
                item.add(new Label("version", application.getVersion()));
                item.add(new Label("type", application.getPackaging()));
                Link actionLink = new Link("action", item.getModel())
                {

                    public void onClick()
                    {
                        PortletApplication portletApplication = (PortletApplication) getModelObject();
                        deployer.deploy(portletApplication, getServiceLocator()
                                .getDeploymentManager());
                    }
                };
                actionLink.setVisibilityAllowed(true);
                actionLink.setOutputMarkupId(true);
                if(deployer.getStatus() == PortletDeployer.DEPLOYING)
                {
                    actionLink.setVisible(false);
                }               
                item.add(actionLink);
            }
        };
        listview.setOutputMarkupId(true);
View Full Code Here

TOP

Related Classes of org.apache.wicket.markup.html.link.Link$AnchorChange

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.