0

How can (J)python work with zk??

asked 2013-04-24 05:39:29 +0800

kimtch gravatar image kimtch
3 2

updated 2013-04-24 10:06:16 +0800

From the smalltalk by Bobzk, I tried his example with my database, it works. What If i want to do the thing then which part of the code should I modified?

Only python part or composer or both?

Did anyone experience in this?

Here is some code,

Could you please teach me to fill in the listbox model?

<?page title="zk Python test"?>
<window id="mywin" apply="pfactory.ComposerFactory" title="Book details" border="normal" width="600px">
    <custom-attributes factory-class="BookCon" />
        <listbox model="?" emptyMessage="No record found in the result">
            <listhead sizable = "true" menupopup="auto">
               <listheader sort="auto" label="Id" width="150px"/>
               <listheader sort="auto" label="Subject" />
            </listhead>
<template name="model">
                <listitem>
                    <listcell label ="${each.id}" />
                    <listcell label ="${each.subject}" />
                </listitem>
</template>
        </listbox>
</window>
delete flag offensive retag edit

Comments

Hi Bobzk, I have just updated some code of my ZUL file. Does the composer can be use for every scenario?

sorry for poor english, and newbie @ zk and python

kimtch ( 2013-04-24 09:39:33 +0800 )edit

Yes, I know part III is better than part I but I would like to ensure what should be the value of the model, trying to isolated the problem>_>

kimtch ( 2013-04-24 09:49:30 +0800 )edit

4 Answers

Sort by ยป oldest newest most voted
0

answered 2013-04-24 09:08:43 +0800

Bobzk gravatar image Bobzk
442 1 6

You need to change the Python code as your application requires and of course the ZUL code.

What you do not need to do is change any java code.

Of course you can copy and/or keep any of the Python code if it suits your application.

Let me know if you need more information.

link publish delete flag offensive edit
0

answered 2013-04-24 09:45:43 +0800

Bobzk gravatar image Bobzk
442 1 6

I would not suggest doing it the way you have (using zscript) and that is not how we do it in the smalltalk.

Not sure it will work your way, but if it does it will be slow.

Go back to using the way the smalltalk says. Make sure you are reading the latest smalltalk. http://books.zkoss.org/wiki/SmallTalks/2011/December/PythonWithZKPart3

link publish delete flag offensive edit
0

answered 2013-04-24 16:49:10 +0800

Bobzk gravatar image Bobzk
442 1 6

Sorry, I don't really want to help you go down a dead end route. We tried stuff like this and it was too slow. Each time a new user came on, it had to fire up the Jython interpreter. Added 2-3 seconds or so to the initial page load for each user.

Go down the route as I describe in the third smalltalk and I'll help as much as I can.

link publish delete flag offensive edit
0

answered 2017-02-01 16:22:59 +0800

JosephinaBB gravatar image JosephinaBB
1

s it beneficial to use Python for desktop apps. There are rare breed of programs that are developed on desktop using Python and I was wondering about its main purpose in the tech world. But for start it is not easy to deal with the program without assistance. I found fantastic tutor for my self [url="http://http://pythontutors.com/"]My link[/url]! Python is also very popular in web development, though primarily on the 'back end' side. The combination of easy extensibility, good iteration time, and good integration with database and other web standards makes it a popular choice. I wish you luck in your endeavors!

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: 2013-04-24 05:39:29 +0800

Seen: 40 times

Last updated: Feb 01 '17

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