Okay, here's another question for you and hopefully I'll get it clear.
I have mainpage.jsp which includes include/config.jsp. In config.jsp I have line:
<s:select label="Data Source" id="cbo_school" name="cbo_school"
headerValue="--- Please Select ---" headerKey="0"
list="dataSource"
onchange="toggleDisplayStateByValue('cbo_school','ipentry', \"1\")" />
The list dataSource is defined in ConfigAction.java:
@Action(value="/config")
public String setDataSource(){
Properties dataConfig = new Properties();
String returnStatus = "success";
try {
dataConfig.load(this.getClass().getResourceAsStream("properties/dataSource.properties"));
dataConfig.size();
for(String key : dataConfig.stringPropertyNames())
{
String value = dataConfig.getProperty(key);
this.dataSource.put(key, value);
}
} catch(IOException ioEx){
System.out.println(ioEx.getMessage());
returnStatus = "error";
}
return returnStatus;
}
public HashMap getDataSource()
{
return dataSource;
}
The project setup is:
src/org.esf.adapters.serco.ui.ConfigAction
WebContent/jsp/mainpage.jsp
WebContent/jsp/include/config.jsp
As you can see from these code samples I am attempting to do all of this using annotations and not XML.
If anyone can point me in the right direction with this that would be great and very helpful.
Many thanks
Nathan