Package org.richfaces.model

Examples of org.richfaces.model.ListShuttleRowKey


  public void encodeOneRow(FacesContext context, TableHolder holder)
  throws IOException {
    UIListShuttle table = (UIListShuttle) holder.getTable();
    ListShuttleRendererTableHolder shuttleRendererTableHolder = (ListShuttleRendererTableHolder) holder;
   
    ListShuttleRowKey listShuttleRowKey = (ListShuttleRowKey) table.getRowKey();
    if (listShuttleRowKey != null) {
      boolean source = shuttleRendererTableHolder.isSource();
      if (source == listShuttleRowKey.isFacadeSource()) {
       
        ResponseWriter writer = context.getResponseWriter();
        String clientId = table.getClientId(context);
        writer.startElement(HTML.TR_ELEMENT, table);
        writer.writeAttribute("id",  clientId, null);
View Full Code Here


          idx++;
        }

        substring = substring.substring(idx);
       
        Object key = new ListShuttleRowKey(new Integer(substring), source, facadeSource);
        map.put(key, value);
          }
          listShuttle.setSubmittedStrings(map, sourceSelection, targetSelection, activeItem);
        }
  }
View Full Code Here

          public void process(FacesContext context, Object rowKey,
              Object argument) throws IOException {

            setRowKey(context, rowKey);
           
            ListShuttleRowKey listShuttleRowKey = (ListShuttleRowKey) rowKey;
            if (listShuttleRowKey.isFacadeSource()) {
              sourceList.add(getRowData());
            } else {
              targetList.add(getRowData());
            }
          }
View Full Code Here

  public void encodeOneRow(FacesContext context, TableHolder holder)
  throws IOException {
    UIListShuttle table = (UIListShuttle) holder.getTable();
    ListShuttleRendererTableHolder shuttleRendererTableHolder = (ListShuttleRendererTableHolder) holder;
   
    ListShuttleRowKey listShuttleRowKey = (ListShuttleRowKey) table.getRowKey();
    if (listShuttleRowKey != null) {
      boolean source = shuttleRendererTableHolder.isSource();
      if (source == listShuttleRowKey.isFacadeSource()) {
       
        ResponseWriter writer = context.getResponseWriter();
        String clientId = table.getClientId(context);
        writer.startElement(HTML.TR_ELEMENT, table);
        writer.writeAttribute("id",  clientId, null);
View Full Code Here

          idx++;
        }

        substring = substring.substring(idx);
       
        Object key = new ListShuttleRowKey(new Integer(substring), source, facadeSource);
        map.put(key, value);
          }
          listShuttle.setSubmittedStrings(map, sourceSelection, targetSelection, activeItem);
        }
  }
View Full Code Here

  public void encodeOneRow(FacesContext context, TableHolder holder)
  throws IOException {
    UIListShuttle table = (UIListShuttle) holder.getTable();
    ListShuttleRendererTableHolder shuttleRendererTableHolder = (ListShuttleRendererTableHolder) holder;
   
    ListShuttleRowKey listShuttleRowKey = (ListShuttleRowKey) table.getRowKey();
    if (listShuttleRowKey != null) {
      boolean source = shuttleRendererTableHolder.isSource();
      if (source == listShuttleRowKey.isFacadeSource()) {
       
        ResponseWriter writer = context.getResponseWriter();
        String clientId = table.getClientId(context);
        writer.startElement(HTML.TR_ELEMENT, table);
        writer.writeAttribute("id",  clientId, null);
View Full Code Here

          idx++;
        }

        substring = substring.substring(idx);
       
        Object key = new ListShuttleRowKey(new Integer(substring), source, facadeSource);
        map.put(key, value);
          }
          listShuttle.setSubmittedStrings(map, sourceSelection, targetSelection, activeItem);
        }
  }
View Full Code Here

     
      Map map = value.getMap();
     
      Iterator<Map.Entry<ListShuttleRowKey, Object>> itr = map.entrySet().iterator();
      Entry<ListShuttleRowKey, Object> entry;
      ListShuttleRowKey rowKey;
     
      entry = itr.next();
      rowKey = entry.getKey();
      assertEquals("a", entry.getValue());
      assertTrue(rowKey.isFacadeSource());
      assertTrue(rowKey.isSource());
      assertEquals(Integer.valueOf(0), rowKey.getRowKey());
     
      entry = itr.next();
      rowKey = entry.getKey();
      assertEquals("b", entry.getValue());
      assertTrue(rowKey.isFacadeSource());
      assertFalse(rowKey.isSource());
      assertEquals(Integer.valueOf(5), rowKey.getRowKey());

      entry = itr.next();
      rowKey = entry.getKey();
      assertEquals("c", entry.getValue());
      assertFalse(rowKey.isFacadeSource());
      assertFalse(rowKey.isSource());
      assertEquals(Integer.valueOf(1), rowKey.getRowKey());
     
      entry = itr.next();
      rowKey = entry.getKey();
      assertEquals("d", entry.getValue());
      assertFalse(rowKey.isFacadeSource());
      assertTrue(rowKey.isSource());
      assertEquals(Integer.valueOf(2), rowKey.getRowKey());
     
      entry = itr.next();
      rowKey = entry.getKey();
      assertEquals("e", entry.getValue());
      assertFalse(rowKey.isFacadeSource());
      assertFalse(rowKey.isSource());
      assertEquals(Integer.valueOf(10), rowKey.getRowKey());
    }
View Full Code Here

          public void process(FacesContext context, Object rowKey,
              Object argument) throws IOException {

            setRowKey(context, rowKey);
           
            ListShuttleRowKey listShuttleRowKey = (ListShuttleRowKey) rowKey;
            if (listShuttleRowKey.isFacadeSource()) {
              sourceList.add(getRowData());
            } else {
              targetList.add(getRowData());
            }
          }
View Full Code Here

          public void process(FacesContext context, Object rowKey,
              Object argument) throws IOException {

            setRowKey(context, rowKey);
           
            ListShuttleRowKey listShuttleRowKey = (ListShuttleRowKey) rowKey;
            if (listShuttleRowKey.isFacadeSource()) {
              sourceList.add(getRowData());
            } else {
              targetList.add(getRowData());
            }
          }
View Full Code Here

TOP

Related Classes of org.richfaces.model.ListShuttleRowKey

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.