Thank you Bob! 2,3) I have made simple component, that solves my need. Can You look at source - is it right?
Source file is attached.
==========
From: Bob Schellink <sabob1 <at> gmail.com>
Date: 2010-02-04 08:49:29 GMT (2 days, 5 hours and 39 minutes ago)
Hi Andrey,
On 4/02/2010 04:21 AM, Andrey P.Rybin wrote:
>
> 1) Is here some plans to add modal window/dialog box functionality to Click?
I'm not aware of anyone working on this but it would be a great addition.
We'd need to think how to solve this in a cross browser way. I just
had a look at showModalDialog
and it seems that only Firefox and IE supports it properly. Chrome
displays a dialog but it is not
modal. Opera didn't work either.
Another option is to use a JavaScript based solution but that could be
a bit heavy weight.
> 2) How to do form with this layout:
>
> Label [input field] [question-mark image with tooltip]
>
> This code
> form.add(field1);
> form.add(new Label("my html "));
>
> shows field and [question-mark image with tooltip] in two lines
> Label [input field]
> [question-mark image with tooltip]
I've found that for flexible layouts the HTML list (<ul>) is quite
useful. You can see a demo here:
http://www.avoka.com/click-examples/form/contact-details.htm
>
> 3) May be I just can't find...
> Do Click have simple AbstractContainerField descendants with div and
> span tags (as in AbstractContainerField javadoc)?
There are no descendants of this container but its pretty easy to add
a custom control:
public class DivContainerField extends ContainerField {
public String getTag() {
return "div";
}
}
Whether we add this to Click itself is up for debate. We should be
careful not to bloat the library
too much for those less common use cases. One option is to host these
controls in the ClickClick[1]
project and incorporate them into Click if they are popular. I know
ClickClick is currently a pain
because there are no builds available but once Click 2.1.0 is out we
can start building ClickClick
binary artifacts.
kind regards
bob
[1]: http://code.google.com/p/clickclick/
On Wed, Feb 3, 2010 at 22:21, Andrey P.Rybin <[email protected]> wrote:
> Hello, All!
>
> 1) Is here some plans to add modal window/dialog box functionality to Click?
>
> What I mean:
>
> I have big form with many fields and I have field 'customer' (simple
> input text) there.
> Customer is a large object itself (with many properties) and I have a
> lot of those objects.
>
> I want to have "select" link/button/image after customer field.
> If user will click this "select" control then modal window/dialog box
> with customers table should be shown.
> User can select customer with pleasure (Click's Table is great).
> Then selected customer should be inserted in 'customer' field.
>
> I can (with some voodoo magic) made it with handwritten javascript
> (@see window.showModalDialog Method), but will be much better to have
> out-of-box support for this.
>
>
>
> 2) How to do form with this layout:
>
> Label [input field] [question-mark image with tooltip]
>
> This code
> form.add(field1);
> form.add(new Label("my html "));
>
> shows field and [question-mark image with tooltip] in two lines
> Label [input field]
> [question-mark image with tooltip]
>
> ?
>
>
> 3) May be I just can't find...
> Do Click have simple AbstractContainerField descendants with div and
> span tags (as in AbstractContainerField javadoc)?
>
> If Click has then I can solve question #2.
>
> It is good to have them.
> Then layout can be made programmatically like this:
>
> DivContainerField line1 = new DivContainerField();
> line1.add(field11);
> line1.add(field12);
> form.add(line1);
>
> DivContainerField line2 = new DivContainerField();
> line2.add(field21);
> line2.add(label22);
> form.add(line2);
>
> Result:
> Label11 [field11] Label12 [field12]
> Label 21 [field21] label22 (== [question-mark image with tooltip] for
> example).
>
SimpleContainerField.java
Description: Binary data
