Uploaded image for project: 'JBoss Portal'
  1. JBoss Portal
  2. JBPORTAL-2430

drag and drop and partial refresh in a region

    XMLWordPrintable

    Details

    • Type: Feature Request
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 2.7.2 Final
    • Fix Version/s: 2.8 Final
    • Component/s: Portal Core, Portal Theme
    • Labels:
      None
    • Environment:

      JBoss Portal 2.7.2 in JBoss 4.2.3 and JBoss 5.1

      Description

      hi... I added new properties inside the region. With this patch we can decide what region can use partial refresh or drag and drop feature. I've seen that this part is managed in the core but we cannot configure le sngle region for theese properties, so we was forced to use those properties in all the page. I added the two new properties in the org.jboss.portal.theme.tag.RegionTagHandler tag class:

      private String dndEnabled = null;
      private String partialRefreshEnabled = null;

      /**

      • Attribute handler for the drag and drop of this tag
      • <p>
      • This field enables drag and drop on a chosen region
      • </p>
      • @param dndEnabled
      • it can be true or false
        */
        public void setDndEnabled(String dndEnabled) { this.dndEnabled = dndEnabled; }

      /**

      • Attribute handler for the partial refresh of this tag
      • <p>
      • This field enables partial refresh on a chosen region
      • </p>
      • @param partialRefreshEnabled
      • it can be true or false
        */
        public void setPartialRefreshEnabled(String partialRefreshEnabled) { this.partialRefreshEnabled = partialRefreshEnabled; }

      and this part inside the doTag() method:

      if (dndEnabled != null)
      rrc.getProperties().put(DynaRenderOptions.DND_ENABLED,
      dndEnabled);

      if (partialRefreshEnabled != null)
      rrc.getProperties().put(DynaRenderOptions.PARTIAL_REFRESH_ENABLED,
      partialRefreshEnabled);

      I also updated tag descriptor portal-layout.tld inside core and theme projects adding the new properties:

      <taglib
      xmlns="http://java.sun.com/xml/ns/j2ee"
      xmlns:xsi="http://www.w3c.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-jsptaglibrary_2_0.xsd"
      version="2.0">
      <tlib-version>1.0</tlib-version>
      <jsp-version>2.0</jsp-version>
      <short-name></short-name>
      <uri>http://www.jboss.org/portal</uri>
      <tag>
      <name>region</name>
      <tag-class>org.jboss.portal.theme.tag.RegionTagHandler</tag-class>
      <body-content>empty</body-content>
      <attribute>
      <name>orientation</name>
      </attribute>
      <attribute>
      <name>regionName</name>
      </attribute>
      <attribute>
      <name>regionID</name>
      </attribute>

      <---------------------------------------
      <attribute>
      <name>dndEnabled</name>
      </attribute>
      <attribute>
      <name>partialRefreshEnabled</name>
      </attribute>

      ------------------------------------------
      </tag>

      Now, when we want that only some regions uses this properties we can do inside our layout jsp something as:

      <p:region regionName='left' regionID='regionA' dndEnabled='true' partialRefreshEnabled='false'/>

      If we don't specify that two properties, the region will take the properties of the parent node as well as

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                sviluppatorefico Luca Stancapiano
                Reporter:
                sviluppatorefico Luca Stancapiano
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: