Results 1 to 6 of 6

Thread: JGoodiesBeanFormBuilder - How to use?

  1. #1
    Join Date
    Aug 2004
    Location
    Saskatoon SK Canada
    Posts
    29

    Default JGoodiesBeanFormBuilder - How to use?

    I'm missing something when attempting to use the JGoodiesBeanFormBuilder. For example, I define my form like so:

    Code:
        FormLayout layout = new FormLayout("right:pref, 3dlu, pref:grow"
        BeanFormBuilder formBuilder = new JGoodiesBeanFormBuilder(getFormModel(), layout);
    Now I add a few objects:

    Code:
        this.firstField = formBuilder.add("first")[1];
        formBuilder.add("second");
        formBuilder.add("third");
    So far, so good. Now, below those, I want to add a tabbedPane that spans all the columns of the form. I can build the tabbedPane with the TabbedDialogPage class, but how do I add it to the form? I don't seem to be able to find the right method to do that.

    Thanks in advance...

  2. #2
    Join Date
    Aug 2004
    Location
    Melbourne, FL
    Posts
    2,794

    Default

    Maury,

    You can likely grab the wrapped "JGoodies"-specific builder (the one we wrap) and use it's familiar methods to do that. Our wrapper interfaces here are weak at this point. Because of that, in general, I'd prefer the TableLayoutBuilder or GridLayoutBuilders to JGoodiesFormBuilder... Our JGoodies wrappers are just not there yet, compared to these other builders. I will make a note in the docs.

    Apologize for the confusion! Keith
    Keith Donald
    Core Spring Development Team

  3. #3
    Join Date
    Aug 2004
    Location
    Saskatoon SK Canada
    Posts
    29

    Default

    Quote Originally Posted by kdonald
    I'd prefer the TableLayoutBuilder or GridLayoutBuilders to JGoodiesFormBuilder... Our JGoodies wrappers are just not there yet, compared to these other builders.
    That's not a problem, I was just giving JGoodies a try.

    Okay, TableLayoutBuilder will give me control over the layout, but it doesn't have the convienence of the TableFormBuilder add methods. The following gives me the layout I'm looking for, but seems somewhat kludgy:

    Code:
        TableFormBuilder formBuilder = new TableFormBuilder(getFormModel());
        this.firstField = formBuilder.add("first")[1];
        formBuilder.row();
        formBuilder.add("second");
        formBuilder.row();
        formBuilder.add("third");
        
        javax.swing.JTabbedPane tP = new javax.swing.JTabbedPane();
        tP.addTab("tab 1", new javax.swing.JPanel());
        tP.addTab("tab 2", new javax.swing.JPanel());
        tP.addTab("tab 3", new javax.swing.JPanel());
        
        TableLayoutBuilder layoutBuilder = new TableLayoutBuilder();
        layoutBuilder.row();
        layoutBuilder.cell(formBuilder.getForm());
        layoutBuilder.row();
        layoutBuilder.cell(tP);
    Is there any specific reason TableFormBuilder doesn't have a getBuilder method to return the TableLayoutBuilder for the form, like some of the other Builder classes? Then the above could look like:

    Code:
        TableFormBuilder formBuilder = new TableFormBuilder(getFormModel());
        this.firstField = formBuilder.add("first")[1];
        formBuilder.row();
        formBuilder.add("second");
        formBuilder.row();
        formBuilder.add("third");
        formBuilder.row();
        
        javax.swing.JTabbedPane tP = new javax.swing.JTabbedPane();
        tP.addTab("tab 1", new javax.swing.JPanel());
        tP.addTab("tab 2", new javax.swing.JPanel());
        tP.addTab("tab 3", new javax.swing.JPanel());
        
        TableLayoutBuilder layoutBuilder = formBuilder.getBuilder();
        layoutBuilder.cell(tP);

    Apologize for the confusion!
    No problems, I'm used to being confused. ;-)

  4. #4
    Join Date
    Aug 2004
    Location
    Melbourne, Australia
    Posts
    335

    Default

    Is there any specific reason TableFormBuilder doesn't have a getBuilder method to return the TableLayoutBuilder for the form, like some of the other Builder classes?
    None at all. I just added the following:

    Code:
    TableLayoutBuilder TableFormBuilder.getLayoutBuilder()
    Ollie

  5. #5
    Join Date
    May 2006
    Posts
    11

    Default JGoodies wrapper

    Hi,

    I have an application that was built with the jgoodies defaultbuilder with the layouts, now i'm trying to get the same application with spring rich client integrated, so what is the best practice i can now take. If i need to leverage with the current technology background, how i can proceed? your help most wanted please.

    i'm already confused with your framework as the documentation is very less and, any step-by-step tutorial that we can follow. Also looking for java webstart application, the sample also talks about standalone.

    If get current update from SVN, is it the newly released source please, because i'm not able to see JGoodiesBeanBuilder at all.

    thanks
    kumar

  6. #6
    Join Date
    May 2006
    Posts
    11

    Default new to SRC and bit confused with sample and docs

    Hi,

    I went to this posting, and from there started doing some initial work,

    http://opensource.atlassian.com/conf.../Forms+Support

    As you asked to use the new TableFormBuilder(getFormModel()); this one even gives me out undefined, i don't know where to start and how to proceed. Will any one please help me.

    thanks
    kumar

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •