Announcement Announcement Module
Collapse
No announcement yet.
Updating Form control Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Updating Form control

    Is it possible to change/update form control after it has created once. Depending on form object I need to updte the form control but createForm is only called once! Is there a way to force createcontrol on formobject change.

    Amad

  • #2
    I think that You have to extends AbstractForm and add adapter method for protected createFormControl method

    regards

    Comment


    • #3
      The problem is create control gets called only first time. And I need to change the control every time my form object changes.

      Amad

      Comment


      • #4
        You make adapter for createFormControl (it is protected) and call it when you change object

        regrads

        Comment


        • #5
          createFormControl return a control, just calling it , its not going to help.

          Amad

          Comment


          • #6
            yes, I call showView again and it create new form - I don't know ist it good for you

            regards

            Comment


            • #7
              Can you share some of your code?

              Amad

              Comment


              • #8
                Amad,
                I do it, but code isn't finish
                I develop database form control with hibernate and it have too many dependencies
                (hibernate, jdbc driver, rcp)

                I finish - CRUD operations, check for primary key, foreign key, required from database,
                LOV for foreign key (user see rows from fk table when type in master), table view data with search, search and LOV as you type, sorting i table view for any combination of columns
                search with condition : less,more, like,equal, not equal etc

                I need yet : detail view for master detail, robust search, easier create form, better property editor
                search from-to (for this I have to add yet one component and I don't know how do it for now)
                report (probably jasper) for choosed table view

                For create form with this features it be necessary only hibernate mapping and POJO class and create form in RCP - create form is like example in petclinic - you create only visual part

                When I finish I post code to spring RCP

                regards

                Comment


                • #9
                  actually i meant just where you call showForm ....

                  Amad

                  Comment


                  • #10
                    Amad,

                    You can tell your form to create a new control on every request to getControl() using:

                    Code:
                    form.setSingleton(false);
                    Ollie

                    Comment


                    • #11
                      Amad,
                      I call
                      getActiveWindow().getPage().showView(..)

                      regards

                      Comment

                      Working...
                      X