File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes set value in text box Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "set value in text box" Watch "set value in text box" New topic
Author

set value in text box

Kaustubh G Sharma
Ranch Hand

Joined: May 13, 2010
Posts: 1277

I am using html tags where in one text box i have to set the current date as a value if i search on it by default...

Date Picker code............






text box code..........



No Kaustubh No Fun, Know Kaustubh Know Fun..
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

What's the actual question?

In any case, why not just handle that via Struts and set the default value on the server side?
Kaustubh G Sharma
Ranch Hand

Joined: May 13, 2010
Posts: 1277

Actually I solved the problem david i just want to set current date in text box when I select no date from date picker and search well finally I did it by setting value in textbox property when it has no value...let me know if you have any other idea for it..
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61413
    
  67

Please be sure to ask Struts questions in the Struts forum. I have moved this post there for you.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

I *did* have another idea for it, which I told you: pre-populate on the server side.
Kaustubh G Sharma
Ranch Hand

Joined: May 13, 2010
Posts: 1277

No idea how to do it??
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

http://faq.javaranch.com/java/SelectDefaultValue

There's a couple hints in that part of the JavaRanch Struts 1 FAQ.
Kaustubh G Sharma
Ranch Hand

Joined: May 13, 2010
Posts: 1277

Thanks David
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: set value in text box