I am using Liferay 6 .
When i add the Portlet to the page , this page is shown first
<%# taglib uri="http://java.sun.com/portlet_2_0" prefix="portlet" %>
<portlet:defineObjects />
<portlet:renderURL var="homeurl">
<portlet:param name="jspPage" value="/WEB-INF/jsp/view1.jsp" />
</portlet:renderURL>
<portlet:renderURL var="homeurl2">
<portlet:param name="jspPage" value="/WEB-INF/jsp/view2.jsp" />
</portlet:renderURL>
<portlet:renderURL var="testUpdateURL">
<portlet:param name="jspPage" value="/WEB-INF/jsp/view3.jsp" />
</portlet:renderURL>
<p><a href="<%=homeurl%>" >
1. Go home
</a></p>
<p><a href="<%=homeurl2%>" >
2. Go home 2
</a></p>
<p><a href="<%=testUpdateURL%>" >
3. TestUpdate
</a></p>
This is view1.jsp
This is the view1 portlet.
Similarly the other JSP Pages , view2.jsp and view3.jsp are present
But when i click on any of the hyperlik displayed , nothing is happening , the same is being shown again .
The code is exactly it should be.
Their must be something in your controller, check it once if you are not setting jspPage param in your controller.
just move all of your jsp pages in the DOCROOT directory and use
`<portlet:renderURL var="homeurl2">
<portlet:param name="jspPage" value="/view2.jsp" />
</portlet:renderURL>`
Thish is working for me I hope it will solve the problem :)
I am not very good in liferay but I worked on same thing.
Suppose we create a simple portlet where we gave the package name suppose com.portl.asif.
Now by default our view.jsp location is /docroot/html/asif/view.jsp. So I think this is the place where we generally create other jsps. Let us assume I created another jsp say fill.jsp inside the same directory asif so its path /docroot/html/asif/view.jsp
now if you want to call that jsp by another jsp page then use the below code this work for me
<portlet:renderURLvar="viewEmployeeDataURL"> <!-- to redirect to another jsp page -->
<portlet:param name="jspPage" value="/html/asif/second.jsp" />
</portlet:renderURL>
Here second.jsp is the page where I want to navigate from my present jsp page
hope this will work for you
<a href="<%=viewEmployeeDataURL%>" />
If you further face or the aforesaid would not work for you then please let me know
thanks
asif aftab
Related
I have a huge JSF application created using primefaces version 6.0 running on WebSphere Application Server, Version 8.5.5. I want to avoid nested forms so my p:tabView is not included in a form but each tab has its own form. Source for my tab view looks something like this:
<p:tabView activeIndex="#{tabViewBean.selectedTab}" id="tabView" dynamic="true" cache="false" widgetVar="tabViewWidget">
<p:ajax event="tabChange" listener="#{tabViewBean.handleTabChange}" update=":tabView" />
<p:tab id="tab1" title="First tab">
<h:form id="FirstTabForm">
<ui:include src="/views/test/firstTabTab.xhtml"/>
</h:form>
</p:tab>
<p:tab id="tab2" title="Drugi tab">
<h:form id="SecondTabForm">
<ui:include src="/views/test/secondTab.xhtml"/>
</h:form>
</p:tab>
... more tabs ...
</p:tabView>
Is there a way I can submit the form inside current tab without clicking commandButton inside it. I would like to achieve that on tab change event.
Each tab has 15-20 input fields and I don't want to use ajax on each value change because it is slowing down my application significantly.
I think you can use processattribute with a dynamic selector on tabChange event.
You can see it in action here: Ajax Framework - Partial Process
I tried adding muultiple "par" components in my template's JSP. But only the one appearing first is visible on the page.
Is there is limitation of using paragraphs in a page ?
Just change the value for your path variable
<cq:include path="par1" resourceType="foundation/components/parsys" />
<cq:include path="par2" resourceType="foundation/components/parsys" />
this should help you in having multiple paragraph components
I'm using Magento 1.5.0.1 and I want to move my advanced search form to the sidebar for my 2columns-left template.
What I've tried was this:
<reference name="left">
<block type="catalogsearch/advanced_form" name="catalogsearch_advanced_form" template="catalogsearch/advanced/form.phtml"/>
<block type="core/html_calendar" name="html_calendar" as="html_calendar" template="page/js/calendar.phtml"/>
</reference>
But unfortunately it doesnt show up.
When i browse to mywebsite/catalogsearch/advanced/ the form shows up in the sidebar so that goes well.
How can i change it so it always shows up in the sidebar?
Thanks in advance!
What happens if you insert into your template:
<?php echo $this->getLayout()->createBlock('catalogsearch/advanced_form')->setTemplate('catalogsearch/advanced/form.phtml')->toHtml() ?>
Also pay attention that .js files are loaded for calendar.
I am using Modallbox plugin in Grails.
I have following code in the search template:
And the template is being displayed using div tag in other pages. Now I have included
modalbox related stuff in the layout page:
Now when I click on modalbox link, the modalbox is not displayed. Instead it goes to new page. But it works for simple page
<g:javascript library="application" />
<modalbox:modalIncludes />
</head>
<body>
<modalbox:createLink controller="policy" action="show" id="10" title="Show book!" width="500">Book Lorem ipsum</modalbox:createLink>
</body>
Any suggestions....
Thanks in advance!!
That might be because you have other libraries declared in your like jquery...
I need to modify sitefinity's breadcrumbs from this:
Home
to this:
Home >
So if the breadcrumb is on the root page, it needs to have the > after it.
Im an absolute beginner, so go easy on me! (using version 3.7)
Regards
Peter
I had a similar problem in the past and solved it by creating a custom user control with the breadcrumb control embedded within it. this allows you to add your own custom logic in the code behind to show or hide things as necessary:
<%# Control Language="C#" AutoEventWireup="true" CodeFile="BreadcrumbControl.ascx.cs" Inherits="UserControls_Internal_BreadcrumbControl" %>
<%# Register TagPrefix="sfweb" Namespace="Telerik.Cms.Web.UI" Assembly="Telerik.Cms.Web.UI" %>
<asp:HyperLink ID="lnkHome" runat="server" NavigateUrl="/" Text="My Home Page" /> »
<sfweb:Breadcrumb ID="bCrumb" runat="server" PathSeparator=" » " />
here you can hide the BreadCrumb on the home page, showing the homepage hyperlink, which you can customize to show whatever you need.
There may be a better way to do this, but this was the fastest, easiest way I could figure out to do it.
hope this was helpful!
You can easily change the mockup separator. You need to edit the Breadcrumb, click on the advanced button and find the NodeSeparatorMarkup field.
In my case I've put >> instead of >
<span class='sfBreadcrumbNodeSeparator'>»</span>;