sahana mithra

Ranch Hand
+ Follow
since Oct 26, 2010
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by sahana mithra

This is my table where I want to add check boxes dynamically.

I get data using dwr. I want to add checkbox dynamically in the above row. If the data has 3 values, then Three check boxes along with that value must be generated.
For example if it has Red, Brown, Orange

The line inside for loop doesn't work. Any help for this ?
Hi all,

I have two dropdowns say State and District. In first page, I select a state based on which District will be loaded. Now I select State as TamilNadu and District Chennai. Upon clicking it takes to second page as well as it stores it in DB. Now second page is for edit. I click an edit button. It takes me back to first page. Now I want to load all the values of State and i want TamilNadu as a highlighted one. similarly for District, all other values must be loaded and Chennai must be highlighted.

I load values using the following call

With the above code, i just get the entire list of state and district. But I also want to highlight the option I already have in database for which I again make a dwr call passing the id generated while adding the selected options in DB. I am able to fetch the selected option. But I just get struck up as I want to make that option as the first one which doing Edit operation.

can someone help me out

Hi ,

I tried to use flexigrid for jsp page to display static contents. But I don't find any changes. As I am new to both flexigrid and json, I am finding it tough to come up with an example. I am sharing my code here. Could any of you help me with a simple example in populating data using json in a flexi grid for a jsp page.

JSP page:

I know it is a little stupid. But then please help me to learn.

I tried to do Captcha. I call a JSP which generates an image, into another jsp. My problem is I am able to copy that captcha. To avoid this, I have to convert this jsp part to an image. Can anyone help me to solve this issue. Here is my code which I have tried.

Also Please let me know if there are any efficient methods to create captcha other than this.

Thanks in advance.
8 years ago
Hi all,
I have a dropdown list box where i display timezone with GMT hours. I have a jquery data grid below it where I display the selected value.

In my jsp page

In jquery to display in grid I use

Now my problem is, the drop down should display values like (GMT+5.30...) and this name should be displayed in data grid too. But upon adding this, id should be sent to java class.

As i give id as value, I see only id in data grid
Can any of you help me doing this?

9 years ago
hi all,
I tried printing timezones using the getAvailableids.
I found that it prints duplicates.

how to avoid this??
i also got something lik Etc/GMT
can any of you tell what tat Etc is?
9 years ago
I tried the following program in which after running it once, I updated the text file. But its not getting updated in the swing panel table. Can any of you help me?
Here is the code

Thanks in advance
9 years ago
Hi all
I keep getting cannot find symbol for the imports, layouts, events in NetBeants IDE.

can anyone help me ?
I would like to know if multiple threads try to access a single txt file, how to restrict it? If thread A tries to access the file till it completes the reading and writing part, other threads must wait. Here is what I tried.

Thanks in advance
The following code reads a csv file and displays that as table. I would like to add 3 buttons say Start, stop and insert. On clicking Start the table should be generated. On clicking reset, the table should be cleared.

In the above code, where should I add buttons and how should I change the code to implement what I intend to do.
Any help would be greatly appreciated.
9 years ago
I want to read the values of csv file and display that in AWT table when start button is pressed. Pressing stop button should stop reading the values. Reset button must be used to clear the table. I am new to AWT. Here is what i have tried.

What I get is not in the form of table. After clicking start button I get blank window. But I want to display the data. Thank you
9 years ago
Hi all,
I am new to the concept of singleton. I have a text file and whenever i update this file, producer should be notified and many consumers say 5 threads try to access this. Only one thread should be able to read this file and that should write to the another text file. When second thread tries to access the same file at the same time, it should be said that thread 1 is accessing.

Please help me on how to approach this kind of scenario.
It would be easy for me to understand if some one can code it.
Thanks in advance
Hi Jai,
Thank you so much for the solution.
9 years ago
Dear all,
My system reboot time which is like 20111205105400.375199+330 must be formatted like 05/12/2011 10:54:00 AM IST.
Here is what i have tried

Please help me to overcome this.
Thank you all.
9 years ago
Hi all,
I am unable to access the values of checkboxes i select.
Here is my code which i tried.

I get only one value in my alert though I select more than one value.
For example if i select red, blue, green, After I select each, I get only one in my alert.
Please help me . Thanks in advance.