Package org.apache.wicket.model

Examples of org.apache.wicket.model.AbstractReadOnlyModel


    MarkupContainer nodeLink = newNodeLink(item, "nodeLink", node);
    item.add(nodeLink);

    nodeLink.add(newNodeIcon(nodeLink, "icon", node));

    nodeLink.add(new Label("label", new AbstractReadOnlyModel()
    {
      private static final long serialVersionUID = 1L;

      public Object getObject()
      {
View Full Code Here


      MarkupContainer nodeLink = newNodeLink(this, "nodeLink", node);
      add(nodeLink);

      nodeLink.add(newNodeIcon(nodeLink, "icon", node));

      nodeLink.add(new Label("label", new AbstractReadOnlyModel()
      {
        private static final long serialVersionUID = 1L;

        /**
         * @see org.apache.wicket.model.AbstractReadOnlyModel#getObject()
View Full Code Here

      public void onClick()
      {
        labelValue = service.getHelloWorldText();
      }
    });
    add(new Label("message", new AbstractReadOnlyModel()
    {
   
      @Override
      public Object getObject()
      {
View Full Code Here

      MarkupContainer nodeLink = newNodeLink(this, "nodeLink", node);
      add(nodeLink);

      nodeLink.add(newNodeIcon(nodeLink, "icon", node));

      nodeLink.add(new Label("label", new AbstractReadOnlyModel()
      {
        private static final long serialVersionUID = 1L;

        /**
         * @see org.apache.wicket.model.AbstractReadOnlyModel#getObject()
View Full Code Here

public class Home extends WebPage {

  public Home() {

    IModel model = new AbstractReadOnlyModel() {

      @Override
      public Object getObject() {
        return Pool.getConnection().getData();
      }
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

     */
    public LocaleDropDownChoice(String id)
    {
      super(id);
      // sort locales on strings of selected locale
      setChoices(new AbstractReadOnlyModel()
      {
        @Override
        public Object getObject()
        {
          getSelectedLocale();
View Full Code Here

   * @see org.apache.wicket.extensions.ajax.markup.html.AjaxEditableLabel#newEditor(org.apache.wicket.MarkupContainer, java.lang.String, org.apache.wicket.model.IModel)
   */
  protected FormComponent newEditor(MarkupContainer parent, String componentId, IModel model)
  {
    TextArea editor = new TextArea(componentId, model);
    editor.add(new AttributeModifier("rows", new AbstractReadOnlyModel()
    {
      private static final long serialVersionUID = 1L;

      public Object getObject()
      {
        return new Integer(rows);
      }
    }));
    editor.add(new AttributeModifier("cols", new AbstractReadOnlyModel()
    {
      private static final long serialVersionUID = 1L;

      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

   * @see org.apache.wicket.extensions.ajax.markup.html.AjaxEditableLabel#newEditor(org.apache.wicket.MarkupContainer,
   *      java.lang.String, org.apache.wicket.model.IModel)
   */
  protected FormComponent newEditor(MarkupContainer parent, String componentId, IModel model)
  {
    DropDownChoice editor = new DropDownChoice(componentId, model, 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.