0

Zk framework update

asked 2016-09-11 04:02:03 +0800

KartikBandri gravatar image KartikBandri
3 2

updated 2016-09-13 08:58:46 +0800

Hi All,

I am very new to ZK framework,

In our project we are using zk frame work 3.5 version and now we want to update the version to 8.0.1.1. Our project uses some methods from comboitem class and its method like getOuterAttrs and getInnerAttrs but these methods are removed from the same class from version 5X we are facing compilation issues. So can any one please help me what I need to use instead of these method calls so that the effect remains the same.

Thank you very much and waiting for your response.

Below is the Code

public void render(Component comp,Writer out) throws IOException { final SmartWriter wh = new SmartWriter(out); final ZkComboitem self = (ZkComboitem) comp; final ZkCombobox combobox = (ZkCombobox)self.getParent(); final String uuid = self.getUuid();

    wh.writer("<tr id=\").write(uuid).write("\"z.type=\"Cmit\"")
    .write(self.getOuterAttrs()).write(self.getInnerAttrs()).writeln(">")
    .write("<td>").write(self.getImgTag()).write("</td>\n<td>");

new Out(self.getLabel()).render(out);


if(!Strings.isBlank(self.getDescription()) || !Strings.isBlank(self.getContent()))
{
    if(combobox.isInline())
    {
    wh.write("</td>\n<td><span>");
    new Out(self.getDescription()).render(out);
    wh.write("</span>").write(self.getContent());
    }

    else
    {
    wh.write("<br/>\n<span>");
    new Out(self.getDescription()).render(out);
    wh.write("</span>").write(self.getContent());
    }
}
wh.writeln("</td></tr>");

}

delete flag offensive retag edit

Comments

What's the reason that you use this method? if it's for ID building you can remove it.

chillworld ( 2016-09-11 04:29:13 +0800 )edit

We are using this method to generate HTML tags...

KartikBandri ( 2016-09-13 05:43:54 +0800 )edit

An example of the method and the expected output could be usefull. Like this I could check how to refactor.

chillworld ( 2016-09-13 06:02:46 +0800 )edit

@chillworld I have updated with the code please check...

KartikBandri ( 2016-09-13 08:59:32 +0800 )edit

this is actually a comboitem renderer. You could make a new https://www.zkoss.org/wiki/ZKDeveloper'sReference/MVC/View/Renderer/Combobox_Renderer and set that to the combobox.

chillworld ( 2016-09-13 12:10:05 +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: 2016-09-11 04:02:03 +0800

Seen: 26 times

Last updated: Sep 13 '16

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