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 ?
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.
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.
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.
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.
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.
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
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