0

WrongValueException message is disappearing

asked 2008-11-08 00:58:30 +0800

nargv2008 gravatar image nargv2008
48

The constraint message is not showing in panel component.
Here's my sample code. My objective is when user clicked submit button
it should focus to component with constraint. However, the constraint message
is not showing.



<zk>

<zscript>

String[] data = new String[200];
for(int j=0; j < data.length; ++j) {
data = "option "+j;
}
ListModel strset = new SimpleListModel(data);


void test() {
uiDecimalbox.focus();
uiDecimalbox.getValue();

}
</zscript>
<window title="Test Wrong Value Exception" border="normal" width="1200px" height="600px">

<panel style="margin-left:10px" width="1200px" height="600px"
title="TEST PANEL"
border="normal" visible="true">
<panelchildren
style='background:white;background:white;overflow:auto;'>

<decimalbox id="uiDecimalbox" constraint="no empty" />
<listbox model="${strset}" width="200px">
<listhead>
<listheader label="TEST ITEMS" sort="auto"/>
</listhead>
</listbox>
<button label="submit" onClick="test()"/>
</panelchildren>
</panel>

</window>
</zk>

delete flag offensive retag edit

5 Replies

Sort by ยป oldest newest

answered 2008-11-10 04:25:05 +0800

jumperchen gravatar image jumperchen
3909 2 8
http://jumperchen.blogspo... ZK Team

Hi,

In your case, why not specify a proper height to the listbox ?
In some of the modern browsers, except IE, I can't see the button below the listbox.

link publish delete flag offensive edit

answered 2008-11-10 14:13:46 +0800

dennis gravatar image dennis
3679 1 6
http://www.javaworld.com....

as jumper said, following works for me.

<zk>

<zscript><![CDATA[

String[] data = new String[200];
for(int j=0; j < data.length; ++j) {
data = "option "+j;
}
ListModel strset = new SimpleListModel(data);


void test() {
uiDecimalbox.focus();
uiDecimalbox.getValue();

}
]]></zscript>
<window title="Test Wrong Value Exception" border="normal" width="1200px" height="600px">

<panel style="margin-left:10px" width="1200px" height="600px"
title="TEST PANEL"
border="normal" visible="true">
<panelchildren
style='background:white;background:white;overflow:auto;'>

<decimalbox id="uiDecimalbox" constraint="no empty" />
<listbox model="${strset}" width="200px" rows="20">
<listhead>
<listheader label="TEST ITEMS" sort="auto"/>
</listhead>
</listbox>
<button label="submit" onClick="test()"/>
</panelchildren>
</panel>

</window>
</zk>

link publish delete flag offensive edit

answered 2008-11-10 17:26:16 +0800

nargv2008 gravatar image nargv2008
48

I intentionally placed the submit button at the bottom of my page. My objective is what if my component with constraint is in top of the page wherein is no longer can be seen. The only way I can think of is to focus first the component (top page) and see if constraint message will appear. The codes that I presented is just similar to my program except that prior to the listbox there are still more components that makes my submit button at the bottom of the page.
This is working if I am not using panel.

Thanks,

link publish delete flag offensive edit

answered 2008-11-11 01:44:00 +0800

jumperchen gravatar image jumperchen
3909 2 8
http://jumperchen.blogspo... ZK Team

It seems to be a timing issue, please post it to bugs-list.

link publish delete flag offensive edit

answered 2008-11-14 01:54:44 +0800

jumperchen gravatar image jumperchen
3909 2 8
http://jumperchen.blogspo... ZK Team

I post a bug here
Please follow it.

link publish delete flag offensive edit
Your reply
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: 2008-11-08 00:58:30 +0800

Seen: 281 times

Last updated: Nov 14 '08

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