1

Attributes in macro was not updated after notifyChange

asked 2014-02-20 13:55:25 +0800

rumis gravatar image rumis
11 2

updated 2014-02-21 06:38:25 +0800

I have simple macro and page with this macro.

Macro:

<textbox id="${arg.id}" 
        value="${arg.value}"
        onDoubleClick="@command('doSomething')" />

Page:

<?component name="textboxC" macroURI="/pages/component/textboxComp.zul"?>
<zk>
    <window self="@{define(content)}" border="none" id="myWindow" 
        apply="org.zkoss.bind.BindComposer" viewModel="@id('vm') @init('viewModel.MyVM')" >
    ...
    <textboxC id="myId1" hflex="1"
        value="@bind(vm.definition)" />
    ...
    <textboxC id="myId2" hflex="1"
        value="@bind(vm.definition2)" />
</zk>

If property definition is changed in VM (and notifyChange trigered), value in macro is not updated.

If is textbox directly inside my page and value=@bind(vm.definition), anything is OK, value is updated (after notifyChange).

Can I use dynamic attribute inside of macro component?

delete flag offensive retag edit

Comments

You can use dynamic attribute BUT it do not do what you want. You can't change them from your marco component.(read-only)

chillworld ( 2014-02-21 07:38:10 +0800 )edit
Be the first one to answer this question!
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
1 follower

RSS

Stats

Asked: 2014-02-20 13:55:25 +0800

Seen: 12 times

Last updated: Feb 21 '14

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