Uploaded image for project: 'ZK'
  1. ZK
  2. ZK-847

Cannot use init annotation to a form

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: 6.0.0, Freshly
    • Fix Version/s: 6.0.0
    • Component/s: Databind 2
    • Labels:
      None

      Description

      Cannot convert bean.TestModel$Attr@154ebadd of type class bean.TestModel$Attr to interface org.zkoss.bind.Form

      <zk>
      	<window apply="org.zkoss.bind.BindComposer" 
      		viewModel="@id('vm')@init('bean.TestModel')">
      
      		<div form="@id('fx')@init(vm.attr)">
      			<label value="@load(fx.color)"/>
      		</div>
      	</window>
      </zk>
      
      package bean;
      
      public class TestModel {
      	private Attr attr = new Attr("blue");
      	
      	public Attr getAttr() {
      		return attr;
      	}
      	
      	
      	public static class Attr {
      		private String color;
      		public Attr(String color) {
      			this.color = color;
      		}
      		
      		public void setColor(String color) {
      			this.color = color;
      		}
      		
      		public String getColor() {
      			return color;
      		}
      	}
      }
      
      
      
      

        Attachments

          Activity

            People

            Assignee:
            dennis dennis
            Reporter:
            jimmyshiau jimmyshiau
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: