欧美性猛交黑人xxxx,成人毛片一区二区三区,久久综合九色综合精品,男的把j放进女人下面视频免费

Ajax Tags標記初探

  • 發布于:2020-08-29
  • 254 人圍觀
  AjaxTags項目是在現有的Struts HTML標記庫的基礎上,添加對AJAX支持。 AjaxTags改寫了Struts標簽類org.apache.struts.taglib.html.FormTag和org.apache.struts.taglib.html.BaseHandlerTag,并使用Struts的plugin技術,使得Struts提供了對AJAX的支持。 以下是jsp中簡單的示例:

<html:form action="example1" ajaxRef="example1">
  First Name: <html:text property="firstName" size="25" value="Frank" />
  <br>
  Last Name: <html:text property="lastName" size="25" value="Zammetti" />
  <br>
  <html:button property="button" value="Click to do Ajax!" ajaxRef="button" />
</html:form>
Result:<br>
<span id="example1_resultLayer"> </span>

  注意:ajaxRef屬性。 ajaxRef屬性中內容是在ajax-config.xml中定義的,例如本示例的配置部分如下:

<!DOCTYPE ajaxConfig PUBLIC "ajaxConfig" "ajaxConfig">
<ajaxConfig>
  <!-- Define a custom request handler that generates XML for example 2 -->
   <handler name="CustomXMLGenerator" type="request">
      <function>customGenerateXML</function>
      <location>customXMLGenerator.js</location>
   </handler>
   <!-- Configuration for example 1 -->
   <form ajaxRef="example1">
      <element ajaxRef="button">
         <event type="onclick">
            <requestHandler type="std:QueryString">
               <target>example1.do</target>
               <parameter>firstName=firstName,lastName=lastName</parameter>
            </requestHandler>
            <responseHandler type="std:InnerHTML">
               <parameter>example1_resultLayer</parameter>
            </responseHandler>
         </event>
      </element>
   </form>
</ajaxConfig>

  在配置文件中定義了該表單的屬性,以及按鈕觸發的事件和回寫結果的處理方法。采用很巧妙的封裝方法實現了Struts的AJAX調用。當然Ajaxtags離實用階段還有相對長的一段距離,但它提供了一種在現有的軟件架構上高效率開發ajax應用程序的可行性方案。
萬企互聯
標簽: