Canigó - Detall dels tags - textError
Detall dels tags - textErrorDefineix el posicionament del texte a mostrar en cas d'un error de validació. La documentació auto-generada del tag és a http://canigo.ctti.gencat.net/confluence/canigodocs/site/canigo2_2/tlddoc/fwk/textError.html La funcionalitat d'aquest tag és definir el posicionament i controlar la visualització del texte d'error. La validació en sí està definida en el propi camp a validar (per exemple un fwk:text) i el texte a presentar és una composicio del texte associat al tipus de validació (per exemple required)amb el texte definit en la validació. Atributs heredatscap. Atributs específics de Canigó
ExempleA continuació es presenta un fragment de pàgina que utilitza el tag fwk:textError Pàgina JSP<%@ include file="/WEB-INF/jsp/includes/fwkTagLibs.jsp" %> <fwk:form action="provesTagsLayout.do" styleId="myActionForm" key="jsp.provesTags.ProvesTagsSimple.form" reqCode="show" layout="false" method="post"> <fwk:gridBagLayout gridStyleId="grid" size="2,5" gridStyle="border:1px solid green" style="0:0=color:red;background-color:yellow,*:2=color:blue;background-color:yellow"> (...) <span> </span> <span> </span> <fwk:label styleId="nameLabel" key="jsp.provesTags.ProvesTagsSimple.lbl3" id="camp1" styleClass="label"/> <fwk:text key="jsp.provesTags.ProvesTagsSimple.camp9" styleId="camp9" mode="E,E,E" layout="false" styleClass="fieldText" maxlength="10" size="10" validations="ONCHANGE(required)" validationFieldMessageMode="ICON,TEXTERROR" sourceErrorTooltip="TEXT" iconStyleId="camp9IconError" textErrorStyleId="camp9TextError" errorClass="errorNew" errorKey="jsp.provesTags.ProvesTagsSimple.lbl3" property="camp9"/> <span> <fwk:textError styleId="camp9TextError" styleClass="errorText" /> <fwk:iconError styleId="camp9IconError" style="display:none" styleClass="iconError"> <img src="<c:url value="/images/iconWarning.gif"/>" id="imagen" class="icon" /> </fwk:iconError> <span> </fwk:gridBagLayout> </fwk:form> Arxius d'internacionalització |