Tarun Bolla

Ranch Hand
+ Follow
since Jun 20, 2011
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
7
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 Tarun Bolla

Creating a reusable method to get a Text Field control (Component) created is good. But you cannot uniquely identify the Text Field until you have a reference variable for it.In the above code, field is a reference variable and you hardcode that reference variable in your code to get the value of that field.If you are creating a reusable method for returning Text Fields on the fly, you should also consider making the references of the newly created text fields available when needed. Consider the below code (Ignore my comment about List, lets take a Map. Maps are the data structures which will hold key value pairs).

Now, you have a place to refer to if you need value of the Text Field (The map). This is one way to do it.
Otherwise you can always hardcode the references in your code and create JTextField_1, JTextField_2, JTextField_3 at global level (Class level) which is absolutely fine and has no drawbacks.
4 years ago
Yep... How I missed that... :)
The problem here is OP is hardcoding "selected" to the first option every time.. Instead it should be programatically determined to which option he had to set the attribute. Nothing to do with browser isnt it?
4 years ago
JSP
Hi there.. you dont have a reference to the text field control.. I think you can not get its value like that. Instead, when you get the Text Field control from your reusable method, add it to a java.util.List and then display it on UI simultaneously. You can access the text field from the List at any time to get its value.
4 years ago
Hey Bob...Welcome to the Ranch...
In HTML you make an option selected in a select box by using the keyword "selected".

The above code will select "Monthly" option by default in UI. You have to modify your code such that you identify the selected value at server side and add the "selected" attribute for the appropriate option
4 years ago
JSP
Oh! yeah...standards.... Even though its the same thing the parameterizable tag does... standards....
Thanks....
6 years ago
JSP

Bear Bibeault wrote: Sorry, but that makes me gag

No offence... :)

Bear Bibeault wrote: Just partition the files correctly and avoid all unnecessary complexity and goop!


So instead of using "jstl when" to differentiate the grouped report things in same jsp, you say that we should create a jsp for manager report and a jsp for client report and again include the required jsp by inturn using "jstl when" in the main jsp??? ..... Isnt this the goop...
6 years ago
JSP
Try this

right after
6 years ago
I think you can do that by passing parameter to the target page and writing when conditions based on the parameters for the display

Now in your jsp page you can check the parameter using jstl when tag and display whatever you want and hide(do not display) whatever you dont want...thus filtering content at server side
6 years ago
JSP
What i understood -
You want to submit your form to a servlet and then display a JSP
You can do that, You need to do servlet mapping in web.xml as usual and in the servlet after your business logic is dealt with use the view as jsp. Heres how...

Read more about MVC pattern
6 years ago
JSP
try \d\w+ instead of \d\w
The \w only matches single word character
6 years ago

Michael Dunn wrote: is there a reason ctrl-alt-V + [enter], instead of ctrl-V, is a problem?


I am trying to develop a set of nifty tools in which screen capture is one. I cant tell people who use it to do "paste special" instead of "paste".
6 years ago

Darryl Burke wrote:Then try painting the captured Image to different BufferedImage types before setting it on the clipboard


No luck with that Darryl Burke. I tried all types of BufferedImage. But somewhere in the internet i read that windows supports images of format DIB, BITMAP on the clipboard. Unfortunately java will not support either. So i think i must read the specification of DIB or BITMAP and generate it. Ok, i can do that, but which Class Object should i create for that purpose? How do i send it to clipboard? What do you think? And i dont want to use JAI
6 years ago
Yes you can use servlets to handle such things. Just upload the content using HTTP POST by using URLConnection
Go through this http://docs.oracle.com/javase/tutorial/networking/urls/readingWriting.html
An on the server side, write a Servlet to handle the data
6 years ago
Yeah Darryl Burke, After pasting the image to paint, If i re-copy it from paint and paste it to MSWord, the image remains sharp. The problem is only with direct pasting into MSWord, Outlook etc.,
Edit: I think apart from the normal image data in clipboard, we should maintain some extra metadata in clipboard, which i have no idea on how to start
6 years ago
Yes Michael, you are right! Thank you!
So do we have any specifications on how the image data in clipboard should be before pasting in word??
6 years ago