amrit choong

Greenhorn
+ Follow
since Dec 18, 2004
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
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by amrit choong

Hi Friends,
I've this simple jsp,in which I take in query(from jsp1),pass it to java class and get the table.I sort the tables depending upon the table header clicked(index) and sort status given.
The problem is I want to send a "cnt" variable from jsp too,but when i do this ,it displays results correctly for the first time,and thereafter i am not able to sort or do anything.Is this a session problem,I have commented the code that's not working.Any help would be appreciated.



But,on the other hand if i hardcode this variable in the java class,everything starts working fine.Any clues???
19 years ago
JSP
Thats why sometimes I think wat wud happen for ppl like me...if there was no javaranch....and no Edward's and Mark's..thanks guys
19 years ago
Thanks edward and mark,
But It's throwing the same error for both the methods.I am printing just for test purpose,so thats not an issue.Help me with this:
19 years ago
Thanks Edward,
But when i do this,
String eType = array[i][j].getClass().getName();

It throws error:
array required, but java.lang.Object found.

please help.
19 years ago
Hi Friends,
I have a Object[][] array of (Integers,Strings,Double,Long etc).I just need to find out the class of each element type.I am trying something like this,which I am sure is wrong:

for(int i=0;i<noofrows;i++){
for(int j=0;j<noofcolumns;j++){
Class eType = array[i][j].getClass().getComponentType();
System.out.println("Type of Object["+i+"]["+j+"] :" + eType);
}
}
Can anyone please tell me where I am going wrong.Thanking you in advance.
19 years ago
Hi ,
I've this code,from which i pass in "index" and "sort" to my java class,sort the appropriate column and display the results.The problem is
it follows a strict order(asc/desc/asc/desc/asc).....for all the columns.But I need to change it as(asc/desc/asc/desc) for each column.
It means initially if I click any column,it should sort it in ascending order and it should not affect any other colums sorting order(asc or desc).I think you get my point.Please tell me what changes are required.
19 years ago
JSP
Hi,
Thanks a lot for your help.I went thru the code at www.fdsapi.com,and instead of using that api,I'm trying to make it go my way.Can anyone please help me explain how these two comparators(used to sort a Object[][]) work:



I want to make two changes in this comparators:
I want the sorting to be done in CASE_INSENSITIVE_ORDER(eg AaBb.....Zz and not AB...Zab...z),and Secondly I want to sort the numbers(like Integers)as Numbers,while its presently being done taking numbers as strings,which I dont want.
please help me..waitin for ur replies friends.
19 years ago
Thanks to both of u,
I have gone exactly tht way and received the exact results.
cheers
19 years ago
JSP
Thanks ben,
I want to sort a table depending upon the column header values.So I display a table,and the user clicks on anyone header,I want to pass the column header parameter to my java file,so that I can sort the appropriate column.The only problem I am facing is I am not able to pass the parameter from JSP to my java method.Can u tell me how to do that.Got my question??
19 years ago
JSP
Hi Friends,
I am using a JSP and Java Class(no servlets).I have a table,with column headers as hyperlinks.I want that when the header(or link)is clicked a parameter should pass to a method in the java class,and it should send back the results accordingly.

Can anyone help me plz.
19 years ago
JSP
Thanks damanjit and Tim,
I am trying to do exactly wat Tim has stated.I am trying to get the same thing working.Let me try those tools and get back to u asap.
Thanks for the help.
19 years ago
I think this link is pretty good to start with:
www.javaregex.com/RegexRecipesV1.pdf
19 years ago
Hi Friends,
I've a table with the following fields and infinite rows of the type given below:
Rollno FirstName LastName
----------------------------------------------
int string string

I am not using JTable,I am creating a HTML table from the resultset.
I want that when i click on any of the headers(eg rollno,firstname,lastname) all the other rows should be sorted.
Can someone tell me how to do that or refer me some examples?
I want the exact results as shown in the examples below,but the problem is that they are in swing,and i can't use swing
and neither do i understand much of it.
http://java.sun.com/docs/books/tutorialJWS/uiswing/components/example-1dot4/TableSorterDemo.jnlp
http://java.sun.com/docs/books/tutorial/uiswing/components/example-1dot4/TableSorter.java

Any help wud be appreciated,thank you
amrit
19 years ago
PERFECT man..no confusions at all.Thanks for your effort and time and making my life a bit easier.merry christmas.....and happy new year,bye.
19 years ago