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

Autocompletion for Compound Widget

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: Trunk
    • Fix Version/s: 16.11.01, 17.12.01
    • Component/s: framework
    • Labels:
      None

      Description

      I am trying to enable auto-completion when coding compound widget.
      My plan as follows:
      1. The following xsd will be modified to use namespace
      site-conf.xsd
      widget-form.xsd
      widget-screen.xsd
      widget-menu.xsd
      simple-methods.xsd
      For example, in site-conf.xsd, we add the following document level attribute

      xmlns="http://ofbiz.apache.org/sc" targetNamespace="http://ofbiz.apache.org/sc"
      

      2. Import the above schema into compound-widgets.xsd so that compound widgets use only one consolidated schema.

      3. Update ExampleCompoundWidgets.xml to use the new compound-widgets.xsd. For example

      <compound-widgets xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
              xmlns:sc="http://ofbiz.apache.org/sc"
              xmlns:m="http://ofbiz.apache.org/m"
              xmlns:s="http://ofbiz.apache.org/s"
              xmlns:f="http://ofbiz.apache.org/f"
              xmlns:sm="http://ofbiz.apache.org/sm"
              xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/compound-widgets.xsd">
      
          <site-conf>
              <sc:request-map uri="CompoundWidgets1">
                  <sc:security https="true" auth="true"/>
                  <sc:event type="simple" invoke="CompoundWidgetsFunc" path="component://example/widget/example/ExampleCompoundWidgets.xml"/>
                  <sc:response name="success" type="view" value="CompoundWidgets1"/>
              </sc:request-map>
              <sc:request-map uri="CompoundWidgets2"><sc:security https="true" auth="true"/><sc:response name="success" type="view" value="CompoundWidgets2"/></sc:request-map>
              
              <sc:view-map name="CompoundWidgets1" type="screen" page="component://example/widget/example/ExampleCompoundWidgets.xml#CompoundWidgets1"/>
              <sc:view-map name="CompoundWidgets2" type="screen" page="component://example/widget/example/ExampleCompoundWidgets.xml#CompoundWidgets2"/>
          </site-conf>
      ...... the rest
      

      4. Change java code to support reading xml with namespace (i.e. xml for compound widgets)

      5. Update the attributes at document level for rest of the controllers, menus, forms, simple methods and screens. Current setting will not work for schema with a namespace. For example, in controller.xml, we will change

      xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/site-conf.xsd”
      

      to

      xmlns="http://ofbiz.apache.org/sc” xsi:schemaLocation="http://ofbiz.apache.org/dtds/site-conf-ns.xsd”>
      

        Attachments

        1. OFBIZ-7061.patch
          459 kB
          James Yong
        2. OFBIZ-7061.patch
          457 kB
          Jacques Le Roux
        3. OFBIZ-7061.patch
          473 kB
          James Yong
        4. OFBIZ-7061-minilang-schema.patch
          55 kB
          James Yong

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: