<ui:repeat value="#{prodCtr.paginator.model}" var="o">                     
                    <h:form> 
                        <h:commandLink  id="#{o.id}" action="ModelInfo.xhtml" actionListener="#{prodCtr.listener}">                         
                            <h:panelGrid columns="1" style="border: #ffffff">
                                <img  src="resources/images/#{o.id}.jpg"  style="width: 100px;height: 100px"/>                            
                                <h:outputLabel value="#{o.price} YTL" style="font-size: 12px;font-family: Georgia, Serif;color: #ff3300" />  
                                <h:commandButton   value="Sifaris et" class="button"/>
                            </h:panelGrid>  
                        </h:commandLink>                                
                    </h:form>

            </ui:repeat>

h:Commandlinkin id'sine #{o.id} degerini vermek istedigimde: java.lang.IllegalArgumentException caught during processing of RENDER_RESPONSE 6 : UIComponent-ClientId=, Message=Empty id attribute is not allowed here Yapmak istedigim tıklanan h:CommandLink'in Id'sini Control'de yakalamaktir

soruldu: 12 Eki '13, 11:39

samirtk8's gravatar image

samirtk8
68459
cevap kabul oranı: 25%

değiştirildi: 12 Eki '13, 12:54


Sorunu su sekilde cozdum:

<ui:repeat value="#{prodCtr.paginator.model}" var="u">
    ...
    <h:link outcome="#{u.submit()}" value="Details">
        <f:param name="userID" value="#{u.id}" />
    </h:link>
    ...
</ui:repeat>

 @ManagedBean
@RequestScoped
public class ProdCtr {
    @ManagedProperty(value = "#{param.userID}")
    private String userID;

    // Getters and Setters
}
permanent link

cevaplandı: 13 Eki '13, 09:02

samirtk8's gravatar image

samirtk8
68459
cevap kabul oranı: 25%

değiştirildi: 13 Eki '13, 09:06

Cevabınız
toggle preview

powered by BitNami OSQA