Hi, to mark the selected menu in the menubar we should use code like this:
<ui:define name="viewname">
<li>Components</li>
<li>/</li>
<li><p:link outcome="/data">Data</p:link></li>
</ui:define>
But I want to create the inner content of the "viewname" dynamically because I create menus dynamically and the same view
can be called from different menus.
Example:
<ui:define name="viewname">
<c:forEach items="#{UIHelper.menutree}" var="menu" varStatus="menuLooper">
<c:choose>
<c:when test="#{!menuLooper.last}">
<li>#{menu}</li>
<li>/</li>
</c:when>
<c:when test="#{menuLooper.last}">
<li><p:link outcome="#{UIHelper.contextPath}">#{menu}</p:link></li>
</c:when>
</c:choose>
</c:forEach>
</ui:define>
I don't know what is "viewname" and the code don't work on the view.
Selected menu
Forum rules
Please note that response time for technical support is within 3-5 business days.
Please note that response time for technical support is within 3-5 business days.
-
- Posts: 5281
- Joined: 29 Jun 2013, 12:38
Hi,
Sorry for our typo. Roma doesn't use "viewname" template. While we were copying the demos from other layouts, we forgot to remove it. Sorry again.
But, If you want to use this template, you can add <ui:insert name="viewname" /> to template or topbar.
Best Regards,
Sorry for our typo. Roma doesn't use "viewname" template. While we were copying the demos from other layouts, we forgot to remove it. Sorry again.
But, If you want to use this template, you can add <ui:insert name="viewname" /> to template or topbar.
Best Regards,
Github Profile: https://github.com/mertsincan
I don't understand what you mean when you say "If I want to use it" I just want to know how can I keep the selected menu "Selected" because when I change from a menu to another sometime the menu get contracted or the previous menu keeps selected.
Is the next code used for that?
Is the next code used for that?
In that case it looks like is not working.
<li>Components</li>
<li>/</li>
<li><p:link outcome="/data">Data</p:link></li>
-
- Posts: 5281
- Joined: 29 Jun 2013, 12:38
Hi,
This is a typo. This layout doesn't have a style or element to support "viewname" template. Therefore, you can write custom styles and html codes for it. You can start by adding <ui:insert name="viewname" /> to template or topbar.
As you know, our live demo doesn't have it. This is a typo in the source code.
Best Regards,
This is a typo. This layout doesn't have a style or element to support "viewname" template. Therefore, you can write custom styles and html codes for it. You can start by adding <ui:insert name="viewname" /> to template or topbar.
As you know, our live demo doesn't have it. This is a typo in the source code.
Best Regards,
Github Profile: https://github.com/mertsincan
-
- Information
-
Who is online
Users browsing this forum: No registered users and 1 guest