0

wiring problem

asked 2016-08-12 09:51:01 +0800

nektarios gravatar image nektarios
1 1

Hello,

i have the following

<?xml version="1.0" encoding="UTF-8"?>   
<div apply="ui.IndexUI">
    <label id="aLbl"/>
    <window>
        <label id="anotherLbl"/>
    </window>
    </div>
</zk>

and the composer

public class IndexUI extends SelectorComposer<Component>{

    @Wire
    Label aLbl;

    @Wire
    Label anotherLbl;

    @Override
    public void doAfterCompose(Component comp) throws Exception {
        super.doAfterCompose(comp);
        log("aLbl : " + aLbl);
        log("anotherLbl : " + anotherLbl);
    }
}

the output of this is

aLbl : <Label tS7Q1#aLbl>
anotherLbl : null

which seems to not wire anotherLbl. Why ? What i have understand wrong ?

My zk version is 7.0.3CE

delete flag offensive retag edit

Comments

Your seconden label is in a window, witch means new idspace. Use CSS selector in order tot say window - label

chillworld ( 2016-08-12 19:10:40 +0800 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2016-08-20 10:47:16 +0800

Sidqi gravatar image Sidqi
1

Why don't you put all labels inside <window></window> tag and apply your composer to window?

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
1 follower

RSS

Stats

Asked: 2016-08-12 09:51:01 +0800

Seen: 27 times

Last updated: Aug 20 '16

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