cancel
Showing results for 
Search instead for 
Did you mean: 

Problème: Customisation de la sidebar

jhoueix
Champ in-the-making
Champ in-the-making
Bonjour à tous!  Smiley Very Happy

Je souhaite customiser la sidebar d'Alfresco afin qu'au lieu d'afficher soit le navigateur, soit le panneau latéral, soit opensearch, elle affiche les trois éléments à la suite l'un en dessous de l'autre.

Pour cela j'ai donc essayé de modifié la classe Java UISideBar qui génère cet élément.

Mon problème est le suivant:

La méthode qui génère la sidebar est la suivante:
   @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>");        
      }
   }

C'est le bout de code
         // render the plugin
         out.write("<div id=\"pluginBox\">");
         UIComponent plugin = (UIComponent)getChildren().get(2);
         Utils.encodeRecursive(context, plugin);
         out.write("</div>");      
qui génère le contenu de la sidebar (opensearch, panneau latéral, ou navigateur). Cependant je ne vois à aucun moment dans le code où est ajouté le composant "plugin" dans la liste ("(UIComponent)getChildren()"). Il me suffirait d'ajouter les autres éléments dans la liste pour les afficher pour effectuer ma customisation. Quelqu'un pourrait il me renseigner afind e savoir ou dans le code est ajouté le plugin? Merci d'avance de votre aide, je suis malheureux loin d'être un expert JSF…
1 REPLY 1

jhoueix
Champ in-the-making
Champ in-the-making
Je ne rencontre pas vraiment le succès escompté? Est ce que personne n'a la réponse, ou c'est ma question qui n'est pas claire?
Getting started

Tags


Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.