Form action class contains behavior for form actions.
表单操作类包含表单操作的行为。
The action class receives control from the input page.
这个操作类接管输入页面的控制权。
Extend the Struts action class to handle the HTTP request.
扩展Struts动作类以处理HTTP请求。
Registering the new action class with the Struts configuration
使用Struts配置注册新的action类
The domain model is populated appropriately inside the action class.
操作类中的域模型将被适当填充。
Listing 5. struts-config.xml snippet showing action class path mapping.
清单5 .struts - config . xml代码片段显示了动作类路径映射。
This object is passed back to the action class from where it was called.
这个对象从它被调用的地方传回到action类。
When a Struts action takes place, its action class passes data to the property broker.
当一个Struts行为发生以后,它的行为类就会将数据传递给这个属性代理。
The new action class that you created needs to be registered with the Struts configuration.
您创建的新action类需要注册到Struts配置。
You've now created an action class that is the entry point when a property change has occurred.
现在,您已经创建了发生属性更改时作为入口点的操作类。
Your new action class USES a resolver class that processes the request and builds the Atom feed.
新的action类使用一个resolver类处理请求并构建Atom提要。
In Figure 2, the action class sets the values of two variables using getter and setter methods.
图2中,action类使用getter和setter方法设置两个变量的值。
Our abstract action class will need to change to get the User object that WebSphere Portal maintains.
我们的抽象操作类需要改成获取WebSpherePortal维护的User对象。
The abstract action class extends org.apache.struts.action.Action and implements the execute method.
抽象操作类继承了org.apache.struts.action.Action并实现了execute 方法。
The mapping primarily consists of the URI called by client and the action class which does the processing.
映射主要包括客户端调用的URI和进行处理的动作类。
Intelligent naming of HTML input fields updated by users negates writing complex code in the action class.
用户更新的HTML输入字段的智能命名消除了操作类中的复杂编码。
We need to add an attribute type ClientPortfolioDetailsBean in the action class, along with its get method.
需要在操作类中添加属性类型ClientPortfolioDetailsBean及其get方法。
The action class is responsible to generate the output as XML using the XMLBindingService available in the superclass.
动作类负责使用超类中的XMLBindingService以XML形式生成输出。
You can use Dependency Injection (JSR-330) in action classes to inject a session object into a field of the action class.
你可以在Action类中使用依赖注入(JSR- 330)将会话对象注入到Action类中的属性上。
A Struts action is an instance of an action class subclass that implements a portion of a Web application and returns a forward.
Struts操作是Action类子类的实例,用来实现一部分Web应用程序并返回一个转发。
Inside the get method, a bean should be returned from the session if its instance is not set in the current action class instance.
在get方法中,如果某个bean的实例没有在当前操作类实例中设置,那么应该从会话返回那个bean。
Once the data is stored in the action class objects, Struts 2 puts that data onto the ValueStack in the form of the action object.
一旦数据存储在action类对象中,Struts2就以action对象的形式将数据放在ValueStack中。
This folder contains a jar file containing your new action class, and plugin.xml, which contains information about your plug-in (Figure 11).
此文件夹中包含一个jar文件(新操作类位于其中)和plugin.xml(其中包含有关插件的信息),如图11 中所示。
Now that you have an entry point into your logic with the new action class you created, you can begin to develop the code that does the work.
创建了新的操作类之后,就拥有了逻辑执行切入点,那么下面开始开发执行操作的代码。
Instead of creating a controller or action class, you create a page, place components on it, and define how each component reacts to user input.
与构建控制器或动作类相反,您创建的是一个页面,在这个页面上放置组件,然后定义每个组件如何响应用户输入。
In Struts 2, the HTML input field names could be generated as OGNL expressions, which in turn helps eliminate complex coding in the action class.
在Struts2中,HTML输入字段名称可以生成为ognl表达式,后者有助于消除操作类中的复杂编码。
The purpose of the AuthServlet class, as its name suggests, is to ensure that the user is authenticated before the request is redirected to the action class.
顾名思义,authservlet类的目的是在将请求重定向到action类之前确保用户通过身份验证。
The next input screen is for defining your action class, which package it is in, and all the other elements to create an action with input and output parameters.
下一个输入屏幕用于定义操作类、该类所在的包,以及用于创建带有输入和输出参数的操作的所有其他元素。
This allows avoidance of complex coding in the action class (as shown in the Struts 1 example) for converting the form bean in to the related domain model object.
这避免了在操作类中进行复杂编码(如struts1示例所示),将表单bean转换为相关域模型对象。
A mapping of the action class with the URL path is registered with the Struts configuration so that all requests with a matching path are sent to the mapped action class for processing.
action类与URL路径的映射被注册到Struts配置中,这样所有具有匹配路径的请求都被发送到与路径相映射的action类,然后再进行处理。
应用推荐