Bug 793698 (JBEPP-773)

Summary: "Preferences" tab is only showing up if portlet has been customized (Only possible though portal.xml)
Product: [JBoss] JBoss Enterprise Portal Platform 5 Reporter: Gary Hu <garyhu2>
Component: unspecifiedAssignee: hfnukal <hfnukal>
Status: CLOSED NEXTRELEASE QA Contact:
Severity: high Docs Contact:
Priority: high    
Version: 5.1.0.GACC: epp-bugs, garyhu2, theute
Target Milestone: ---   
Target Release: 5.1.1.DEV01   
Hardware: Unspecified   
OS: Unspecified   
URL: http://jira.jboss.org/jira/browse/JBEPP-773
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-04-19 12:15:57 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Gary Hu 2011-01-10 16:30:17 UTC
Affects: Release Notes
Help Desk Ticket Reference: https://c.na7.visual.force.com/apex/Case_View?id=500A0000005gqTW&sfdc.override=1
project_key: JBEPP

The default site classic includes the following:
  <portlet-application>
      <portlet>
        <application-ref>web</application-ref>
        <portlet-ref>BannerPortlet</portlet-ref>
        <preferences>
          <preference>
            <name>template</name>
            <value>par:/groovy/groovy/webui/component/UIBannerPortlet.gtmpl</value>
            <read-only>false</read-only>
          </preference>
        </preferences>
      </portlet>
      <access-permissions>Everyone</access-permissions>
<show-info-bar>false</show-info-bar>
  </portlet-application>
  <portlet-application>
      <portlet>
        <application-ref>web</application-ref>
        <portlet-ref>BreadcumbsPortlet</portlet-ref>
      </portlet>
      <access-permissions>Everyone</access-permissions>
<show-info-bar>false</show-info-bar>
 </portlet-application>

Please note that the BannerPortlet contains "preferences" property but the BreadcumbsPortlet doesn't.

To reproduce the issue,
 1) log on the EPP 5 as root.
 2) go to the classic site
 3) under the "Site Editor" click "Edit Layout".
 4) click the "Edit Portlet" icon on Banner Portlet, it shows a tab "Preferences". If clicking the "Edit Portlet" icon on Breadcumbs Portlet, it doesn't show the "Preferences" tab.

If you modify the portal.xml to add the "preferences" element it won't take effect until the database is cleaned up and the server is restarted.
    <portlet-application>
      <portlet>
        <application-ref>web</application-ref>
        <portlet-ref>BreadcumbsPortlet</portlet-ref>
        <preferences>
            <preference>
               <name>template</name>
              <value>system:/groovy/webui/core/UIBreadcumbs.gtmpl</value>
              <read-only>false</read-only>
            </preference>
        </preferences>
      </portlet>
      <access-permissions>Everyone</access-permissions>
<show-info-bar>false</show-info-bar>
 </portlet-application>

Comment 2 Gary Hu 2011-01-12 21:07:08 UTC
Ok, here is another scenario. 

Even if you set the "preferences" initially in the portal.xml, and if you remove the portlet from the page and add it later, the "preferences" tab disappear again. In another word, if you add the portlet to the page from the UI (not load it through the portal.xml where the "preferences" property is set), it won't show the "preferences" tab.



Comment 3 Thomas Heute 2011-01-13 17:25:30 UTC
I renamed the Jira to be more accurate.
The issue is that for portlets that don't have an EDIT mode, there is an autogenerated form which doesn't take into account preferences that haven't been overridden (only possible from portal.xml as they don't have an EDIT mode).

Comment 4 Thomas Heute 2011-01-13 17:25:30 UTC
Release Notes Docs Status: Added: Documented as Known Issue


Comment 5 Thomas Heute 2011-01-13 17:25:54 UTC
Link: Added: This issue is related to GTNPORTAL-1752


Comment 6 hfnukal@redhat.com 2011-03-30 09:04:12 UTC
Release Notes Docs Status: Removed: Documented as Known Issue Added: Documented as Resolved Issue
Release Notes Text: Added: "Preferences" tab is only showing up if portlet has been customized (Only possible though portal.xml)


Comment 7 Scott Mumford 2011-04-14 23:43:30 UTC
Switched Release Notes flag so this issue is considered for a release note.

Comment 8 Scott Mumford 2011-04-14 23:43:30 UTC
Affects: Added: [Release Notes]


Comment 9 Thomas Heute 2011-04-15 18:35:53 UTC
From the one-off patch QA it seems to bring regressions

Comment 10 Thomas Heute 2011-04-18 12:24:17 UTC
Regression was fixed in GateIn with GTNPORTAL-1782

Comment 11 hfnukal@redhat.com 2011-04-19 12:15:57 UTC
Regretion fixed.

Comment 12 Scott Mumford 2011-04-29 00:16:22 UTC
Release Notes Docs Status: Removed: Documented as Resolved Issue Added: Needs More Info
Release Notes Text: Removed: "Preferences" tab is only showing up if portlet has been customized (Only possible though portal.xml) Added: Cause: NEEDINFO (Was there a definite 'cause' [eg code bug or missing code?])
Consequence: The 'Preferences' tab would only appear in some portlets if that portlet's portal.xml file had been modified to include it.
Fix: The UIFormInputSet.java and UIPortletForm.java files have been patched...NEEDINFO (what was added in the patch?)
Result: The 'Preferences' tab now appears in all portlets?


Comment 13 Thomas Heute 2011-04-29 07:36:05 UTC
Release Notes Docs Status: Removed: Needs More Info Added: Not Yet Documented
Release Notes Text: Removed: Cause: NEEDINFO (Was there a definite 'cause' [eg code bug or missing code?])
Consequence: The 'Preferences' tab would only appear in some portlets if that portlet's portal.xml file had been modified to include it.
Fix: The UIFormInputSet.java and UIPortletForm.java files have been patched...NEEDINFO (what was added in the patch?)
Result: The 'Preferences' tab now appears in all portlets? Added: Cause: A bug in the code
Consequence: The 'Preferences' tab would only appear in some portlets have been customized during the first deployment through portal.xml descriptor. Non customized portlets with preferences would not have a "preferences" tab
Fix: The UIFormInputSet.java and UIPortletForm.java files have been patched to fix the issue
Result: The 'Preferences' tab now appears in all portlets with preferences


Comment 14 Scott Mumford 2011-05-03 04:18:02 UTC
Release Notes Docs Status: Removed: Not Yet Documented Added: Documented as Resolved Issue
Release Notes Text: Removed: Cause: A bug in the code
Consequence: The 'Preferences' tab would only appear in some portlets have been customized during the first deployment through portal.xml descriptor. Non customized portlets with preferences would not have a "preferences" tab
Fix: The UIFormInputSet.java and UIPortletForm.java files have been patched to fix the issue
Result: The 'Preferences' tab now appears in all portlets with preferences Added: Cause: A bug in the code prevented the 'Prefernces' tab from appearing in some portlets.
Consequence: The 'Preferences' tab would only appear in portlets that were customized during the first deployment through portal.xml descriptor. Non-customized portlets (with settable preferences) would not show a "preferences" tab.
Fix: The UIFormInputSet.java and UIPortletForm.java files have been patched to fix the issue
Result: The 'Preferences' tab now appears in all portlets with preferences


Comment 15 Scott Mumford 2011-05-04 04:04:44 UTC
Release Notes Text: Removed: Cause: A bug in the code prevented the 'Prefernces' tab from appearing in some portlets.
Consequence: The 'Preferences' tab would only appear in portlets that were customized during the first deployment through portal.xml descriptor. Non-customized portlets (with settable preferences) would not show a "preferences" tab.
Fix: The UIFormInputSet.java and UIPortletForm.java files have been patched to fix the issue
Result: The 'Preferences' tab now appears in all portlets with preferences Added: A bug prevented the 'Preferences' tab from appearing in some portlets. The tab would only appear in portlets that were customized during the first deployment through the portal.xml descriptor. Non-customized portlets would not show a 'Preferences' tab. The UIFormInputSet.java and UIPortletForm.java files have been patched to fix the issue and now the tab now appears in all portlets that have configurable preferences.