GeeCON Prague 2014*
The moose likes Struts and the fly likes get the sysmonth and year  in drop down box. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Frameworks » Struts
Bookmark "get the sysmonth and year  in drop down box." Watch "get the sysmonth and year  in drop down box." New topic
Author

get the sysmonth and year in drop down box.

pankaj semwal
Ranch Hand

Joined: Oct 07, 2008
Posts: 301
Hi,

How to get the default value of system month and year in drop down box.

as i did like this.

In Jsp page:



In action:


monthList = commontuil.getAllMonth();
yearList = commontuil.geAllYear() ();









Pleas help me how to do this.
Sagar Rohankar
Ranch Hand

Joined: Feb 19, 2008
Posts: 2902
    
    1

You hadn't mention your "problem", whats not working for you as expected, its better to explain your "problem" and not just by giving code to find out error, that's saves readers time.


[LEARNING bLOG] | [Freelance Web Designer] | [and "Rohan" is part of my surname]
pankaj semwal
Ranch Hand

Joined: Oct 07, 2008
Posts: 301
as i already tell my probelm.
How to get the default value of system month and year in drop down box.


Thanks .
Bindu Madhavi Kunda
Greenhorn

Joined: Apr 02, 2009
Posts: 2
You can set a default value by assigning the value to actionform object in your action where this particular jsp is loading.
For example:




David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

What do you mean, "default"? Do you mean the current month/year?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: get the sysmonth and year in drop down box.