Uploaded image for project: 'OFBiz'
  1. OFBiz
  2. OFBIZ-6990

Add Example for Compound Screen Widget

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Implemented
    • Affects Version/s: Trunk
    • Fix Version/s: 16.11.01
    • Component/s: example
    • Labels:
      None

      Description

      An example to test out Compound Screen Widget

      1. OFBIZ-6990.patch
        10 kB
        James Yong
      2. OFBIZ-6990.patch
        10 kB
        James Yong

        Issue Links

          Activity

          Hide
          jamesyong James Yong added a comment -

          This patch includes change to the ConfigXMLReader.java, and uses the original xsd files.

          Go to Example application and click on 'Compound Screen Widget' to view the example.

          Show
          jamesyong James Yong added a comment - This patch includes change to the ConfigXMLReader.java, and uses the original xsd files. Go to Example application and click on 'Compound Screen Widget' to view the example.
          Hide
          jamesyong James Yong added a comment -

          Anyone has comment on this issue / patch?

          Show
          jamesyong James Yong added a comment - Anyone has comment on this issue / patch?
          Hide
          jacques.le.roux Jacques Le Roux added a comment -

          Not yet, please be patient

          Show
          jacques.le.roux Jacques Le Roux added a comment - Not yet, please be patient
          Hide
          gil portenseigne Gil Portenseigne added a comment -

          Hi James,

          I tested you patch with OFBIZ-4090.patch, it works fine for me.

          Concerning you patch, there are some formatting issues. The xml part contains lots of tabs, it's best to follow OFBiz coding convention https://cwiki.apache.org/confluence/display/OFBADMIN/Coding+Conventions , using 4 spaces for indentation. You add some uneeded empty lines (for example in controller.xml part).

          Nothing More, it's working like a charm, is there something blocking commiting OFBIZ-4090 ? i didn't review it in details...

          Show
          gil portenseigne Gil Portenseigne added a comment - Hi James, I tested you patch with OFBIZ-4090 .patch, it works fine for me. Concerning you patch, there are some formatting issues. The xml part contains lots of tabs, it's best to follow OFBiz coding convention https://cwiki.apache.org/confluence/display/OFBADMIN/Coding+Conventions , using 4 spaces for indentation. You add some uneeded empty lines (for example in controller.xml part). Nothing More, it's working like a charm, is there something blocking commiting OFBIZ-4090 ? i didn't review it in details...
          Hide
          jamesyong James Yong added a comment -

          Thanks for the guidelines link. Here is another version.

          Show
          jamesyong James Yong added a comment - Thanks for the guidelines link. Here is another version.
          Hide
          jacques.le.roux Jacques Le Roux added a comment - - edited

          Thanks James and Gil for testing.

          James, you slightly modified patch is in trunk at r1738958

          Show
          jacques.le.roux Jacques Le Roux added a comment - - edited Thanks James and Gil for testing. James, you slightly modified patch is in trunk at r1738958
          Hide
          jacques.le.roux Jacques Le Roux added a comment -

          Thanks for the review Gil,

          is there something blocking commiting OFBIZ-4090 ? i didn't review it in details...

          Yes there were some issues, it was not really complete. At revision: 1738958 I put in trunk all OFBIZ-4090 and OFBIZ-6990 changes refactored and I will close OFBIZ-4090 with OFBIZ-6990. I think we could do a better example, but that would be another Jira!

          Here are the changes globally

          1. As James mentionned we no longer need *-v2.xsd files, I removed them from Adrian's patch
          2. I created a compound-widgets.xsd based on Adrian's and James Yong's previous work. From Paul Foxworthy's comment in OFBIZ-4090, I decided to name the root compound-widgets (hence the file name). I arranged its elements in another way, see below with ExampleCompoundWidgets.xml
          3. I slightly modified James Yong's ExampleCompoundScreenWidget.xml file and renamed it ExampleCompoundWidgets.xml. I added an "s" because there are several OFBiz widgets gathered in one place. For the modifications: I simply changed the names and arranged the elements in another way which I find better suited. I'm used to 1st create the query, then the menus, the screens and their forms. We rarely use widget-trees but it's there also. Finally the simple-method at end if any. The order is not enforced though, so everybody can use her/his own
          4. I added a French label
          5. I completed the widget-catalog.xml with this new entry and tested locally in Eclipse by reloading the XML catalog entries.
          Show
          jacques.le.roux Jacques Le Roux added a comment - Thanks for the review Gil, is there something blocking commiting OFBIZ-4090 ? i didn't review it in details... Yes there were some issues, it was not really complete. At revision: 1738958 I put in trunk all OFBIZ-4090 and OFBIZ-6990 changes refactored and I will close OFBIZ-4090 with OFBIZ-6990 . I think we could do a better example, but that would be another Jira! Here are the changes globally As James mentionned we no longer need *-v2.xsd files, I removed them from Adrian's patch I created a compound-widgets.xsd based on Adrian's and James Yong's previous work. From Paul Foxworthy's comment in OFBIZ-4090 , I decided to name the root compound-widgets (hence the file name). I arranged its elements in another way, see below with ExampleCompoundWidgets.xml I slightly modified James Yong's ExampleCompoundScreenWidget.xml file and renamed it ExampleCompoundWidgets.xml. I added an "s" because there are several OFBiz widgets gathered in one place. For the modifications: I simply changed the names and arranged the elements in another way which I find better suited. I'm used to 1st create the query, then the menus, the screens and their forms. We rarely use widget-trees but it's there also. Finally the simple-method at end if any. The order is not enforced though, so everybody can use her/his own I added a French label I completed the widget-catalog.xml with this new entry and tested locally in Eclipse by reloading the XML catalog entries.
          Hide
          jacques.le.roux Jacques Le Roux added a comment -

          Ha something we could do also is to add some simple unit tests... Not sure how to though (did not even think about it :/)...

          Show
          jacques.le.roux Jacques Le Roux added a comment - Ha something we could do also is to add some simple unit tests... Not sure how to though (did not even think about it :/)...
          Hide
          jamesyong James Yong added a comment -

          Thanks Jacques Le Roux]. The changes look good.

          Show
          jamesyong James Yong added a comment - Thanks Jacques Le Roux ]. The changes look good.

            People

            • Assignee:
              jacques.le.roux Jacques Le Roux
              Reporter:
              jamesyong James Yong
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development