Web Application Opener - WebSnap (6)

zhaozj2021-02-08  205

Web Application Opener - WebSnap!

Chapter 6, Practice: Tadapterdispatcher and Adaptection

6-1 Action's Original

In Modules in Chapter Chapter, we discussed the Dispatcher to play in the entire WebSnap. In addition to pagedispatcher, there is another important Dispatcher component in WebSNAP: Tadapterdispatcher, I still remember us. Do you have to set her actionname characteristic value before using ActionButton? This is the information used by TadapterDispatcher. You should see the Script program similar to the following Script:

>>

After turning into the web page, it will become the following HTML schedule:

You should be able to explain this Action, but only this action is unable to explain the entire Apply action, and those who are familiar with the web design know that when we are handling the webpage of the database, we will store the original value of the record in the Hidden Field state in the web page. When the user apply, we compare the original value with the new value in the control, and then use these original values ​​to achieve the correct record and store. To solve the entire movement of WebSnap to process this process, we must start from this Script program from the Edit network page:

... ... ... ..

Let me see the __am this line, this line is the AdapterMode setting in the fieldGroup, and WebSnap uses this line to determine the Action time when Adaptermode is in that kind. The following __ov is the original value of CustNo, then __key this line you should know what is the purpose, but you may be confused, why there are two values ​​of the same use exist? Action does not already have this value Do you still remember that the MasterDetailedIT web page we allow users to be renovated in more than one detail? You can try to change a record after the record, you will find all the renovation Accented, if only the key value in an action is not enough? This is the meaning of this value. If you observe the action and hiddenfields in MasterDetailedit, HiddenRecordfields, you will find information on the action and __key value, you should understand how Action moves, and Why do you design it like this, you can also write your own Action to simplify your job, which is left in detail in the inside websnap. 6-2 Temperations Action: DefaultAction

When you use the setting action PageName to turn to a certain page module, if you set the defaultaction in this page module, you can use the RedirectOptios feature value in the action to determine whether it is DEFAULTACTION:

When you set an Action's RedirectOptios for Roredirect HttpPost, you will touch the defaultaction event in the page module when you perform an action, but you must be careful. When the action in the defaultaction is also set to RoredirectHttpPost, you will enter infinite back. Circle, this technology can be used to direct her to this web page after the user performs Action, performs some initialization actions in front of the destination web page, unlike OnBeforedSpatchPage, she is only started when the action or call RedirectTopage orientation, OnBeforeDispatchPage It is started before the web output, uses the defaultaction or OnBeForedISPATCHPAGE, if you initialize the action, you should initialize the web output, then you should write on the onbeforeDispatcher, if you need to guide or understand the call RedirectTopage Turned to some initialization action, using defaultAction will be better selection, of course! The two may be used in practice, then be careful, the two may be triggered, the defaultAction's Onexecute is the first The triggered action is then the OnBeforeDispatchPage. This chapter

This chapter I discussed with you the definition and transportation process in WebSNAP, and WEBSNAP is interacting with Hidden Field, which is very useful for you to explore an action or write an action component.

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

New Post(0)