Package org.apache.wicket.model

Examples of org.apache.wicket.model.AbstractReadOnlyModel


        item.add(new Label("firstname", contact.getFirstName()));
        item.add(new Label("lastname", contact.getLastName()));
        item.add(new Label("homephone", contact.getHomePhone()));
        item.add(new Label("cellphone", contact.getCellPhone()));

        item.add(new AttributeModifier("class", true, new AbstractReadOnlyModel()
        {
          public Object getObject()
          {
            return (item.getIndex() % 2 == 1) ? "even" : "odd";
          }
View Full Code Here


    add(new AjaxEditableLabel("text1"));
    add(new AjaxEditableLabel("text2"));
    add(new AjaxEditableMultiLineLabel("text3"));
    add(new AjaxEditableChoiceLabel("site", SITES));

    add(new Label("refresh-counter", new AbstractReadOnlyModel()
    {
      public Object getObject()
      {
        return "" + refreshCounter;
      }
View Full Code Here

   * @param symbol
   *            the symbol to look up
   */
  public StockQuoteLabel2(String id, final String symbol)
  {
    super(id, new AbstractReadOnlyModel()
    {
      /**
       * Gets the stockquote for the given symbol.
       */
      public Object getObject()
View Full Code Here

        item.add(new Label("firstname", contact.getFirstName()));
        item.add(new Label("lastname", contact.getLastName()));
        item.add(new Label("homephone", contact.getHomePhone()));
        item.add(new Label("cellphone", contact.getCellPhone()));

        item.add(new AttributeModifier("class", true, new AbstractReadOnlyModel()
        {
          public Object getObject()
          {
            return (item.getIndex() % 2 == 1) ? "even" : "odd";
          }
View Full Code Here

        item.add(new Label("firstname", contact.getFirstName()));
        item.add(new Label("lastname", contact.getLastName()));
        item.add(new Label("homephone", contact.getHomePhone()));
        item.add(new Label("cellphone", contact.getCellPhone()));

        item.add(new AttributeModifier("class", true, new AbstractReadOnlyModel()
        {
          public Object getObject()
          {
            return (item.getIndex() % 2 == 1) ? "even" : "odd";
          }
View Full Code Here

    modelsMap.put("CADILLAC", Arrays.asList(new String[] { "CTS", "DTS", "ESCALADE", "SRX",
        "DEVILLE" }));
    modelsMap.put("FORD", Arrays.asList(new String[] { "CROWN", "ESCAPE", "EXPEDITION",
        "EXPLORER", "F-150" }));

    IModel makeChoices = new AbstractReadOnlyModel()
    {
      public Object getObject()
      {
        Set keys = modelsMap.keySet();
        List list = new ArrayList(keys);
        return list;
      }

    };

    IModel modelChoices = new AbstractReadOnlyModel()
    {
      public Object getObject()
      {
        List models = (List)modelsMap.get(selectedMake);
        if (models == null)
View Full Code Here

        item.add(new Label("firstname", contact.getFirstName()));
        item.add(new Label("lastname", contact.getLastName()));
        item.add(new Label("homephone", contact.getHomePhone()));
        item.add(new Label("cellphone", contact.getCellPhone()));

        item.add(new AttributeModifier("class", true, new AbstractReadOnlyModel()
        {
          public Object getObject()
          {
            return (item.getIndex() % 2 == 1) ? "even" : "odd";
          }
View Full Code Here

        item.add(new Label("firstname", contact.getFirstName()));
        item.add(new Label("lastname", contact.getLastName()));
        item.add(new Label("homephone", contact.getHomePhone()));
        item.add(new Label("cellphone", contact.getCellPhone()));

        item.add(new AttributeModifier("class", true, new AbstractReadOnlyModel()
        {
          public Object getObject()
          {
            return (item.getIndex() % 2 == 1) ? "even" : "odd";
          }
View Full Code Here

    final ClientProperties properties = ((WebClientInfo)getRequestCycle().getClientInfo())
        .getProperties();

    add(new MultiLineLabel("clientinfo", properties.toString()));

    IModel clientTimeModel = new AbstractReadOnlyModel()
    {
      /**
       * @see org.apache.wicket.model.AbstractReadOnlyModel#getObject()
       */
      public Object getObject()
View Full Code Here

      throw new IllegalArgumentException("argument [tabs] cannot be null");
    }

    this.tabs = tabs;

    final IModel tabCount = new AbstractReadOnlyModel()
    {
      private static final long serialVersionUID = 1L;

      public Object getObject()
      {
View Full Code Here

TOP

Related Classes of org.apache.wicket.model.AbstractReadOnlyModel

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.