niks singh

Greenhorn
+ Follow
since Dec 25, 2011
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
1
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by niks singh

HI,
I have a requirement where I need to display the world map and while moving the mouse cursor over the world map should display the country as a tooltip or a light box pop up?
How to achieve this? Please do the needful.
hello

I have a doubt regarding writing a file to a shared folder.

does it mean that you have to copy that file in a shared folder or does it mean that there is already an xml file in the shared folder and i need to write dat file.
Hello


I am writing the data in excel sheet using poi jar file.

I bring the data from database.

My problem is I am not able to apply rowspan and colspan in excel as we do in table format.


My excel sheet should have the data in format shown below

My first heading is date which is to be rowspaned to 2 where the 1st row will have heading as OUTGOING and 2nd row will have INCOMING.

second heading outgoing should have colspan of 7 which includes 7 columns from n07 to total.

similarly incoming should also have colspan of 7 which includes another 7 columns from n07 to total. as shown below.

how do i bring it to this format

please help.



DATE OUTGOING INCOMING
N07 N08 N09 N10 R41 R42 Total N07 N08 N09 N10 R41 R42 Total
2012-01-01 2 0 0 0 0 0 2 1 0 0 0 0 0 1
2012-01-02 0 0 0 0 0 0 0 1 0 0 0 0 0 1
2012-01-03 1 0 0 0 0 0 1 1 0 0 0 0 0 1
2012-01-04 0 0 0 0 0 0 0 0 1 0 0 0 0 1
2012-01-05 0 0 0 0 0 0 0 0 1 0 0 0 0 1
GRAND TOTAL 3 0 0 0 0 0 3 3 2 0 0 0 0 5

Could you please explain the solution in more detail, i dint get the solution clearly
i am not using servlet

i am using struts



Hello,

my jsp data is in tabular format.

I want that on click of a button the jsp data should be displayed in pdf format.
Hello,

my jsp data is in tabular format.

I want that on click of a button the jsp data should be displayed in pdf format.

So how do i do it?

12 years ago
JSP
how do i convert a jsp file into a pdf format?

My jsp file displays the data but I need to display the data in a pdf format so how do i do it?
hwo to convert a jsp file into an excel file
following is my java script code where i check for the icon by its id which is generated while i display it and after cheking i write the code to display the window.

but i have to chek it by hard coded path...which will make the code too lengthy if there are more icons added to my database.


is der some oder way to check and display accordingly



<SCRIPT type=text/javascript>




$(document).ready(function() {



//for parent menus
<%
int a=0;
while(a<size){
a++;
%>
$("#imageId<%=a%>").click(function(){
//alert("hello");

if($(this).attr("src")=="images/searchlnk.png" ){

$("#search").slideToggle("slow"); //window with id search will toggle
}

if($(this).attr("src")=="images/mnagelnk.png" ){

$(".managedivhid").slideToggle("slow"); //window with class managedivhid will toggle
}



if($(this).attr("src")=="images/reportlnk.png" ){

$("#rep").slideToggle("slow"); //window with id rep will toggle
}


});

<%}%>

//for child images
<%
int b=0;
while(b<size){
b++;
%>
$("#img<%=b%>").click(function(){
//alert("hiii");
if($(this).attr("src")=="images/custolnk.png" ){
$("#custo").slideToggle("slow"); //window with id custo will toggle

}

if($(this).attr("src")=="images/contink.png" ){
$("#content").slideToggle("slow"); //window with id content will toggle
}


if($(this).attr("src")=="images/branchlnk.png" ){
$("#branch").slideToggle("slow"); //window with id branch will toggle
}


});

<%}%>


I can succesfully display the icons based o the role id.

after dat wen i clik on any icon all the windows of all the icons get displayed at once.

and i want only particular window to be displayed on clik of a particular icon

parent_id column actully stores the menu_id which specifies the parent child relation.

that is if any menu has the corresponding parent_id as 2 that means it is a child of the menu with menu_id 2.

my sql query is working fine

it gives me the list of the all the menus assigned for a particular roleid

and using that list i have to display the icons accordingly which I am already doing.

till here everything is working fine.

but after displaying the icons if a user clicks on any particular icon, a particular window is to be displayed(I am getting stuck here).

there are different windows for different icons and each window has its separate id.

so how do i do this in javascript or any other way.





Ok il try to explain it in more detail.

I am suppose to display some icons/images whom i refer as menu here whose path i have stored in my database.

I have 3 tables in my database.

first table is the menu table. this stores my,menu_id(primary key),menu names, parent_id and the icon path.

second table is the role table which stores role_id(primary key) and the role names.

third table is menu_role_mapping table which has map_id(primary key), menu_id(foreign key) referencing the menu table and role_id( foreign key) referencing the role table.

I ask the user to enter his role_id and accordingly i have to display the icons(whichever icons/images is assigned to that particular role_id in mapping table).

also I have to take care of the child images if any.

so please help me with the logic part to succesfully display the parent and child images based on the roleid from the database.

Hope I am able to convey the problem clearly.

Hii

I successfully display the parent and child images from database based on the role id but it doesn work for every role id. I am stuck here like i do not know how do I check for every roleid which are the images permitted to him. my logic somehow doesnt work here. kindly suggest what logic do i use here. I am also using javascript in which i write the code to display a particular window on clicking of a particular image. please help