0

How to Make Ajax call in Zkoss?

asked 2020-06-08 23:23:44 +0800

VarunG gravatar image VarunG
1

I have a drop-down, based on the selected value Grid columns in the page should change.

For Example: If drop-down has options ABC and DEF then on selecting ABC, columns A,B,C should be displayed whereas on selecting DEF columns G,H,I should be displayed. How can I achieve this?

delete flag offensive retag edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2020-06-09 10:08:29 +0800

hawk gravatar image hawk
2620 1 5
http://hawkphoenix.blogsp... ZK Team

updated 2020-06-09 10:08:47 +0800

In zk, you usually don't need to send an AJAX request explicitly. ZK is a component-based, event-driven framework which means you update UI by controlling components and implement application logic by listening to events.

In MVC pattern, you should do (describe in roughly):

  1. register an onSelect listener in your composer
  2. in that listener, call column.setVisible() with true/false to hide/show columns according to user selection

I suggest you start reading the articles in https://www.zkoss.org/documentation#Getting_Started

link publish delete flag offensive edit
Your answer
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow

RSS

Stats

Asked: 2020-06-08 23:23:44 +0800

Seen: 9 times

Last updated: Jun 09

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