Style hierarchical unit help!!

12 Jun '12, 12:41 PM
26,849 Views
No Forum Badges

enter code hereHi, I'm trying to stylize a hierarchical unit and i noticed that the link are "automatically" added to the correct level! Now, I've a link called Add wich is not coupled with any oids(its purpouse is to add a new element to first level) but compiling and running I've found out that the link are not displayed at all!!

I've just do a similar thing with the index unit with a code like this:

def addLink = unit.selectSingleNode("layout:Link[@name='Add']")

%] <wr:frame>

                    <c:forEach var="current" varStatus="status" items="${<wr:UnitId/>.data}">
                        <c:set var="index" value="${status.index}"/>
                        <li>
                        <wr:Visible context="unitLink" position="'index'">
                            <a href='<wr:URL context="primaryLink"/>'>
                                <wr:Iterate var="attr" context="unit" select="layout:Attribute">
                                        <wr:Value/>
                                </wr:Iterate>
                            </a>
                        </wr:Visible>
    
                        <wr:Iterate var="l" context="unit" select="layout:Link[position()>1 and @name!='Add']">
                            <wr:Link/>
                        </wr:Iterate>
                        </li>
                    </c:forEach>
                 </ul>
                 <a href='<wr:URL context="addLink"/>'>
                    add
                </a>
    
    </wr:frame>

    In pratcice the idea is to fetch from the layout a link called Add and place it outside the structure! But I can't do this on the hierarchical, the link seems to be hidden or not accessible!

    thanks for your help!

 
x 1
Follow
Answer Answer at this question and get points!
No Forum Badges

Hi,

  • do you get any errors when you generate the project ?
  • where have you declared the "addLink" variable inside the template ? The declaration should be placed next to the other declarations. If the template has no variable declarations, the "addLink" should be defined after the "import" instructions, as it occurs for the other templates.

The Hierarchical Index Unit has a different behaviour, with respect to the other units (such as the Index Unit), because the Link is visible only if it is coupled.

Alternatively, for getting the desired result, you can model the Link. For example, you can by add a No Op Content Unit in the page containing the Hierarchical Index Unit and draw a Link to the operation chain. Then, in the Grid View, expand the left tree and place in the grid only the link.

   
x 1
Answer at this question and get points!

Related questions

2 grids inside one/same cell result in non-selectable 2nd grid Access page variable in a page template add html Ajax is not working in own style project Ajax web app with javascript history object using the WebRatio Alimentar graficas con base de datos Alternate way to get current User Oid in layout template groovy script? Any way to localize the Tab Grid Template (Webratio Store)? Applicare un template ad un Web Project Ayuda Simple List Component Layout personalizado Bootstrap Style Button to go on another page Cambiare dimensioni bottoni - Change button size Can I inject html into custom unit template?! Change color template bootstrap style Change Style Changing the login page does not work ckeditor - change directory for the browser Colore Attributi index unit Dinamico - Index unit dynamic attribute color Como abrir una ventana en ajax desde una master page Como embeber un video subido desde archivo ? Como mostrar una imagen de portada arriba del menu? Como mostrar una imagen en una lista o en la componente detalles? Confirm Dialog Customize layout mobile platform Custom Tooltip Position Default error pages default login page Display contents of a URL Dynamic link labelling for Custom Unit Error in Excel Unit - Font size Export to a HTML/CSS/JS project Field as link soruce File CSS non considerato in generazione Form element Form template Get date pattern Get home page from template Google map is not shown properly in the tab grid Guardar Saltos de LINEA HelloWorld Unit sample code Hiding landmarks (or flows) when the user is logged in How can i create pagemenu or landmarkmenu with multiple levels. How can I modified the htmls files to perform my style How to add an image in a modal/pop-up window? How to include a template into other template? How to localize AJAX waiting dialog? How to localize the multi message unit in the notification layout How to modify template? How to modify the FertileEnviroment Default page How to remove default Linked Resources? How to use LandmarkMenu as AJAX navigation how to use the landmark menu as AJAX navigation integrate framework to webratio mobile Integrazione javascript Javascript and html javascript history object Localize "Welcome..." and "Process details" logo webratio meaning of each tag in the XML code (Show XML/Show Layout XML) modify field html Modify html generated by wr:NavigationBar Pages Problem After Project Generation pass template variable Problem Login Form only if user not logged Problem print Problems with the page refresh (Tab Grid) Problem with adding templates query unit who to hide fields that are used in a link Recursive Hierarchical Index Unit Style Tree Redirect to the default module Remove default BPM css import for all templates Responsive Bootstrap Grid Responsive Layout Manager Set context parameter Simple Static Page Standard confirm dialog replacement Supoort for Mobile and Desktop display Target tabs in Tab Grid Control Tooltip on a field Too much layout parameters = no scroll in parameters config window Uppercase Use image as interaction flow Vista de diferentes Site Views Webratio Add-ons no permite login wr-ajaxDivs break layout on ajax pages.