Problem with sidebar customization
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-07-2008 11:07 AM
Hello!
I am trying to customise the Alfresco's sidebar in order to show every element one under an other, instead of having to choose between the elements "navigation", "panel" and "opensearch".
So I tried to modify the Java class "UISideBar" which generate this component.
But I have the following problem:
The method which generates the sidebar component is "encodeChildren":
and that's the piece of code
Thank you all for your help, I am far from being a JSF expert…

I am trying to customise the Alfresco's sidebar in order to show every element one under an other, instead of having to choose between the elements "navigation", "panel" and "opensearch".
So I tried to modify the Java class "UISideBar" which generate this component.
But I have the following problem:
The method which generates the sidebar component is "encodeChildren":
@Override public void encodeChildren(FacesContext context) throws IOException { if (!isRendered()) return; // there should be 3 children, the modelist, the actions // and the plugin, get them individually and render if (getChildren().size() == 4) { ResponseWriter out = context.getResponseWriter(); out.write("<table border='0' cellpadding='6' cellspacing='0' width='100%'><tr><td>"); // render the list UIModeList modeList = (UIModeList)getChildren().get(0); Utils.encodeRecursive(context, modeList); out.write("</td><td align='right'>"); // render the actions UIActions actions = (UIActions)getChildren().get(1); Utils.encodeRecursive(context, actions); out.write("</td></tr></table>"); // render the end of the header panel String cxPath = context.getExternalContext().getRequestContextPath(); out.write("</td><td style=\"background-image: url("); out.write(cxPath); out.write("/images/parts/sidebar_top_grey_end.gif)\" width=5 align=right valign=top>" + "<img src=\""); out.write(cxPath); out.write("/images/parts/sidebar_grey_03.gif\" width=5 height=5></td></tr>" + "<tr><td colspan='3'>"); // render the plugin out.write("<div id=\"pluginBox\">"); UIComponent plugin = (UIComponent)getChildren().get(2); Utils.encodeRecursive(context, plugin); out.write("</div>"); } }
and that's the piece of code
// render the plugin out.write("<div id=\"pluginBox\">"); UIComponent plugin = (UIComponent)getChildren().get(2); Utils.encodeRecursive(context, plugin); out.write("</div>");
which generates the content of the sidebar ("navigator", "panel" or "opensearch"). But I don't see in the code where is added the compoenent "plugin" in the list ("(UIComponent)getChildren()"). I just need to know where to add other elements in this list to realize my customization. Does anybody knows where in the code is added the plugin?Thank you all for your help, I am far from being a JSF expert…
Labels:
- Labels:
-
Archive
3 REPLIES 3
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-09-2008 04:07 AM
Hum, is my question not clear? Or nobody has any solution? :?
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-09-2008 05:53 AM
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-09-2008 09:12 AM
Thank you!
