Revision history [back]

click to hide/show revision 1
initial version

asked 2015-06-26 04:31:42 +0800

kleponboy gravatar image kleponboy flag of Indonesia

http://stupidprogrammers....

Listening to XHTML Component onClick Event

Hi,from this example Im Trying to Listen onClick event from XHTML component insidel zul file .but I always getting an error.

@command('fromHtml');'' Token Parsing Error: Lexical error at line 22, column 2.    Encountered: "c" (99), after : "@": <at unknown location>

here my .zul

  <zk xmlns:n="native" xmlns:x="xhtml" xmlns:zk="zk">
     <div width="100%" apply="org.zkoss.bind.BindComposer" 
          viewModel="@id('vm') @init('com.self.practiceVM')">

             <x:input type="button" value="Test" zk:onClick="@command('addItem')" />

     </div>
  </zk>

and here my Java VM class :

  public class PractiveVM{

      @command
      public void addItem(){

         System.out.println("From XHTML components");

      }
  }

any suggestion ?

Regards,

Klepon

Listening to XHTML Component onClick Event

Hi,from this example Im Trying to Listen onClick event from XHTML component insidel zul file .but I always getting an error.

@command('fromHtml');'' Token Parsing Error: Lexical error at line 22, column 2.    Encountered: "c" (99), after : "@": <at unknown location>

here my .zul

  <zk xmlns:n="native" xmlns:x="xhtml" xmlns:zk="zk">
     <div width="100%" apply="org.zkoss.bind.BindComposer" 
          viewModel="@id('vm') @init('com.self.practiceVM')">
@init('com.self.PracticeVM')">

             <x:input type="button" value="Test" zk:onClick="@command('addItem')" />

     </div>
  </zk>

and here my Java VM class :

  public class PractiveVM{

      @command
      public void addItem(){

         System.out.println("From XHTML components");

      }
  }

any suggestion ?

Regards,

Klepon

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More