problems with rich:scrollableDataTable and rich:calendar
luc_yuan Feb 29, 2008 9:58 AMi met a problem with rich:scrollableDataTable when i try to do "enter" circle.i have 2 dropdownlist and 5 input text in my form,and i use the "enter" to perform a tab issue.And of course i use javascript to prevent the form being submitted auto when meets the text type input in the form.but what makes me confused is when i do my circle the rich:scrollableDataTable becomes unusual and the ie give me "width is not a object" in firefox also shows me something diffculit to understand,below is my code
<?xml version="1.0" encoding="Windows-31J"?> <!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <ui:composition xmlns="http://www.w3.org/1999/xhtml" xmlns:s="http://jboss.com/products/seam/taglib" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:rich="http://richfaces.org/rich" xmlns:custom="http://custom.com" xmlns:a4j="http://richfaces.org/a4j" template="layout/template.xhtml"> <ui:define name="pageTitle">経銷仕入ä¼Â�票入力</ui:define> <ui:define name="body"> <script language="javascript"> window.document.onkeydown = fnc_goNext; var nextObj = "edit:miseId"; function fnc_setNext(strName){ nextObj = "edit:" + strName; } function fnc_goNext(){ if (event.keyCode == 13){ event.keyCode = 0; event.returnValue = false; if(nextObj != ""){ if(document.getElementById(nextObj)){ document.getElementById(nextObj).focus(); } } } } </script> <h:form id="edit"> <table> <tr> <td>経çÂ�†å‡¦çÂ�†æ—¥</td> <td><h:outputLabel value="#{sbta0120Dto.keiriYmd}"> <s:convertDateTime type="date" pattern="yyyy/MM/dd" /> </h:outputLabel></td> <td></td> </tr> <tr> <td>ä¼Â�票区分</td> <td>#{sbta0120Dto.denkbnId}</td> <td>#{sbta0120Dto.denKbnName}</td> </tr> <tr> <td>Ã¥Â�ˆåÂ�ŒåŒºåˆ†</td> <td>#{sbta0120Dto.godokbnId}</td> <td>#{sbta0120Dto.godoKbnName}</td> </tr> <tr> <td>税率区分</td> <td>#{sbta0120Dto.zeiritukbnId}</td> <td>#{sbta0120Dto.zeiritukbnName}</td> </tr> <a4j:region> <tr> <td colspan="3"><custom:usermise id="miseId" onfocus="fnc_setNext('venCd')" dtoField="#{sbta0120Dto.usermiseId}"/></td> </tr> <tr> <td colspan="3"><custom:ven id="venCd" dtoField="#{sbta0120Dto.venId}" onfocus="fnc_setNext('denNo')" /></td> </tr> <tr> <td>ä¼Â�票番åÂ�·</td> <td> <h:inputText value="#{sbta0120Dto.denNo}" id="denNo" onfocus="fnc_setNext('no')" required="true"> <a4j:support event="onblur" ajaxSingle="false" actionListener="#{sbta0120Action.checkDenNo}"/> </h:inputText> <h:message for="denNo" style="errorMessage" /> </td> <td></td> </tr> </a4j:region> </table> <rich:spacer height="10" /> <table> <tr> <td align="center" width="30">No.</td> <td align="center" width="100">商å“Â�コード</td> <td align="center" width="100">数é‡Â�</td> <td align="center" width="100">原åÂ�˜ä¾¡</td> <td align="center" width="100">原価金é¡Â�</td> <td align="center" width="100">売åÂ�˜ä¾¡</td> <td align="center" width="100">売価金é¡Â�</td> </tr> <a4j:region> <tr> <a4j:region> <td><h:inputText id="no" value="#{sbta0120Dto.record.no}" style="width:30" onfocus="fnc_setNext('shohinCd')"> <a4j:support event="onblur" ajaxSingle="false" actionListener="#{sbta0120Action.ifExist}" reRender="shohinCd,su,genTan,genkin,baiTan,baiKin" /> </h:inputText></td> </a4j:region> <td> <h:inputText value="#{sbta0120Dto.record.shohinCd}" id="shohinCd" style="width:100" onfocus="fnc_setNext('su')"> <a4j:support event="onblur" ajaxSingle="true" actionListener="#{sbta0120Action.checkShohinCd}"/> </h:inputText> </td> <a4j:region> <td> <h:inputText id="su" value="#{sbta0120Dto.record.su}" style="width:100" onfocus="fnc_setNext('genTan')"/></td> <td><h:inputText id="genTan" value="#{sbta0120Dto.record.genTan}" style="width:100" onfocus="fnc_setNext('baiTan')"> <a4j:support event="onblur" ajaxSingle="false" actionListener="#{sbta0120Action.calculateGenkin}" reRender="genkin" /> </h:inputText></td> </a4j:region> <td><h:outputLabel id="genkin" value="#{sbta0120Dto.record.genkin}" style="width:100" /></td> <td><h:inputText id="baiTan" value="#{sbta0120Dto.record.baiTan}" style="width:100" onfocus="fnc_setNext('no')"> <a4j:support event="onblur" ajaxSingle="false" actionListener="#{sbta0120Action.calculateBaiKin}" reRender="recordList,no,shohinCd,su,genTan,genkin,baiTan,baiKin" /> </h:inputText></td> <td><h:outputLabel id="baiKin" value="#{sbta0120Dto.record.baiKin}" style="width:100" /></td> </tr> </a4j:region> </table> <rich:scrollableDataTable rowKeyVar="rkv" columnClasses="col" height="180" width="630" id="recordList" rows="20" value="#{sbta0120Dto.records}" var="record" selection="#{sbta0120Action.selection}"> <rich:column width="30"> <h:outputText value="#{record.no}" /> </rich:column> <rich:column width="100"> <h:outputText value="#{record.shohinCd}" /> </rich:column> <rich:column width="100"> <h:outputText value="#{record.su}" /> </rich:column> <rich:column width="100"> <h:outputText value="#{record.genTan}" /> </rich:column> <rich:column width="100"> <h:outputText value="#{record.genkin}" /> </rich:column> <rich:column width="100"> <h:outputText value="#{record.baiTan}" /> </rich:column> <rich:column width="100"> <h:outputText value="#{record.baiKin}" /> </rich:column> </rich:scrollableDataTable> <div> 数é‡Â�Ã¥Â�ˆè¨ˆ<h:inputText id="suKei" value="#{sbta0120Dto.suKei}" required="true" style="text-align:right"/> <h:message for="suKei" style="errorMessage" /> 原価金é¡Â�Ã¥Â�ˆè¨ˆ <h:inputText id="genKinKei" value="#{sbta0120Dto.genKinKei}" required="true" style="text-align:right"> <a4j:support event="onblur" ajaxSingle="true" actionListener="#{sbta0120Action.checkGenKinKei}"/> </h:inputText> <h:message for="genKinKei" style="errorMessage" /> 売価金é¡Â�Ã¥Â�ˆè¨ˆ <h:inputText id="baiKinKei" value="#{sbta0120Dto.baiKinKei}" required="true" style="text-align:right"/> <h:message for="baiKinKei" style="errorMessage" /> </div> <div class="actionButtons"><h:commandButton action="#{sbta0120Action.finish}" id="finish" immediate="true" value="終了"> </h:commandButton> <h:commandButton action="#{sbta0120Action.back}" id="back" immediate="true" value="戻る"> </h:commandButton> <h:commandButton action="#{sbta0120Action.save}" id="save" value="ä¿Â�å˜"> </h:commandButton> <h:commandButton action="#{sbta0120Action.deleteLine}" id="deleteLine" value="行削除"> </h:commandButton></div> </h:form> </ui:define> </ui:composition>
so i wonder if am i using something wrong or can someone gives me any explainations.ths
second for rich:calendar.i wonder if can use it like this.when i click the small img it popups the calendar and i can choose one date also set it patten for example 'yyyy/MM/dd'.and the date i selected shows in the input
just besides the samll img like '2008/02/29'.when i click the input (enableManualInput=true) ,how can i make '2008/02/29' shows '20080229' and after i do write a date manually and focus out the input the date shows '2008/03/01'.i wish you know what i mean.thanks for reading this:)