the problem is action file can get data from jsp file,but jsp file can not get
data from action file,which means,after do some execution in action file, jsp
display blank,while, it should display some data.
Thanks.
public abstract class BaseActionS2 extends ActionSupport implements
SessionAware {
protected static Logger logger = null;
protected Map session;
protected int licenseeID;
protected UsersVO sessionUser=new UsersVO();
public BaseActionS2(Class cls){
logger = Logger.getLogger(BaseActionS2.class.getName());
}
public BaseActionS2() {
logger = Logger.getLogger(BaseActionS2.class.getName());
// logger = Logger.getLogger(this.getClass().getName());
}
public void setSession(Map session) {
this.session = session;
}
public void setLicenseeID(int licenseeid){
this.licenseeID=licenseeid;
}
public String execute() throws DefaultException{
return SUCCESS;
}
}
--- 09年4月1日,周三, Musachy Barroso <[email protected]> 写道:
> 发件人: Musachy Barroso <[email protected]>
> 主题: Re: jsp page not display data when using ModelDriven---class can get
> parameter from jsp file
> 收件人: "Struts Users Mailing List" <[email protected]>
> 日期: 2009年4月1日,周三,上午2:19
> The answer is 42. If you explain what
> the problem is, the answer might vary.
>
> musachy
>
> 2009/3/31 Junhua gao <[email protected]>:
> >
> > public class SortTiersAction extends
> BaseActionS2 implements ModelDriven {
> > SortTierService
> sorttierservice = new SortTierService();
> > private SortTierVO
> sorttiervo = new SortTierVO();
> > public void
> setModel(SortTierVO sorttiervo) {
> >
> this.sorttiervo = sorttiervo;
> > }
> > public Object
> getModel() {
> > return
> this.sorttiervo;
> > }
> > public String execute() throws
> DefaultException {
> >
> > //do someting here;
> >
> > }
> >
> >
> > in struts.xml file
> >
> > <action name="SortTierQueryAction"
> class="com.qic.system.action.SortTiersAction">
> > <result
> name="success">/test.jsp</result>
> > </action>
> >
> >
> >
> > jsp file
> >
> > <s:form id="sorttierform"
> action="SortTiersAction">
> > <select name="sorttierID" id="sorttierSelectID"
> size="12"/ width="135"><br>
> > <s:textfield name="sorttierName"
> id="sorttierName" label="Name:"/><br>
> >
> > <s:textfield name="sorttierRate" id="sorttierRate"
> label="Rate:"/><br>
> > <s:textfield name="sorttierRatecase"
> id="sorttierRatecase" label="Rate Case:"/>
> > <s:checkbox name="sorttierActive"
> id="sorttierActive" label="Active?"/>
> > <s:submit value="Save"/>
> > </s:form>
> >
> >
> >
> >
> ___________________________________________________________
> >
> 好玩贺卡等你发,邮箱贺卡全新上线!
> > http://card.mail.cn.yahoo.com/
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [email protected]
> > For additional commands, e-mail: [email protected]
> >
> >
>
>
>
> --
> "Hey you! Would you help me to carry the stone?" Pink
> Floyd
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>
___________________________________________________________
好玩贺卡等你发,邮箱贺卡全新上线!
http://card.mail.cn.yahoo.com/
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]