Hi Andreas,
I´ve tried the last trunk and is still not working.
My environment:
- java version "1.6.0_01"
Java(TM) SE Runtime Environment (build 1.6.0_01-b06)
Java HotSpot(TM) Client VM (build 1.6.0_01-b06, mixed mode, sharing)
- JBoss [Zion] 4.0.5.GA (build: CVSTag=Branch_4_0 date=200610162339)
Below is the HTML (trying to change portal theme):
| ....
| <!-- Content -->
| <h3>Portal theme properties:</h3>
| <p>The settings defined here will be applied to the whole portal
including all the pages
| and windows unless they have been assigned with different settings</p>
| <br><div xmlns="http://www.w3.org/1999/xhtml">
| <span id="themepg" class="portlet-section-body">
|
| <form id="themeform" name="themeform" method="post"
|
action="/portal/auth/portal/admin/default/AdminPortletWindow?org.apache.myfaces.portlet.MyFacesGenericPortlet.VIEW_ID=%2FWEB-INF%2Fjsf%2FeditPortalTheme.xhtml&action=1"
| enctype="application/x-www-form-urlencoded">
|
| <table>
| <tbody>
| <tr>
| <td class="portlet-form-field-label"><label
for="themeform:layout">Layout:</label>
| </td>
| <td><select id="themeform:layout" name="themeform:layout"
size="1" class="portlet-form-field">
| <option value="1column">1column</option>
| <option
value="3columns">3columns</option>
| <option value="generic"
selected="selected">generic</option>
| <option value="phalanx">phalanx</option>
| <option value="nodesk">nodesk</option>
| <option
value="">default</option></select>
| </td>
| </tr>
| <tr>
| <td class="portlet-form-field-label"><label
for="themeform:theme">Theme:</label>
| </td>
| <td><select id="themeform:theme" name="themeform:theme"
size="1" class="portlet-form-field">
| <option value="maple">maple</option>
| <option value="renaissance"
selected="selected">renaissance</option>
| <option
value="industrial">industrial</option>
| <option
value="mission-critical">mission-critical</option>
| <option
value="nphalanx">nphalanx</option>
| <option
value="">default</option></select>
| </td>
| </tr>
| <tr>
| <td class="portlet-form-field-label"><label
for="themeform:renderSet">RenderSet:</label>
| </td>
| <td>
| <select id="themeform:renderSet"
name="themeform:renderSet" size="1" class="portlet-form-field">
| <option value="emptyRenderer">emptyRenderer</option>
| <option
value="emptyRendererNoAjax">emptyRendererNoAjax</option>
| <option value="divRenderer"
selected="selected">divRenderer</option>
| <option
value="divRendererNoAjax">divRendererNoAjax</option>
| <option value="">default</option></select>
| </td>
| </tr>
| </tbody>
| </table>
|
| <br>
|
| <input
id="themeform:_id41jbpns_2fadmin_2fdefault_2fAdminPortletWindowsnpbj:_id42jbpns_2fadmin_2fdefault_2fAdminPortletWindowsnpbj"
|
name="themeform:_id41jbpns_2fadmin_2fdefault_2fAdminPortletWindowsnpbj:_id42jbpns_2fadmin_2fdefault_2fAdminPortletWindowsnpbj"
| value="Update"
onclick="clear_themeform_3A_5Fid41jbpns_5F2fadmin_5F2fdefault_5F2fAdminPortletWindowsnpbj();"
| class="portlet-form-button" type="submit">
|
| <input
id="themeform:_id41jbpns_2fadmin_2fdefault_2fAdminPortletWindowsnpbj:_id43jbpns_2fadmin_2fdefault_2fAdminPortletWindowsnpbj"
|
name="themeform:_id41jbpns_2fadmin_2fdefault_2fAdminPortletWindowsnpbj:_id43jbpns_2fadmin_2fdefault_2fAdminPortletWindowsnpbj"
| value="Cancel"
onclick="clear_themeform_3A_5Fid41jbpns_5F2fadmin_5F2fdefault_5F2fAdminPortletWindowsnpbj();"
| class="portlet-form-button" type="submit">
|
| <input
name="themeform:_id41jbpns_2fadmin_2fdefault_2fAdminPortletWindowsnpbj_SUBMIT"
value="1" type="hidden">
| <input name="jsf_sequence" value="1" type="hidden">
| <input
name="themeform:_id41jbpns_2fadmin_2fdefault_2fAdminPortletWindowsnpbj:_link_hidden_"
type="hidden">
| <script type="text/javascript"><!--
| function
clear_themeform_3A_5Fid41jbpns_5F2fadmin_5F2fdefault_5F2fAdminPortletWindowsnpbj()
{
| var f =
document.forms['themeform:_id41jbpns_2fadmin_2fdefault_2fAdminPortletWindowsnpbj'];
|
f.elements['themeform:_id41jbpns_2fadmin_2fdefault_2fAdminPortletWindowsnpbj:_link_hidden_'].value='';
| f.target='';
| }
|
clear_themeform_3A_5Fid41jbpns_5F2fadmin_5F2fdefault_5F2fAdminPortletWindowsnpbj();
| //--></script>
| </form>
| <input name="themeform_SUBMIT" value="1" type="hidden">
| <input name="jsf_sequence" value="1" type="hidden">
| </span>
| .....
|
I think that should be another FORM tag but it does not appear!?
Maybe there is a bug in ui:define with a decorate template? :(
Another suggestion to fix this is changing the 3 xhtml at
portal-admin.sar\portal-admin.war\WEB-INF\jsf:
- editPortalTheme.xhtml, editPageTheme.xhtml and editWindowTheme.xhtml
in all of them remove or comment these 2 lines (in bold):
| <h:form>
| <h:commandButton value="Update"
action="#{themePropertyAction.execute}" styleClass="portlet-form-button"/>
| <h:commandButton value="Cancel"
action="#{portalobjectmgr.selectObject}" styleClass="portlet-form-button">
| <f:param name="id" value="#{node.id}"/>
| </h:commandButton>
| </h:form>
|
After doing this the generated HTML will be:
| ....
| <br>
|
| <input
id="themeform:_id41jbpns_2fadmin_2fdefault_2fAdminPortletWindowsnpbj"
|
name="themeform:_id41jbpns_2fadmin_2fdefault_2fAdminPortletWindowsnpbj"
| value="Update" onclick="clear_themeform();"
| class="portlet-form-button" type="submit">
|
| <input
id="themeform:_id42jbpns_2fadmin_2fdefault_2fAdminPortletWindowsnpbj"
|
name="themeform:_id42jbpns_2fadmin_2fdefault_2fAdminPortletWindowsnpbj"
| value="Cancel" onclick="clear_themeform();"
class="portlet-form-button" type="submit">
| <input name="themeform_SUBMIT" value="1" type="hidden">
| <input name="jsf_sequence" value="1" type="hidden">
| <input value="" name="themeform:_link_hidden_" type="hidden">
| <script type="text/javascript"><!--
| function clear_themeform() {
| var f = document.forms['themeform'];
| f.elements['themeform:_link_hidden_'].value='';
| f.target='';
| }
| clear_themeform();
| //--></script>
| </form>
| </span>
|
Now it seems to be Ok and after clicking in the update button you should see
the message:
Theme has been correctly updated on the portal named: default
regards.
R.Harari
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4049577#4049577
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4049577
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user