English 中文(简体)
标签制度的差异 表格和单元 表格
原标题:Difference between ValidatorForm and DynaValidatorForm
  • 时间:2010-12-08 23:05:41
  •  标签:
  • struts

ValidatorForm与DynaValidatorForm有何区别?

最佳回答

ValidatorForm与DynaValidatorForm有何区别?

The answer to this is in fact the difference between ActionForm and DynaActionForm.

在Stuts,人人都知道ActionForm阶级(因此,我不说哪里话)。 但并非每个人都知道(或理解——我包括)

DynaActionForms的思想是,你不为每种超文本形式设立表格,而是混为一谈(在休战卷中申报其财产、类型和违约)。 所谓“妇科”,你知道......,但被证明是一些人所理解或使用的,并造成一些重大不利之处:

  • they act sort of like a Map so it has the same problems of maps, like retrieving data from it, you know, as an Object which you then have to cast. So you have casts everywhere;
  • compiler no longer notifies you when you screw something up like a name of a property for example, so compile errors turn into runtime errors;
  • the things are not really dynamic since you still have to restart the server after you "reconfigured" the properties in the struts-config.xml file (or else modifications won t be picked up);
  • code completion does not work on DynaActionForms, type safety sucks (we are not taking generics here) and there are other nuisances that I can t remember right now.

......好是,从Stuts的角度来看,你有两种主要形式处理: ActionForm and DynaActionForm (even if the DynaActionForm is in fact a subclass of ActionForm).

但是,你还有validator plugin,其中你将鉴定规则放在外部档案中,并用你的行动形式予以采纳。 您利用“行动儿童论坛:瓦莱德人论坛”来ook起有效器。 而且,由于你有两种形式,你还必须看看看医生的假肢:进入DynaValidatorForm。

最后,ValidatorForm和DynaValidatorForm都是相同的,但适用于不同的“东北部”。

问题回答

暂无回答




相关问题
Struts 1.2.9 Action Chaining

I m having trouble calling a method in one Struts action from a method in another Struts Action (I ve been told that this is possible). I m working with two Struts DynaValidatorForms - one is used to ...

Java Struts Report

I am writing an excel report using an action,controller, servlet struts framework. The report is very congested and has already around 10 separate queries. I need to add about 10 more queries due to a ...

Struts Tiles 1 - nested tiles issue

I am using Struts tiles 1 succesfully, however I have come across a problem when trying to nest tiles. I currently have a layout like so: I wish to have another template like this, for use in quite ...

array as hidden variable

can array be used as hidden variable on jsp.....like I have a form i.e a simple java class,I want it to be as hidden variable can I do it.. Thanks in advance

GZIP JSON AJAX response text is empty

I am facing a problem, while encoding the response that I send back for an AJAX request, using GZIP. Can anyone give me some pointers on this please? There is an AJAX request from the JSP, An action ...

How to prevent JPA from rolling back transaction?

Methods invoked: 1. Struts Action 2. Service class method (annotated by @Transactional) 3. Xfire webservice call Everything including struts (DelegatingActionProxy) and transactions is configured ...

热门标签