Saturday, 17 June 2017
Monday, 12 June 2017
Based on the locale (language), perform some logic.
Based on the locale (language), I need to perform some logic. I am getting en_US for <%=themeDisplay.getLocale();%> in my JSP.
<%
String localelanguage = themeDisplay.getLocale().toString();
if(localelanguage.equalsIgnoreCase("en_US"))
{
}
%>
#foreach( $language in $languageUtil.
getAvailableLocales() )
<li>
<a href="/$language.getLanguage() /group$themeDisplay.getLayout( ).getGroup().getFriendlyURL()" >
$language.getDisplayName()
</a>
</li>
#end
<%
String localelanguage = themeDisplay.getLocale().toString();
if(localelanguage.equalsIgnoreCase("en_US"))
{
}
%>

<li>
<a href="/$language.getLanguage()
$language.getDisplayName()
</a>
</li>
#end
Thursday, 1 June 2017
Setting cookies in javascript
<button onclick="changeFont('default');" title="Default color">D</button>
<button onclick="changeFont('black');" class="black_button" title="Change black color">B</button>
<button onclick="changeFont('yellow');" class="yellow_button" title="Change yellow color">Y</button>
<button onclick="changeFont('zoom');" title="Zoom in">A+</button>
<button onclick="changeFont('zoomout');" title="Zoom out">A-</button>
<script>
function changeFont(style){
if(style == 'black'){
document.cookie = "fontStyle=black";
jquery_var("label, h1, h2, p, header, a, #selectedindividual, #selectedemployer,.panel- heading,#navbar,.headtop,#footer,.colorScheme,.panel-heading,.panel-body,.panel-footer").removeClass("yellow");
jquery_var("label, h1, h2, p, header, a, #selectedindividual, #selectedemployer,.panel-heading,#navbar,.headtop,#footer,.colorScheme,.panel-heading,.panel-body,.panel-footer").addClass("black");
}else if(style == 'zoom'){
curSize= parseInt(jquery_var('.landing-pagebg,.panel-title,.active > a').css('font-size')) + 2;
if(curSize<=20)
jquery_var('.landing-pagebg,.panel').css('font-size', curSize);
}else if(style == 'zoomout'){
curSize= parseInt(jquery_var('.landing-pagebg,.panel-title,.active > a').css('font-size')) - 2;
if(curSize>=10)
jquery_var('.landing-pagebg,.panel').css('font-size', curSize);
}else if(style == 'yellow'){
document.cookie = "fontStyle=yellow";
jquery_var("label, h1, h2, header,p, a, #selectedindividual, #selectedemployer,#navbar,.headtop,#footer,.colorScheme,.panel-heading,.panel-body,.panel-footer").removeClass("black");
jquery_var("label, h1, h2, header,p, a, #selectedindividual, #selectedemployer,#navbar,.headtop,#footer,.colorScheme,.panel-heading,.panel-body,.panel-footer").addClass("yellow");
}else{
document.cookie = "fontStyle=default";
jquery_var("label, h1, h2, header, p, a, #selectedindividual, #selectedemployer,#navbar,.headtop,#footer,.colorScheme,.panel-heading,.panel-body,.panel-footer").removeClass("black");
jquery_var("label, h1, h2, header, p, a, #selectedindividual, #selectedemployer,#navbar,.headtop,#footer,.colorScheme,.panel-heading,.panel-body,.panel-footer").removeClass("yellow");
}
}
</script>
<script>
jquery_var(document).ready(function(){
var fontStyle = getSelectedStyle('fontStyle');
if(fontStyle == 'black'){
jquery_var("label, h1, h2, p, a, #selectedindividual, #selectedemployer").addClass("black");
}else if(fontStyle == 'zoom'){
jquery_var("div, label, h1, h2, p, a").addClass("zoom");
}else if(fontStyle == 'zoomout'){
jquery_var("div, label, h1, h2, p, a").addClass("zoomout");
}else if(fontStyle == 'yellow'){
jquery_var("label, h1, h2, p, a, #selectedindividual, #selectedemployer").addClass("yellow");
}
});
function getSelectedStyle(cname) {
var name = cname + "=";
var decodedCookie = decodeURIComponent(document.cookie);
var ca = decodedCookie.split(';');
for(var i = 0; i <ca.length; i++) {
var c = ca[i];
while (c.charAt(0) == ' ') {
c = c.substring(1);
}
if (c.indexOf(name) == 0) {
return c.substring(name.length, c.length);
}
}
return "";
}
</script>
Note: You have to write the css for that particular tag & classes.
<button onclick="changeFont('black');" class="black_button" title="Change black color">B</button>
<button onclick="changeFont('yellow');" class="yellow_button" title="Change yellow color">Y</button>
<button onclick="changeFont('zoom');" title="Zoom in">A+</button>
<button onclick="changeFont('zoomout');" title="Zoom out">A-</button>
<script>
function changeFont(style){
if(style == 'black'){
document.cookie = "fontStyle=black";
jquery_var("label, h1, h2, p, header, a, #selectedindividual, #selectedemployer,.panel- heading,#navbar,.headtop,#footer,.colorScheme,.panel-heading,.panel-body,.panel-footer").removeClass("yellow");
jquery_var("label, h1, h2, p, header, a, #selectedindividual, #selectedemployer,.panel-heading,#navbar,.headtop,#footer,.colorScheme,.panel-heading,.panel-body,.panel-footer").addClass("black");
}else if(style == 'zoom'){
curSize= parseInt(jquery_var('.landing-pagebg,.panel-title,.active > a').css('font-size')) + 2;
if(curSize<=20)
jquery_var('.landing-pagebg,.panel').css('font-size', curSize);
}else if(style == 'zoomout'){
curSize= parseInt(jquery_var('.landing-pagebg,.panel-title,.active > a').css('font-size')) - 2;
if(curSize>=10)
jquery_var('.landing-pagebg,.panel').css('font-size', curSize);
}else if(style == 'yellow'){
document.cookie = "fontStyle=yellow";
jquery_var("label, h1, h2, header,p, a, #selectedindividual, #selectedemployer,#navbar,.headtop,#footer,.colorScheme,.panel-heading,.panel-body,.panel-footer").removeClass("black");
jquery_var("label, h1, h2, header,p, a, #selectedindividual, #selectedemployer,#navbar,.headtop,#footer,.colorScheme,.panel-heading,.panel-body,.panel-footer").addClass("yellow");
}else{
document.cookie = "fontStyle=default";
jquery_var("label, h1, h2, header, p, a, #selectedindividual, #selectedemployer,#navbar,.headtop,#footer,.colorScheme,.panel-heading,.panel-body,.panel-footer").removeClass("black");
jquery_var("label, h1, h2, header, p, a, #selectedindividual, #selectedemployer,#navbar,.headtop,#footer,.colorScheme,.panel-heading,.panel-body,.panel-footer").removeClass("yellow");
}
}
</script>
<script>
jquery_var(document).ready(function(){
var fontStyle = getSelectedStyle('fontStyle');
if(fontStyle == 'black'){
jquery_var("label, h1, h2, p, a, #selectedindividual, #selectedemployer").addClass("black");
}else if(fontStyle == 'zoom'){
jquery_var("div, label, h1, h2, p, a").addClass("zoom");
}else if(fontStyle == 'zoomout'){
jquery_var("div, label, h1, h2, p, a").addClass("zoomout");
}else if(fontStyle == 'yellow'){
jquery_var("label, h1, h2, p, a, #selectedindividual, #selectedemployer").addClass("yellow");
}
});
function getSelectedStyle(cname) {
var name = cname + "=";
var decodedCookie = decodeURIComponent(document.cookie);
var ca = decodedCookie.split(';');
for(var i = 0; i <ca.length; i++) {
var c = ca[i];
while (c.charAt(0) == ' ') {
c = c.substring(1);
}
if (c.indexOf(name) == 0) {
return c.substring(name.length, c.length);
}
}
return "";
}
</script>
Note: You have to write the css for that particular tag & classes.
Sunday, 28 May 2017
How To Import and Export MySql Dump using command prompt
Import Dump into Database:
It will help to import entire database into specified database(eg: "importingDatabaseName").c:\user\mufas>mysql -uroot -proot importingDatabaseName < Desktop/indexes.sql
Export Dump from Database:
It will help to take entire database as a dump.
c:\user\mufas>mysqldump -u root -proot exportingDatabaseName> Desktop/indexes.sql
Fusion Chart
A simple Column 3D chart showing monthly revenue of Harry's SuperMart for last year.
http://jsfiddle.net/fusioncharts/xL3py/
http://jsfiddle.net/fusioncharts/xL3py/
Sunday, 30 April 2017
Css Sticky
HTML
==============================================
<h4>Scroll to see the sticky element <em>sticking</em></h4>
<div class="extra"></div>
<br />
<div id="wrapper">
<div id="sticky">
sticky
</div>
</div>
<br />
<div class="extra"></div>
<div class="extra"></div>
<br />
<div id="wrapper">
<div id="sticky">
sticky
</div>
</div>
<br />
<div class="extra"></div>
CSS
==============================
#sticky {
position: sticky;
background: #F762BC;
width: 100px;
height: 100px;
top: 70px;
left: 10px;
display: flex;
justify-content:center;
align-items:center;
box-shadow: 0 0 6px #000;
text-shadow: 0 0 4px #fff
}
#wrapper {
width: 75%;
margin: auto;
height: 400px;
background-color: #ccc;
}
.extra{
background: #ccc;
width: 75%;
margin: auto;
height: 100px;
}
body {
height: 1000px;
font-family: georgia;
}
h4{
text-align: center;
}
#sticky {
position: sticky;
background: #F762BC;
width: 100px;
height: 100px;
top: 70px;
left: 10px;
display: flex;
justify-content:center;
align-items:center;
box-shadow: 0 0 6px #000;
text-shadow: 0 0 4px #fff
}
#wrapper {
width: 75%;
margin: auto;
height: 400px;
background-color: #ccc;
}
.extra{
background: #ccc;
width: 75%;
margin: auto;
height: 100px;
}
body {
height: 1000px;
font-family: georgia;
}
h4{
text-align: center;
}
Sunday, 19 March 2017
Learning - Enterprise portal
View.jsp
<%@page import="com.liferay.portal.security.permission.PermissionThreadLocal"%>
<%@page import="com.liferay.portal.security.permission.PermissionChecker"%>
<%@page import="com.liferay.portal.theme.ThemeDisplay"%>
<%@include file="/html/new/init.jsp"%>
<portlet:defineObjects />
<%
PortletURL complaintBoxURL = renderResponse.createActionURL();
complaintBoxURL.setParameter(ActionRequest.ACTION_NAME, "complaintBox");
PortletURL complaintURL = renderResponse.createRenderURL();
complaintURL.setParameter("jspPage", "/html/new/complaintsView.jsp");
ThemeDisplay themedisplay = (ThemeDisplay)request.getAttribute(WebKeys.THEME_DISPLAY);
PermissionChecker permissionChecker = PermissionThreadLocal.getPermissionChecker();
permissionChecker.isOmniadmin();
%>
<div class="row-fluid">
<div class="span10">
<h5>Hi <%=themedisplay.getUser().getFirstName() %>, admin only can view your suggestion. So honestly submit your complaints.</h5>
</div>
<div class="span2">
<%if(permissionChecker.isOmniadmin()){ %>
<a href="<%=complaintURL.toString()%>"><button class="btn-warning">Complaint Box</button></a>
<%}%>
</div>
</div>
<hr>
<aui:form name="fm" method="POST" action="<%= complaintBoxURL.toString() %>">
<aui:input type="text" name="name" label="First Name" value="<%=themedisplay.getUser().getFullName() %>" inlineLabel="true" placeholder="Enter your name">
</aui:input>
<aui:input type="text" name="EmployeeId" label="Employee Id" inlineLabel="true" placeholder="Enter your Employee Id">
</aui:input>
<aui:select name="network" label="How is our office network?" inlineLabel="true">
<aui:option>Select your </aui:option>
<aui:option value="Excellent">Excellent</aui:option>
<aui:option value="Verygood">Very good</aui:option>
<aui:option value="Good">Good</aui:option>
<aui:option value="Notbad">Not bad</aui:option>
<aui:option value="waste">waste</aui:option>
</aui:select>
<aui:input type="textarea" name="pantryService" label="How is our pantry?" inlineLabel="true" placeholder="Your suggestion">
</aui:input>
<aui:input type="textarea" name="infrastructure" label="How to improve our infrastructure ?" inlineLabel="true" placeholder="Your suggestion">
</aui:input>
<aui:input type="textarea" name="manager" label="Type about your manager?" inlineLabel="true" placeholder="Please provide a brief summary of your manager">
</aui:input>
<div align="center">
<aui:button type="submit" cssClass="btn-info" value="Save"/>
<aui:button type="reset" cssClass="btn-primary" value="Reset"/>
</div>
</aui:form>
Complaints view
<%@page import="com.service.service.ComplaintBoxLocalServiceUtil"%>
<%@page import="com.service.model.ComplaintBox"%>
<%@include file="/html/library/init.jsp"%>
<%@page import="com.constants.NewConstants"%>
<h3>Complaint list</h3>
<hr>
<%
PortletURL iteratorURL = renderResponse.createRenderURL();
/* iteratorURL.setParameter("jspPage", NewConstants.page_list); */
PortletURL deleteBookURL = renderResponse.createActionURL();
deleteBookURL.setParameter(ActionRequest.ACTION_NAME,NewConstants.Delete_complaint);
/* deleteBookURL.setParameter("redirectURL", iteratorURL.toString()); */
List<ComplaintBox> cb = ComplaintBoxLocalServiceUtil.getComplaintBoxs(-1, -1);
%>
<%if(cb.isEmpty()){%>
<h3>There is no complaints. your company is going correct way.</h3>
<%}else{ %>
<%for(ComplaintBox complaint : cb){%>
<div>
<% deleteBookURL.setParameter("NId", Long.toString(complaint.getNId()));%>
<span style="font-weight: bold">User Name :</span><span class="name"><%=complaint.getName()%></span><br>
<span style="font-weight: bold">EmployeeId :</span><span class="name"><%=complaint.getEmployeeId() %></span><br>
<span style="font-weight: bold">Office Network :</span><span class="name"><%=complaint.getNetwork() %></span><br>
<span style="font-weight: bold">How is yor manager :</span><span class="name"><%=complaint.getManager()%></span><br>
<span style="font-weight: bold">How is our infrastructure :</span><span class="name"><%=complaint.getInfrastructure() %></span><br>
<span style="font-weight: bold">How is our pantry :</span><span class="name"><%=complaint.getPantryService() %></span><br>
<a href="<%= deleteBookURL.toString() %>">Delete</a>
</div>
<hr>
<%}%>
<%} %>
init
<%@taglib uri="http://java.sun.com/portlet_2_0" prefix="portlet" %>
<portlet:defineObjects />
<%@taglib uri="http://liferay.com/tld/ui" prefix="liferay-ui"%>
<%@page import="javax.portlet.PortletURL"%>
<%@page import="javax.portlet.ActionRequest"%>
<%@taglib uri="http://liferay.com/tld/aui" prefix="aui" %>
<%@page import="com.liferay.portal.kernel.util.WebKeys"%>
<%@page import="com.liferay.portal.kernel.dao.search.ResultRow"%>
controller
package com.test;
import java.io.IOException;
import javax.portlet.ActionRequest;
import javax.portlet.ActionResponse;
import javax.portlet.PortletException;
import javax.servlet.http.HttpServletRequest;
import javax.swing.Box;
import com.liferay.portal.kernel.exception.SystemException;
import com.liferay.portal.kernel.util.ParamUtil;
import com.liferay.util.bridges.mvc.MVCPortlet;
import com.service.model.ComplaintBox;
import com.service.model.EmployeeDetails;
import com.service.model.impl.ComplaintBoxImpl;
import com.service.model.impl.EmployeeDetailsImpl;
import com.service.service.ComplaintBoxLocalServiceUtil;
/**
* Portlet implementation class NewPortlet
*/
public class NewPortlet extends MVCPortlet {
private static final HttpServletRequest Request = null;
public void complaintBox(ActionRequest actionRequest,ActionResponse actionResponse)throws IOException, PortletException {
String pantryService = ParamUtil.getString(actionRequest, "pantryService");
String infrastructure = ParamUtil.getString(actionRequest, "infrastructure");
String manager = ParamUtil.getString(actionRequest, "manager");
String name = ParamUtil.getString(actionRequest, "name");
String EmployeeId = ParamUtil.getString(actionRequest, "EmployeeId");
String network = ParamUtil.getString(actionRequest, "network");
ComplaintBox Box = new ComplaintBoxImpl();
Box.setPantryService(pantryService);
Box.setInfrastructure(infrastructure);
Box.setManager(manager);
Box.setName(name);
Box.setEmployeeId(EmployeeId);
Box.setNetwork(network);
try {
ComplaintBoxLocalServiceUtil.addComplaintBox(Box);
} catch (SystemException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
Box.getManager();
Box.getNId();
Box.getPantryService();
Box.getInfrastructure();
Box.getName();
Box.getEmployeeId();
Box.getNetwork();
}
public void deleteBook(ActionRequest actionRequest,ActionResponse actionResponse)throws IOException, PortletException, SystemException {
System.out.println("##########################inside delete#####################################");
long ndId = ParamUtil.getLong(actionRequest, "NId");
try {
ComplaintBox cmp = ComplaintBoxLocalServiceUtil.fetchComplaintBox(ndId);
ComplaintBoxLocalServiceUtil.deleteComplaintBox(cmp);
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}
constants
package com.constants;
public class NewConstants{
public static final String page_list = "/html/library/complaintsView.jsp";
public static final String Delete_complaint = "deleteBook";
}
<%@page import="com.liferay.portal.security.permission.PermissionThreadLocal"%>
<%@page import="com.liferay.portal.security.permission.PermissionChecker"%>
<%@page import="com.liferay.portal.theme.ThemeDisplay"%>
<%@include file="/html/new/init.jsp"%>
<portlet:defineObjects />
<%
PortletURL complaintBoxURL = renderResponse.createActionURL();
complaintBoxURL.setParameter(ActionRequest.ACTION_NAME, "complaintBox");
PortletURL complaintURL = renderResponse.createRenderURL();
complaintURL.setParameter("jspPage", "/html/new/complaintsView.jsp");
ThemeDisplay themedisplay = (ThemeDisplay)request.getAttribute(WebKeys.THEME_DISPLAY);
PermissionChecker permissionChecker = PermissionThreadLocal.getPermissionChecker();
permissionChecker.isOmniadmin();
%>
<div class="row-fluid">
<div class="span10">
<h5>Hi <%=themedisplay.getUser().getFirstName() %>, admin only can view your suggestion. So honestly submit your complaints.</h5>
</div>
<div class="span2">
<%if(permissionChecker.isOmniadmin()){ %>
<a href="<%=complaintURL.toString()%>"><button class="btn-warning">Complaint Box</button></a>
<%}%>
</div>
</div>
<hr>
<aui:form name="fm" method="POST" action="<%= complaintBoxURL.toString() %>">
<aui:input type="text" name="name" label="First Name" value="<%=themedisplay.getUser().getFullName() %>" inlineLabel="true" placeholder="Enter your name">
</aui:input>
<aui:input type="text" name="EmployeeId" label="Employee Id" inlineLabel="true" placeholder="Enter your Employee Id">
</aui:input>
<aui:select name="network" label="How is our office network?" inlineLabel="true">
<aui:option>Select your </aui:option>
<aui:option value="Excellent">Excellent</aui:option>
<aui:option value="Verygood">Very good</aui:option>
<aui:option value="Good">Good</aui:option>
<aui:option value="Notbad">Not bad</aui:option>
<aui:option value="waste">waste</aui:option>
</aui:select>
<aui:input type="textarea" name="pantryService" label="How is our pantry?" inlineLabel="true" placeholder="Your suggestion">
</aui:input>
<aui:input type="textarea" name="infrastructure" label="How to improve our infrastructure ?" inlineLabel="true" placeholder="Your suggestion">
</aui:input>
<aui:input type="textarea" name="manager" label="Type about your manager?" inlineLabel="true" placeholder="Please provide a brief summary of your manager">
</aui:input>
<div align="center">
<aui:button type="submit" cssClass="btn-info" value="Save"/>
<aui:button type="reset" cssClass="btn-primary" value="Reset"/>
</div>
</aui:form>
Complaints view
<%@page import="com.service.service.ComplaintBoxLocalServiceUtil"%>
<%@page import="com.service.model.ComplaintBox"%>
<%@include file="/html/library/init.jsp"%>
<%@page import="com.constants.NewConstants"%>
<h3>Complaint list</h3>
<hr>
<%
PortletURL iteratorURL = renderResponse.createRenderURL();
/* iteratorURL.setParameter("jspPage", NewConstants.page_list); */
PortletURL deleteBookURL = renderResponse.createActionURL();
deleteBookURL.setParameter(ActionRequest.ACTION_NAME,NewConstants.Delete_complaint);
/* deleteBookURL.setParameter("redirectURL", iteratorURL.toString()); */
List<ComplaintBox> cb = ComplaintBoxLocalServiceUtil.getComplaintBoxs(-1, -1);
%>
<%if(cb.isEmpty()){%>
<h3>There is no complaints. your company is going correct way.</h3>
<%}else{ %>
<%for(ComplaintBox complaint : cb){%>
<div>
<% deleteBookURL.setParameter("NId", Long.toString(complaint.getNId()));%>
<span style="font-weight: bold">User Name :</span><span class="name"><%=complaint.getName()%></span><br>
<span style="font-weight: bold">EmployeeId :</span><span class="name"><%=complaint.getEmployeeId() %></span><br>
<span style="font-weight: bold">Office Network :</span><span class="name"><%=complaint.getNetwork() %></span><br>
<span style="font-weight: bold">How is yor manager :</span><span class="name"><%=complaint.getManager()%></span><br>
<span style="font-weight: bold">How is our infrastructure :</span><span class="name"><%=complaint.getInfrastructure() %></span><br>
<span style="font-weight: bold">How is our pantry :</span><span class="name"><%=complaint.getPantryService() %></span><br>
<a href="<%= deleteBookURL.toString() %>">Delete</a>
</div>
<hr>
<%}%>
<%} %>
init
<%@taglib uri="http://java.sun.com/portlet_2_0" prefix="portlet" %>
<portlet:defineObjects />
<%@taglib uri="http://liferay.com/tld/ui" prefix="liferay-ui"%>
<%@page import="javax.portlet.PortletURL"%>
<%@page import="javax.portlet.ActionRequest"%>
<%@taglib uri="http://liferay.com/tld/aui" prefix="aui" %>
<%@page import="com.liferay.portal.kernel.util.WebKeys"%>
<%@page import="com.liferay.portal.kernel.dao.search.ResultRow"%>
controller
package com.test;
import java.io.IOException;
import javax.portlet.ActionRequest;
import javax.portlet.ActionResponse;
import javax.portlet.PortletException;
import javax.servlet.http.HttpServletRequest;
import javax.swing.Box;
import com.liferay.portal.kernel.exception.SystemException;
import com.liferay.portal.kernel.util.ParamUtil;
import com.liferay.util.bridges.mvc.MVCPortlet;
import com.service.model.ComplaintBox;
import com.service.model.EmployeeDetails;
import com.service.model.impl.ComplaintBoxImpl;
import com.service.model.impl.EmployeeDetailsImpl;
import com.service.service.ComplaintBoxLocalServiceUtil;
/**
* Portlet implementation class NewPortlet
*/
public class NewPortlet extends MVCPortlet {
private static final HttpServletRequest Request = null;
public void complaintBox(ActionRequest actionRequest,ActionResponse actionResponse)throws IOException, PortletException {
String pantryService = ParamUtil.getString(actionRequest, "pantryService");
String infrastructure = ParamUtil.getString(actionRequest, "infrastructure");
String manager = ParamUtil.getString(actionRequest, "manager");
String name = ParamUtil.getString(actionRequest, "name");
String EmployeeId = ParamUtil.getString(actionRequest, "EmployeeId");
String network = ParamUtil.getString(actionRequest, "network");
ComplaintBox Box = new ComplaintBoxImpl();
Box.setPantryService(pantryService);
Box.setInfrastructure(infrastructure);
Box.setManager(manager);
Box.setName(name);
Box.setEmployeeId(EmployeeId);
Box.setNetwork(network);
try {
ComplaintBoxLocalServiceUtil.addComplaintBox(Box);
} catch (SystemException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
Box.getManager();
Box.getNId();
Box.getPantryService();
Box.getInfrastructure();
Box.getName();
Box.getEmployeeId();
Box.getNetwork();
}
public void deleteBook(ActionRequest actionRequest,ActionResponse actionResponse)throws IOException, PortletException, SystemException {
System.out.println("##########################inside delete#####################################");
long ndId = ParamUtil.getLong(actionRequest, "NId");
try {
ComplaintBox cmp = ComplaintBoxLocalServiceUtil.fetchComplaintBox(ndId);
ComplaintBoxLocalServiceUtil.deleteComplaintBox(cmp);
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}
constants
package com.constants;
public class NewConstants{
public static final String page_list = "/html/library/complaintsView.jsp";
public static final String Delete_complaint = "deleteBook";
}
Subscribe to:
Posts (Atom)