Struts in Formbean's use (tip skill)

xiaoxiao2021-03-06  96

Use of FORMBEAN ?????

1. The FORMBEAN is configured in Struts-Config.xml as follows:

TYPE = "org.apache.struts.Webapp.Exercise.Userform" />

2. Dynamic FORMBEAN, dynamic FORMBEAN does not have to write userform.java

Just configure it in struts-config.xml:

It can be seen that the dynamic FORMBEAN is simpler, which is simpler, it does not have to write a set get method but must have

Type = "org.apache.struts.action.dynaactionform

Dynamic FORMBEAN usage:

Dynaactionform Dyform = (DynaActionform) Form;

String name = DYFORM.GET ("Name");

DYFORM.SET ("Name", XIEL);

转载请注明原文地址:https://www.9cbs.com/read-124987.html

New Post(0)