??xml version="1.0" encoding="utf-8" standalone="yes"?>亚洲AV无码精品国产成人,亚洲国产精品自在拍在线播放,亚洲情a成黄在线观看http://m.tkk7.com/zdq5337/category/40183.htmlzh-cnWed, 10 Jun 2009 18:29:34 GMTWed, 10 Jun 2009 18:29:34 GMT60JavaScript 讉K JSF lg的方法(转蝲Q?/title><link>http://m.tkk7.com/zdq5337/articles/281191.html</link><dc:creator>I山?/dc:creator><author>I山?/author><pubDate>Wed, 10 Jun 2009 09:11:00 GMT</pubDate><guid>http://m.tkk7.com/zdq5337/articles/281191.html</guid><wfw:comment>http://m.tkk7.com/zdq5337/comments/281191.html</wfw:comment><comments>http://m.tkk7.com/zdq5337/articles/281191.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://m.tkk7.com/zdq5337/comments/commentRss/281191.html</wfw:commentRss><trackback:ping>http://m.tkk7.com/zdq5337/services/trackbacks/281191.html</trackback:ping><description><![CDATA[<span id="5z5jdb1" class="Apple-style-span" style="word-spacing: 0px; font: 14px/25px -webkit-sans-serif; text-transform: none; color: rgb(0,0,0); text-indent: 0px; white-space: normal; letter-spacing: normal; border-collapse: separate; text-align: left; orphans: 2; widows: 2; webkit-border-horizontal-spacing: 2px; webkit-border-vertical-spacing: 2px; webkit-text-decorations-in-effect: none; webkit-text-size-adjust: auto; webkit-text-stroke-width: 0"> <p>先看下面?JSF 面Q?/p> <p> </p> <p><%...@ page language="Java" pageEncoding="UTF-8"%><br /> <%...@ taglib uri="<a style="color: rgb(24,72,181); text-decoration: none" prefix="h"%><br /> <%...@ taglib uri="<a style="color: rgb(24,72,181); text-decoration: none" prefix="f"%></p> <p><html><br />   <head><br />     <title>My JSF 'login.jsp' starting page</title><br />     <script type="text/Javascript">...<br />     function isEmpty() ...{<br />       var username = document.getElementById("formLogin:txtUsername").value;<br />       var password = document.getElementById("formLogin:txtPassword").value;<br />       if(username == "") ...{<br />         alert("l老子输用户名Q?);<br />         document.getElementById("formLogin:txtUsername").focus();<br />         return false;<br />       }<br />       if(password == "") ...{<br />         alert("不输密码你登录个铲铲Q?);<br />         document.getElementById("formLogin:txtPassword").focus();<br />         return false;<br />       }<br />     }<br />     </script><br />   </head></p> <p>  <body><br />     <center><br />       <f:view><br />         <h:form id="formLogin"><br />           <div id="input"><br />             <h:outputLabel value="用户名:" /><br />             <h:inputText value="#{LoginManager.username}" id="txtUsername"<br />               styleClass="formText" /><br />             <br><br />             <h:outputLabel value="密码:" /><br />             <h:inputSecret value="#{LoginManager.password}" id="txtPassword"<br />               styleClass="formText" /><br />           </div><br />           <div id="submit"><br />             <h:commandButton value="提交" action="#{LoginManager.check}"<br />               onclick="return isEmpty();" styleClass="formButton" /><br />             <h:commandButton value="重置" type="button"<br />               onclick="Javascript:document.getElementById('formLogin').reset();<br />               document.getElementById('formLogin:txtUsername').focus();"<br />               styleClass="formButton" /><br />           </div><br />         </h:form><br />       </f:view><br />     </center><br />   </body><br /> </html><br /> q个面使用 JavaScript 来确认登录时用户名和密码是否为空Q表单名?formLoginQ两个输入组件名?txtUsername ?txtPasswordQ当单击按钮Ӟ调?JavaScript 函数 isEmpty()Q根据条件判断显C对话框或是提交表单?/p> <p>要注意的是,不能?JavaScript 函数中用如下类D法来讉K表单lgQ?br /> document.formLogin.txtUsername.value;<br /> 而应使用Q?br /> document.getElementById("formLogin:txtUsername").value;<br /> 或者:<br /> document.forms.formLogin["formLogin:txtUsername"].value;</p> <p>q是因ؓ JSF 解释上面?<h:form id="formForm">...</h:form> 一D|会生成如下代码:</p> <p><form id="formLogin" method="post" action="/Project_Blog/login.faces"<br />   enctype="application/x-www-form-urlencoded"><br />   <div id="input"><br />     <label>用户名:</label><br />     <input id="formLogin:txtUsername" type="text"<br />       name="formLogin:txtUsername" class="formText" /><br />     <br><br />     <label>密码:</label><br />     <input id="formLogin:txtPassword" type="password"<br />       name="formLogin:txtPassword" value="" class="formText" /><br />   </div><br />   <div id="submit"><br />     <input type="submit" name="formLogin:_id2" value="提交"<br />       onclick="return isEmpty();" class="formButton" /><br />     <input type="button" name="formLogin:_id3" value="重置"<br />       onclick="Javascript:document.getElementById('formLogin').reset();<br />       document.getElementById('formLogin:txtUsername').focus();" class="formButton" /><br />   </div><br />   <input type="hidden" name="formLogin" value="formLogin" /><br /> </form><br /> JSF 产生的所有表单控仉有符?formName:componentName 格式的名Uͼq里?formName 表示控g的表单的名称Q?componentName 表示lg名称。如果没有指?id 属性,?JSF 框架会自动创建标识符Q就象上面的 HTML 片段中的按钮一栗因此,要访问上面的用户名字D,必须使用下列Ҏ(gu)Q?br /> document.getElementById("formLogin:txtUsername").value;</p> </span> <img src ="http://m.tkk7.com/zdq5337/aggbug/281191.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://m.tkk7.com/zdq5337/" target="_blank">I山?/a> 2009-06-10 17:11 <a href="http://m.tkk7.com/zdq5337/articles/281191.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>JSF使用注意点(转蝲Q?/title><link>http://m.tkk7.com/zdq5337/articles/281189.html</link><dc:creator>I山?/dc:creator><author>I山?/author><pubDate>Wed, 10 Jun 2009 09:07:00 GMT</pubDate><guid>http://m.tkk7.com/zdq5337/articles/281189.html</guid><wfw:comment>http://m.tkk7.com/zdq5337/comments/281189.html</wfw:comment><comments>http://m.tkk7.com/zdq5337/articles/281189.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://m.tkk7.com/zdq5337/comments/commentRss/281189.html</wfw:commentRss><trackback:ping>http://m.tkk7.com/zdq5337/services/trackbacks/281189.html</trackback:ping><description><![CDATA[<span id="h5ztb5d" class="Apple-style-span" style="word-spacing: 0px; font: 12px -webkit-sans-serif; text-transform: none; color: rgb(0,0,0); text-indent: 0px; white-space: normal; letter-spacing: normal; border-collapse: separate; text-align: left; orphans: 2; widows: 2; webkit-border-horizontal-spacing: 1px; webkit-border-vertical-spacing: 1px; webkit-text-decorations-in-effect: none; webkit-text-size-adjust: auto; webkit-text-stroke-width: 0"> <table> <tbody> <tr> <td style="width: 740px; text-align: left" valign="top"><span onmouseup="NewHighlight(event)" class="wenzhang_con" id="articlecontent" style="font-size: 14px; width: 100%; word-break: break-all; line-height: 25px"> <div>1.转换旉Ӟ必须加上时区GMT+8Q不然相差一天? <div><f:convertDateTime  timeZone="GMT+8" dateStyle="long" type="date"/></div> <div> </div> <div>2.<h:outputText value="#{productBean.view}"/>当view为空Ӟ不显C?/div> <div> </div> <div>3. </div> <div>actionListener在执行了action之后再执行?/div> <div> </div> <div>可以没有actionQ而只有actionListener?/div> <div> </div> <div>action可以讄成一个方法,也可以设|ؓ一个导航用例的<from-outcome></div> <div>多个面如果使用了同一个requestU的backingBeanQ可能导致一些莫名其妙的问题。如Q不能执行指定的Action.</div> <div> </div> <div>4.对于向managed-bean的属性注入request参数Ӟ?lt;managed-bean-scope>必须为request,<property-class>不要为值类?如果是值类型,当指定的request参数为空Ӟ<span id="h5fnrln" class="Apple-converted-space"> </span> <div style="float: right"></div> http://www.kpwang.com/注入时会出错Q因Z个空对象如Integer null不能自动转换Z个值类型如int?)。如下所C:</div> <div><managed-bean><br />    <managed-bean-name>productBean</managed-bean-name><br />    <managed-bean-class>demo.view.ProductBean</managed-bean-class><br />    <managed-bean-scope>request</managed-bean-scope><br />    <managed-property><br />     <property-name>id</property-name><br />     <property-class><strong>java</strong>.lang.Integer</property-class><br />     <value>#{param.id}</value><br />    </managed-property><br />    <managed-property><br />     <property-name>view</property-name><br />     <property-class><strong>java</strong>.lang.Boolean</property-class><br />     <value>#{param.view}</value><br />    </managed-property><br />   </managed-bean></div> <div> </div> <div>5.对于以下查找是按部gid查找的,不是按参数名U查扄?/div> <div>UIParameter uip =(UIParameter)event.getComponent().findComponent("productId");</div> <div>//event是actionListener中的参数ActionEventcd?/div> <div>所?/div> <div><h:commandLink action="view"></div> <div><f:param id="productId" name="id" value="#{product.id}"/></div> <div></h:commandLink></div> <div><f:prarm>必须讄id</div> <div> </div> <div>Map params = FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap();</div> <div>String someValue = params.get("id");<span id="bb15znx" class="Apple-converted-space"> </span><br /> q个是按参数名称查找? <div></div> <div>JSF标签只是JSFlg的外,Id是lg的命名,与Delphi的组件名是一LQ之所以用Id不用Name,是ؓ了与HTML中的一_HTML inputlg id是其标识Qname是其传递到服务器端的参数名。)Q所以查找JSFlg当然用Id了?/div> <div> </div> <div>6.当一个页面的BackingBean的构造函Cq行出错或属性注入出错时Q表面上会报计算表达式错误,原因是这个BackingBean没有构造出来,为空Q当然在Reader面时会没有办法求相关的表达式的倹{?/div> <div> </div> <div> </div> <div>7.requestU的BackingBean在从客户端到服务端一ơ请求后Q就被销毁。在q次h中,只会被创Zơ。在Forward之前创徏的BackingBean在Forward之后Qƈ不会被再ơ创建?/div> <div> </div> <div>8.判断是否是回传?/div> <div>protected boolean isPostBack()<br />  {<br />   if (FacesContext.getCurrentInstance().getRenderResponse())<br />    return false;<br />   else<br />    return true;<br />  }</div> <div> </div> <div> </div> <div>9.<f:view>里?lt;<strong>jsp</strong>:include>时的注意事项<span id="dprrbtb" class="Apple-converted-space"> </span><br /> 感谢 tdwebber 提供?/div> <p>1) When using a<span id="3ddh555" class="Apple-converted-space"> </span><strong>jsp</strong>:include within the f:view tags, must include f:subview in the included file (or around the<span id="lt51n51" class="Apple-converted-space"> </span><strong>jsp</strong>:include tag).<a style="color: rgb(24,72,181); text-decoration: none" ><font style="line-height: 150%" size="2">鲲鹏|?/font></a></p> <p>当在f:view中?strong>jsp</strong>:include标签插入一个文件时Q?/p> <div style="float: right"></div> http://www.kpwang.com/必须用f:subview?strong>jsp</strong>:include包v? <p> </p> <p>2) In the include file, cannot have any HTML. All HTML tags must be wrapped in f:verbatim tags.</p> <p>在被插入的文件中Q不能有M的html标签Q如果必M用html标签Q必ȝf:verbatim它包v来?/p> <p>3) Within main f:view tags however, it is not necessary to wrap everything in f:verbatim tags (it´s not bad either). Just HTML that appears as children to other JSF components (i.e. t:newspaperTable).</p> <p>在主f:view中,没有必要用f:verbatimhtml标签包v来(当然包v来也可以Q。当html标签出现在子视图或其它JSF部g标签中时Q就要用f:verbatim包v来?/p> <p>10.JSF的缓存能力好像太ZQ有时停止了服务器,改动?strong>jsp</strong>面中的jsf标签Q再启动服务器,但到该页面时Q还是原来的内容Q需要手动刷C下。有旉要先转到别的面Q再回来h一下才能看到更新的内容?/p> </div> </div> </span></td> </tr> </tbody> </table> </span> <img src ="http://m.tkk7.com/zdq5337/aggbug/281189.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://m.tkk7.com/zdq5337/" target="_blank">I山?/a> 2009-06-10 17:07 <a href="http://m.tkk7.com/zdq5337/articles/281189.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss> <footer> <div class="friendship-link"> <p>лǵվܻԴȤ</p> <a href="http://m.tkk7.com/" title="亚洲av成人片在线观看">亚洲av成人片在线观看</a> <div class="friend-links"> </div> </div> </footer> վ֩ģ壺 <a href="http://bz600.com" target="_blank">ҹ޹ϼ</a>| <a href="http://33a55.com" target="_blank">˾վ߹ۿ</a>| <a href="http://chn139.com" target="_blank">޹ۺϾƷһ߲</a>| <a href="http://tuopumao.com" target="_blank">պĻһ</a>| <a href="http://w9366.com" target="_blank">18ڵվ</a>| <a href="http://xxxxxxxxcccc.com" target="_blank">޳aƬ߹ۿapp </a>| <a href="http://jcss99.com" target="_blank">޾ƷƵ߹ۿƵ</a>| <a href="http://41xjj.com" target="_blank">avһԿ</a>| <a href="http://kypbuy.com" target="_blank">޾ƷһƷƷƷ</a>| <a href="http://cangtuyuan.com" target="_blank">ĻѹۿƵ</a>| <a href="http://26cgw.com" target="_blank">ۺϺݺݰ</a>| <a href="http://bjqhkf.com" target="_blank">ձWWWѰ</a>| <a href="http://yygcui.com" target="_blank">avƷ</a>| <a href="http://hubmba.com" target="_blank">ٸ̫ˬ߹ۿƵ</a>| <a href="http://xsjxp.com" target="_blank">þþAVҰ</a>| <a href="http://scjcled.com" target="_blank">ƷһVR</a>| <a href="http://cxljdz.com" target="_blank">ƬĻӰ</a>| <a href="http://dbyssw.com" target="_blank">ëƬѹۿƵ</a>| <a href="http://wwwfac37.com" target="_blank">߹ۿƵ</a>| <a href="http://pgyadv.com" target="_blank">ž޹Ʒ </a>| <a href="http://pgyadv.com" target="_blank">һƬѿ</a>| <a href="http://gs168sz.com" target="_blank">ɫͼƵ߹ۿ</a>| <a href="http://jyd56.com" target="_blank">߳ٸëˮˮ</a>| <a href="http://dehaichem.com" target="_blank">avר</a>| <a href="http://mtripmall.com" target="_blank">Ļ޹˾þþƷ </a>| <a href="http://276194.com" target="_blank">޴רӰԺ</a>| <a href="http://yxjcgs.com" target="_blank">Ƶ</a>| <a href="http://badabg.com" target="_blank">ѹվ߹ۿͼ</a>| <a href="http://828556.com" target="_blank">һӰԺ</a>| <a href="http://shelaoban.com" target="_blank">99߹ۿƵ</a>| <a href="http://ssdtsz.com" target="_blank">޾Ʒ˳߲va</a>| <a href="http://66cws.com" target="_blank">Ʒ޲Ʒһ </a>| <a href="http://chaikexin.com" target="_blank">޾ƷۺϾþһ</a>| <a href="http://www-7607.com" target="_blank">Ůһһ鴤Ƶ </a>| <a href="http://pufenghotel.com" target="_blank">gvС߹ۿ</a>| <a href="http://jimeng-99.com" target="_blank">24СʱձӰѿ</a>| <a href="http://jiggybaby.com" target="_blank">߹ۿ޵Ӱ</a>| <a href="http://ai-xian.com" target="_blank">AV߹ۿ</a>| <a href="http://pjszlw.com" target="_blank">˻18س˻18Ƶ </a>| <a href="http://www998xe.com" target="_blank">޾ƷþþþAVƬ</a>| <a href="http://ygloka.com" target="_blank">jlzzjlzz߲</a>| <script> (function(){ var bp = document.createElement('script'); var curProtocol = window.location.protocol.split(':')[0]; if (curProtocol === 'https') { bp.src = 'https://zz.bdstatic.com/linksubmit/push.js'; } else { bp.src = 'http://push.zhanzhang.baidu.com/push.js'; } var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(bp, s); })(); </script> </body>