You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by "David H. DeWolf" <dd...@apache.org> on 2006/03/02 19:11:48 UTC

Custom Component Rendered Twice

I have a custom component nested within a panelGrid which is getting
rendered twice.  Once where it should be - within the appropriate
role, and once before the table is even rendered.  If I nest multiples
within the table, each one behaves the same way.

<h:panelGrid columns="2">

<v:label for="emailAddress" styleClass="none"
errorStyleClass="fieldError" value="* Email Address:"/>
<h:panelGroup>
    <h:inputText id="emailAddress"
value="#{userProfile.currentProfile.email}" required="true"
maxlength="50" readonly="#{userProfile.profileUpdate}">
        <s:commonsValidator type="email" server="true"
message="#{messages['errors.email.format']}"/>
        <v:uniqueEmailValidator/>
        <f:attribute name="errorMsgArg" value="This email address"/>
    </h:inputText>
    <t:htmlTag value="p" styleClass="fieldErrorDescription">
        <h:message for="emailAddress"/>
    </t:htmlTag>
</h:panelGroup>
. . .
</h:panelGrid>

My renderer doesn't check to make sure the component should be
rendered (uiComponent.isRendered()) before rendering anything, and I
can see the encode methods being executed twice.

Any ideas why this would be happening?

Thanks,

David