Foren
how to include Jsp file in this Alloy Ui script
Bharani Ravi Kanth, geändert vor 12 Jahren.
how to include Jsp file in this Alloy Ui script
Junior Member Beiträge: 63 Beitrittsdatum: 20.01.12 Neueste Beiträge
Hello Guys
I am using this script
AUI().ready('aui-tabs',
function(A) {
var tabs = new A.TabView(
{
boundingBox: '#tabs',
items: [
{label: 'Employment Details',content: 'This my content 1'},
{label: 'Personal Details', content: 'This my content 2'},
{label: 'Family Details', content: 'This my content 3'}
]
}
).render();
});
for creating of tabs in my portlet and i have three JSP files emp.jsp,personal.jsp,family.jsp how should i include this jsp files in this script so that instead of "this is my content" it should display my content which is present in my JSP's.Please help me in sorting out this.
Regards
Bharani.
I am using this script
AUI().ready('aui-tabs',
function(A) {
var tabs = new A.TabView(
{
boundingBox: '#tabs',
items: [
{label: 'Employment Details',content: 'This my content 1'},
{label: 'Personal Details', content: 'This my content 2'},
{label: 'Family Details', content: 'This my content 3'}
]
}
).render();
});
for creating of tabs in my portlet and i have three JSP files emp.jsp,personal.jsp,family.jsp how should i include this jsp files in this script so that instead of "this is my content" it should display my content which is present in my JSP's.Please help me in sorting out this.
Regards
Bharani.
Mayur Patel, geändert vor 12 Jahren.
RE: how to include Jsp file in this Alloy Ui script
Expert Beiträge: 358 Beitrittsdatum: 17.11.10 Neueste Beiträge
I don't have much idea on this but i think there is not having any way to include jsp inside aui:script,
you can try this way like to create three DIVs and each div is having content of included jsp and inside script you can access content of each DIV
If anyone can suggest here better solution.
Thanks
you can try this way like to create three DIVs and each div is having content of included jsp and inside script you can access content of each DIV
If anyone can suggest here better solution.
Thanks
Bharani Ravi Kanth, geändert vor 12 Jahren.
RE: how to include Jsp file in this Alloy Ui script
Junior Member Beiträge: 63 Beitrittsdatum: 20.01.12 Neueste Beiträge
Hey Mayur thank you for your immediate reply....Do you have any sample code based on the issue.
Mayur Patel, geändert vor 12 Jahren.
RE: how to include Jsp file in this Alloy Ui script
Expert Beiträge: 358 Beitrittsdatum: 17.11.10 Neueste Beiträge
hey I've checked aui-tabs.js file and you can use the same like,
Instead of CONTENT_NODE you have to pass DIV Id say #test and create div of name #test that will be having include stmt of jsp, this will fetch its content and store in variable,try it out
content: {
lazyAdd: false,
valueFn: function() {
var instance = this;
var value = '';
var contentNode = instance.get(CONTENT_NODE);
if (contentNode) {
value = contentNode.html();
}
return value;
},
Instead of CONTENT_NODE you have to pass DIV Id say #test and create div of name #test that will be having include stmt of jsp, this will fetch its content and store in variable,try it out
Bharani Ravi Kanth, geändert vor 12 Jahren.
RE: how to include Jsp file in this Alloy Ui script
Junior Member Beiträge: 63 Beitrittsdatum: 20.01.12 Neueste Beiträge
should i include a jsp file inside the div tag?
<div id="test">
<jsp:include name="xyz.jsp">
</div> ?
<div id="test">
<jsp:include name="xyz.jsp">
</div> ?
Bharani Ravi Kanth, geändert vor 12 Jahren.
RE: how to include Jsp file in this Alloy Ui script
Junior Member Beiträge: 63 Beitrittsdatum: 20.01.12 Neueste Beiträge
Hey mayur i have got the required solution i have changed the code to
the above code. i could embed the jsp file into the tab.Thanks for your suggestions.
<%@ taglib uri="http://java.sun.com/portlet_2_0" prefix="portlet" %>
<%@ taglib uri="http://liferay.com/tld/ui" prefix="liferay-ui" %>
<%@ taglib uri="http://liferay.com/tld/aui" prefix="aui" %>
<%@ page import="com.liferay.portal.kernel.util.ParamUtil" %>
<%@ page import="javax.portlet.PortletURL" %>
<%@ page import="javax.portlet.ResourceURL" %>
<%@ page import="javax.portlet.WindowState" %>
<portlet:defineObjects />
<html>
<body>
<script type="text/javascript">
AUI().ready('aui-tabs', function(A) {
var tabs1=new A.TabView({
boundingBox: '#tabs',
listNode: '#docs',
contentNode: '#docsContent'
});
tabs1.render();
});
</script>
<div id="tabs">
<ul class="aui-tabview-list aui-widget-hd" id="docs">
<li class="aui-tab">
<a class="aui-tab-label" href="javascript:;">Employee Details</a></li>
<li class="aui-tab">
<a class="aui-tab-label" href="javascript:;">Personal Details</a></li>
</ul>
<div class="aui-tabview-content aui-widget-bd" id="docsContent">
<div class="aui-tabview-content-item">
<jsp:include page="EmployementDetails.jsp"/></div>
<div class="aui-tabview-content-item">
<jsp:include page="PersonalDetails.jsp" flush="false" /> </div>
</div>
</div>
</body>
</html>
the above code. i could embed the jsp file into the tab.Thanks for your suggestions.
Mayur Patel, geändert vor 12 Jahren.
RE: how to include Jsp file in this Alloy Ui script
Expert Beiträge: 358 Beitrittsdatum: 17.11.10 Neueste Beiträge
That's Fabulous Ravi Kanth This will be helpful for others. Happy Learning !!!
Bharani Ravi Kanth, geändert vor 12 Jahren.
RE: how to include Jsp file in this Alloy Ui script
Junior Member Beiträge: 63 Beitrittsdatum: 20.01.12 Neueste Beiträge
Mayur i need to how to add users programatically...do you have sample code based on this issue.
Mayur Patel, geändert vor 12 Jahren.
RE: how to include Jsp file in this Alloy Ui script
Expert Beiträge: 358 Beitrittsdatum: 17.11.10 Neueste Beiträge
Please create new thread for new question,
you can refer to following links for your problem,
http://www.liferay.com/community/forums/-/message_boards/message/10422104
http://www.liferay.com/community/forums/-/message_boards/message/10855080
you can refer to following links for your problem,
http://www.liferay.com/community/forums/-/message_boards/message/10422104
http://www.liferay.com/community/forums/-/message_boards/message/10855080
Zeeshan Khan, geändert vor 11 Jahren.
RE: how to include Jsp file in this Alloy Ui script
Expert Beiträge: 349 Beitrittsdatum: 21.07.11 Neueste Beiträge
Hi Mayur n Ravi,
What if I want to change the colour look n feel of these tabs ?? What I need to do in this case.....
Thanks !!
What if I want to change the colour look n feel of these tabs ?? What I need to do in this case.....
Thanks !!
Zeeshan Khan, geändert vor 11 Jahren.
RE: how to include Jsp file in this Alloy Ui script
Expert Beiträge: 349 Beitrittsdatum: 21.07.11 Neueste BeiträgeBharani Ravi Kanth:
Hey mayur i have got the required solution i have changed the code to<%@ taglib uri="http://java.sun.com/portlet_2_0" prefix="portlet" %>
<%@ taglib uri="http://liferay.com/tld/ui" prefix="liferay-ui" %>
<%@ taglib uri="http://liferay.com/tld/aui" prefix="aui" %>
<%@ page import="com.liferay.portal.kernel.util.ParamUtil" %>
<%@ page import="javax.portlet.PortletURL" %>
<%@ page import="javax.portlet.ResourceURL" %>
<%@ page import="javax.portlet.WindowState" %>
<portlet:defineObjects />
<html>
<body>
<script type="text/javascript">
AUI().ready('aui-tabs', function(A) {
var tabs1=new A.TabView({
boundingBox: '#tabs',
listNode: '#docs',
contentNode: '#docsContent'
});
tabs1.render();
});
</script>
<div id="tabs">
<ul class="aui-tabview-list aui-widget-hd" id="docs">
<li class="aui-tab">
<a class="aui-tab-label" href="javascript:;">Employee Details</a></li>
<li class="aui-tab">
<a class="aui-tab-label" href="javascript:;">Personal Details</a></li>
</ul>
<div class="aui-tabview-content aui-widget-bd" id="docsContent">
<div class="aui-tabview-content-item">
<jsp:include page="EmployementDetails.jsp"/></div>
<div class="aui-tabview-content-item">
<jsp:include page="PersonalDetails.jsp" flush="false" /> </div>
</div>
</div>
</body>
</html>
the above code. i could embed the jsp file into the tab.Thanks for your suggestions.
well done Ravi n Mayur......