25 de abril de 2011

SEAM page error "duplicate Id for a component selectParent"

Yes, it is a bug. Quick solution:look at seam-home/seam-gen/view/edit.page.xml.ftl
and change the following line:
<s:button id="${'#'}{${homeName}.instance.${property.name} != null ? 'changeParent' : 'selectParent'}" value="${'#'}{${homeName}.instance.${property.name} != null ? 'Change' : 'Select'} ${property.name}"
for:
<s:button id="${'#'}{${homeName}.instance.${property.name} != null ? 'changeParent${property.name}' : 'selectParent${property.name}'}" value="${'#'}{${homeName}.instance.${property.name} != null ? 'Change' : 'Select'} ${property.name}"
Enjoy!!!


Esto soluciona el bug del generador de seam

en mi caso debí cambiar la página 
Esto 
        <div class="actionButtons">
            <s:button id="#{beneficiarioHome.instance.direccionContacto != null ? 'changeParent ' : 'selectParent '}" 
            value="#{beneficiarioHome.instance.direccionContacto != null ? 'Change' : 'Select'} direccionContacto"
                       view="/DireccionContactoList.xhtml">
                <f:param name="from" value="BeneficiarioEdit"/>
            </s:button>

por esto:



        <div class="actionButtons">
            <s:button id="#{beneficiarioHome.instance.direccionContacto != null ? 'changeParentdireccionContacto ' : 'selectParentdireccionContacto '}" 
            value="#{beneficiarioHome.instance.direccionContacto != null ? 'Change' : 'Select'} direccionContacto"
                       view="/DireccionContactoList.xhtml">
                <f:param name="from" value="BeneficiarioEdit"/>
            </s:button>

 Y ESO TAMPOCO ANDUVO ASÍ QUE LE SAQUE EL id="#{bla bla}" 

2 comentarios:

  1. muchas gracias mi amigo.. soy nuevo en esto...i

    ResponderEliminar
  2. Hola!!! no entendi cuando pusiste que no te anduvo y le sacaste el id="#{bla bla}. Como te quedó el código en definitiva?, lo podrías copiar así me queda mas claro?

    Desde ya mil mil gracias!!!!!!!!!!!

    ResponderEliminar