-
New Feature
-
Resolution: Done
-
Normal
-
None
-
None
-
None
-
None
It would be great to be able to specify the width or rather maximum width of a Messagebox directly in a show method call.
The current implementation always maxes out at 330px width which in some cases simply look s very awkward.
I've written my own messagebox ZUL template and Java classes for this purpose (in fact I initially did this to allow setting the button labels, which is now obsolete as it's a new feature in ZK 6.0.0).
Would it be possible to include a width parameter in the argument map that is passed to messagebox.zul?
outer.style.width = jq.px0(Math.min(Math.max(width, 330), jq.innerWidth() - 20));
would subsequently be
outer.style.width = jq.px0(Math.min(Math.max(width, ${arg.width}), jq.innerWidth() - 20));
The Java component introduces another parameter that might simply be specified in an additional Messagebox.show() method:
params.put("width", (width!=null) && (width>Messagebox.DEFAULT_MAX_WIDTH) ? width : Messagebox.DEFAULT_MAX_WIDTH);
DEFAULT_MAX_WIDTH remains 330(px) but it might also be handy to have a static setter allowing to specify the width globally.