struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "sam thothi" <samtho...@gmail.com>
Subject Re: reading drop down through properties file
Date Tue, 16 Sep 2008 19:06:32 GMT
Dave,

   my question is i have month.properties file, where i have declared

months = "january,february, march.."
january = "monday,tuesday , wednesday"

in the first drop down i want to load months, and after selecting for
example january then i want to load monday , tuesday and wednesday.
I want to read the two dropdowns through JSTL.

I was trying to do this with this code.this is to load the first drop down.
i couldn't get it ,and that's the reason i was asking for the sample code.

Please let me know you got it.

*

private* Properties _appConfig;

*private* *static* *final* String *APP_CONFIG_NAME* = "months.properties";
*

if* (_appConfig == *null*) {

_appConfig = new Properties();

*try* {

 _appConfig.load(FileUtil.getFileAsStream(APP_CONFIG_NAME));

} *catch* (Exception e) {

*throw* *new* RuntimeException("can not find "

+ *APP_CONFIG_NAME*, e);

}

}
Thanks in advance for your help.

sam

On Tue, Sep 16, 2008 at 1:51 PM, Dave Newton <newton.dave@yahoo.com> wrote:

> --- On Tue, 9/16/08, sam thothi wrote:
> > Do any one has a sample code to do similar thing.
>
> public class TheAction extends ActionSupport {
>    private String[] options;
>    public String[] getOptions() { return options; }
>    public String execute() {
>        String[] options = StringUtils.split(getText("options"), ",");
>        return SUCCESS;
>    }
> }
>
> I'm a little confused why sample code would be needed for this; perhaps I
> did not understand your initial question correctly.
>
> Dave
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message