Package org.apache.wicket.behavior

Examples of org.apache.wicket.behavior.SimpleAttributeModifier


          params.put("pageNum", item.getModelObject().getNum());
          BookmarkablePageLink pageLink = new BookmarkablePageLink("pageLink",
              instPage, params);
          pageLink.add(new Label("pageNum", String.valueOf(item
              .getModelObject().getNum())));
          pageLink.add(new SimpleAttributeModifier("class", item
              .getModelObject().isCurrentPage() ? "selected" : ""));
          item.add(pageLink);
        }
      });
      add(new Label("nothing_found").setVisible(false));
View Full Code Here


        add(new Label("loggedBy", new PropertyModel(item, "loggedBy.name")));
        add(new Label("assignedTo", new PropertyModel(item, "assignedTo.name")));
        add(new Label("summary", new PropertyModel(item, "summary")));
        add(new Label("detail", ItemUtils.fixWhiteSpace(item.getDetail())).setEscapeModelStrings(false));
       
        final SimpleAttributeModifier sam = new SimpleAttributeModifier("class", "alt");
        final Map<Field.Name, Field> fields = item.getSpace().getMetadata().getFields();
        add(new ListView("fields", item.getSpace().getMetadata().getFieldOrder()) {
            /* (non-Javadoc)
             * @see org.apache.wicket.markup.html.list.ListView#populateItem(org.apache.wicket.markup.html.list.ListItem)
             */
 
View Full Code Here

            DefaultCategoryDataset dataset = new DefaultCategoryDataset();
            for (Map.Entry<String, Integer> entry : commitsPerCommitter.entrySet()) {
                dataset.addValue(entry.getValue(), "Commits", entry.getKey());
            }            
            List<String> users = new ArrayList(commitsPerCommitter.keySet());
            final SimpleAttributeModifier sam = new SimpleAttributeModifier("class", "alt");
            hide.add(new ListView("users", users) {
                protected void populateItem(ListItem listItem) {
                    if(listItem.getIndex() % 2 == 1) {
                        listItem.add(sam);
                    }                     
View Full Code Here

*/
public class CasLoginErrorPage extends WebPage {
   
    public CasLoginErrorPage() {
        String casLogoutUrl = JtracApplication.get().getCasLogoutUrl();
        add(new WebMarkupContainer("casLogin").add(new SimpleAttributeModifier("href", casLogoutUrl)));
    }
View Full Code Here

                        allowedSpaces.add(spaceId);
                    }
                }
            }
           
            final SimpleAttributeModifier sam = new SimpleAttributeModifier("class", "alt");
           
            add(new ListView("spaces", allowedSpaces) {
                protected void populateItem(ListItem listItem) {
                    long spaceId = (Long) listItem.getModelObject();   
                    List<UserSpaceRole> usrs = spaceRolesMap.get(spaceId);
                    // space can be null for "all spaces" role (prefixCode used in map = "")
                    final Space space = usrs.get(0).getSpace();                    
                    if(space != null && space.getId() == selectedSpaceId) {
                        listItem.add(new SimpleAttributeModifier("class", "selected"));
                    } else if(listItem.getIndex() % 2 == 1) {
                        listItem.add(sam);
                    }                                                                                                        
                    if(space == null) {                       
                        listItem.add(new Label("name", localize("user_allocate_space.allSpaces")));
View Full Code Here

                    return principal.getSpacesWhereRoleIsAdmin();
                }
            }
        };
       
        final SimpleAttributeModifier sam = new SimpleAttributeModifier("class", "alt");
       
        ListView listView = new ListView("spaces", spaceListModel) {
            protected void populateItem(ListItem listItem) {               
                final Space space = (Space) listItem.getModelObject();               
                if (selectedSpaceId == space.getId()) {
                    listItem.add(new SimpleAttributeModifier("class", "selected"));
                } else if(listItem.getIndex() % 2 == 1) {
                    listItem.add(sam);
                }                                
                listItem.add(new Label("prefixCode", new PropertyModel(space, "prefixCode")));
                listItem.add(new Label("name", new PropertyModel(space, "name")));
View Full Code Here

        final User user = usr.getUser();
       
        final Map<Integer, String> states = new TreeMap(space.getMetadata().getStatesMap());   
        states.remove(State.NEW);
        int rowspan = states.size() + 1; // add one totals row also
        final SimpleAttributeModifier sam = new SimpleAttributeModifier("rowspan", rowspan + "");
        List<Integer> stateKeys = new ArrayList<Integer>(states.keySet());                                               
       
        add(new ListView("rows", stateKeys) {
           
            protected void populateItem(ListItem listItem) {                               
View Full Code Here

                listItem.add(headingLink);
                String label = ch.isField() ? ch.getLabel() : localize("item_list." + ch.getName());
                headingLink.add(new Label("heading", label));
                if (ch.getNameText().equals(itemSearch.getSortFieldName())) {
                    String order = itemSearch.isSortDescending() ? "order-down" : "order-up";
                    listItem.add(new SimpleAttributeModifier("class", order));
                }
            }
        };
       
        add(headings);
       
        //======================== ITEMS =======================================
       
        final long selectedItemId = itemSearch.getSelectedItemId();
       
        final SimpleAttributeModifier sam = new SimpleAttributeModifier("class", "alt");
       
        ListView itemList = new ListView("itemList", itemListModel) {
            protected void populateItem(ListItem listItem) {
                // cast to AbstactItem - show history may be == true
                final AbstractItem item = (AbstractItem) listItem.getModelObject();
               
                if (selectedItemId == item.getId()) {
                    listItem.add(new SimpleAttributeModifier("class", "selected"));
                } else if(listItem.getIndex() % 2 == 1) {
                    listItem.add(sam);
                }               
               
                final boolean showHistory = itemSearch.isShowHistory();
View Full Code Here

       
        final Map<String, String> configMap = getJtrac().loadAllConfig();
       
        List<String> params = new ArrayList(Config.getParams());
       
        final SimpleAttributeModifier sam = new SimpleAttributeModifier("class", "alt");
       
        add(new ListView("configs", params) {
            protected void populateItem(ListItem listItem) {
                final String param = (String) listItem.getModelObject();
                final String value = configMap.get(param);
               
                if (param.equals(selectedParam)) {
                    listItem.add(new SimpleAttributeModifier("class", "selected"));
                } else if(listItem.getIndex() % 2 == 1) {
                    listItem.add(sam);
                }
               
                listItem.add(new Label("param", param));
View Full Code Here

           
            add(new Label("label", space.getName() + " (" + space.getPrefixCode() + ")"));
           
            final Map<Long, List<UserSpaceRole>> userRolesMap = getJtrac().loadUserRolesMapForSpace(spaceId);
           
            final SimpleAttributeModifier sam = new SimpleAttributeModifier("class", "alt");
           
            add(new ListView("usrs", new ArrayList(userRolesMap.keySet())) {
                protected void populateItem(ListItem listItem) {
                    long userId = (Long) listItem.getModelObject();
                    final User user = userRolesMap.get(userId).get(0).getUser();
                    if(selectedUserId == userId) {
                        listItem.add(new SimpleAttributeModifier("class", "selected"));
                    } else if(listItem.getIndex() % 2 == 1) {
                        listItem.add(sam);
                    }                    
                    listItem.add(new Link("loginName") {
                        public void onClick() {                           
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.