myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Boris Kovalenko <bo...@tagnet.ru>
Subject Re: Stranges with validation
Date Fri, 13 Apr 2007 08:34:06 GMT
Hello!

    I have problems with field userPassword. It should be required only 
for new users. Changing this field to
                <tc:panel>
                    <f:facet name="layout">
                        <tc:gridLayout columns="fixed;1*"/>
                    </f:facet>
                    <tc:label value="Пароль" for="@auto"/>
                    <tc:in value="#{maSearchForm.account.userPassword}" 
required="#{maSearchForm.account.new}"/>
                </tc:panel>

did not help. Any ideas?
> Hi,
>
> my be a facelets problem,
>
> please try to replace the tx:in with
>
> <tc:panel>
>  <f:facet name="layout">
>    <tc:gridLayout colums="fixed;1*"/>
>  </f:facet>
>  <tc:label value="Идентификатор" for="@auto"/>
>  <tc:in ... />
> <tc:panel>
>
>
> If this works it IS a tx-faclets problem.
>
> Regards,
>  Volker
> 2007/4/13, Boris Kovalenko <boris@tagnet.ru>:
>> Hello!
>>
>>     In this page I get validation error (userPassword is required) even
>> if #{maSearchForm.account.new} is true. What am I doing wrong again?
>>
>> <ui:composition template="template.xhtml"
>>     xmlns:f="http://java.sun.com/jsf/core"
>>     xmlns:ui="http://java.sun.com/jsf/facelets"
>>     xmlns:tc="http://myfaces.apache.org/tobago/component"
>>     xmlns:tx="http://myfaces.apache.org/tobago/facelet-extension">
>>     <ui:define name="body">
>>         <tc:panel>
>>             <f:facet name="layout">
>>                 <tc:gridLayout border="0" margin="10px"
>> rows="fixed;20px;fixed;1*"/>
>>             </f:facet>
>>             <tc:box label="Аккаунт">
>>                 <f:facet name="layout">
>>                     <tc:gridLayout/>
>>                 </f:facet>
>>                 <tx:in label="Идентификатор"
>> value="#{maSearchForm.account.uid}" required="true" focus="true"
>> readonly="#{not maSearchForm.account.new}"/>
>>                 <tx:in label="Домен" value="#{maSearchForm.account.dc}"
>> readonly="true" required="true"/>
>>                 <tx:in label="Пароль"
>> value="#{maSearchForm.account.userPassword}"
>> required="#{maSearchForm.account.new}"/>
>>                 <tc:cell>
>>                     <tc:in id="dn" value="#{maSearchForm.account.dn}"/>
>>                 </tc:cell>
>>                 <tx:selectBooleanCheckbox label="Активный"
>> value="#{maSearchForm.account.accountStatus}"/>
>>                 <tx:in label="ФИО (полностью)"
>> value="#{maSearchForm.account.cn}" required="true"/>
>>                 <tx:in label="Фамилия"
>> value="#{maSearchForm.account.sn}" required="true"/>
>>                 <tx:in label="Имя"
>> value="#{maSearchForm.account.givenName}"/>
>>                 <tx:in label="Отчество"
>> value="#{maSearchForm.account.initials}"/>
>>                 <tx:in label="Организация"
>> value="#{maSearchForm.account.o}" required="true" readonly="true"/>
>>                 <tx:in label="Подразделение"
>> value="#{maSearchForm.account.ou}"/>
>>                 <tx:in label="Должность"
>> value="#{maSearchForm.account.title}"/>
>>                 <tx:in label="Таб. номер"
>> value="#{maSearchForm.account.employeeNumber}">
>>                     <f:validateLength minimum="1" maximum="9"/>
>>                     <f:validateLongRange minimum="1"/>
>>                 </tx:in>
>>                 <tx:in label="Местонахождение"
>> value="#{maSearchForm.account.physicalDeliveryOfficeName}"/>
>>                 <tx:in label="Телефон"
>> value="#{maSearchForm.account.telephoneNumber}"/>
>>                 <tx:in label="Почтовый ящик"
>> value="#{maSearchForm.account.mail}" required="true" readonly="true"/>
>>                 <tx:in label="Почтовый сервер"
>> value="#{maSearchForm.account.mailHost}"/>
>>                 <tx:in label="Хранилище"
>> value="#{maSearchForm.account.mailMessageStore}" required="true"/>
>>                 <tx:in label="Квота (Мб)"
>> value="#{maSearchForm.account.mailQuotaSize}" required="true">
>>                     <f:validateLongRange minimum="0"/>
>>                 </tx:in>
>>             </tc:box>
>>             <tc:panel/>
>>             <tc:panel>
>>                 <f:facet name="layout">
>>                     <tc:gridLayout columns="fixed;1*;fixed;fixed"/>
>>                 </f:facet>
>>                 <tc:button label="  Удалить  "
>> action="#{maSearchForm.delete}" immediate="true"/>
>>                 <tc:panel/>
>>                 <tc:button label="  Сохранить  "
>> action="#{maSearchForm.save}"/>
>>                 <tc:button label="  Отмена  "
>> action="searchAccounts@mainMenu" immediate="true"/>
>>             </tc:panel>
>>             <tc:cell/>
>>         </tc:panel>
>>     </ui:define>
>> </ui:composition>
>>
>> With respect,
>>     Boris
>>
>>


Mime
View raw message