Nikhil Padharia

Ranch Hand
+ Follow
since Apr 19, 2012
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Nikhil Padharia

You will need to store the value of the select-box shown in a globally declared javascript variable.
And using that id retrieve the value of combo value selected using

Hope this helps.
Hi Varshini,

I think Tim helped you in your previous post and you were able create subtable using <h:datatable>, then why did you want to move to html table?
And in turn when the page renders it generates html code, So you must be able to do same things with <h:datatable>
12 years ago
JSF
use <h:dataTable> which will help you to create a table and it binds with the collection<objects>

And what do you want to save. I guess the table would be coming with the prepopulated data.
Do you want to make edit kinda functionality?
12 years ago
JSF
<tr> is representing a row of the particular table.. Here if you want to have data inside the row you must enclose it with <td> or <th> if it is your header.
You have <table> inside the <tr> but no <td> or <th>, so it complains
Use contains method of the collection interface to check whether the value is present in old list, while iterating through new list.
Here, If you have User defined objects in collection then you need to override equals method of the object.
12 years ago
Try using this code, I am not sure if it will work in all scenarios, as I too found it from some forum ;)


Welcome to JavaRanch Prasanna!!

Why dont you use i to generate question number?

You can clear the canvas before refilling it with

@Palak - Question Initiator is never coming back (Observed from the previous posts ;)

HI Anitha,
You shoud interact with the people here to get better answers to your question.. Or if you have solved the problem then post the answer so that it would help other users to refer your post..

The problem you are facing seems like you are using javasript default sort method in a wrong way..
sort method is called with reference to the array..
syntax of sort method is

Here sortfunction is optional. It can be a function that defines the sort order.
for eg.
All this tests you are performing using the same submit button click?
and what does document.forms[1].action gives you?

Ayan Biswas wrote:No,none of them is null


Are you sure?
If that is not the case then I don't think there is any reason you get this error.
What values you get for document and document.forms[1]?
Try debugging what value of document or document.forms[1] you are getting.
Probably one of them is null, which is creating the problem.
Why do you set label value explicitly by calling a script?
The script you have encoded would not get called after refreshing by an ajax call.
I would suggest you write as below as it doesn't make any difference and serves your functionality

12 years ago
JSP
Do you have two forms on your JSP?
If no then you will need to use

instead of