Hebert_Coelho 29 de nov. de 2011
Vc está fazendo update vai ajax? Coloca apenas es código aí.
well.nunes 29 de nov. de 2011
<p:fileUpload auto= "true" label= "Selecionar..."
allowTypes= "*.jpg;*.png; *.bmp; *.awg" multiple= "true"
description= "Imagem" update= "dtgImagem frmUploadImagem frmPanelDtg imgObra"
ileUploadListener= "#{controleUploadBean.fileUploadAction}" >
</p:fileUpload>
<p:dataGrid id= "dtgImagem" var= "img" value= "#{imagemBean.listImagem}" columns= "3"
rows= "12" paginator= "true" effect= "true"
paginatorTemplate= "{CurrentPageReport} {PageLinks}
{FirstPageLink} {LastPageLink}
{PreviousPageLink} {NextPageLink}" >
<p:column>
<p:panel header= "Imagens" style= "text-align:center" >
<h:form id= "frmPanelDtg" >
<h:panelGrid columns= "1" style= "width:100%" >
<p:graphicImage id= "imgObra" value= "#{img.caminho_imagem}"
tyle= "max-height: 100px; max-width: 120px" />
<p:separator style= "width: 100%; height: 6px" />
<h:outputText value= "#{img.descricao}" styleClass= "labelPadrao" />
</h:panelGrid>
</h:form>
</p:panel>
</p:column>
</p:dataGrid>
O código do upload e do datagrid, estou passando tudo via ajax
Hebert_Coelho 29 de nov. de 2011
Ao invés de dar update no dtgImagem, mande um update no form em que ele está.
Veja c funciona. Se estiverem no mesmo form, tente fazer por form separados.
Para chamar um outro form faça a chamada com : na frente, tipo: update=":formDataGrid"
well.nunes 29 de nov. de 2011
< p : dataGrid id = "dtgImagem" var = "img" value = "#{imagemBean.listImagem}" columns = "3"
rows = "12" paginator = "true" effect = "true"
paginatorTemplate = "{CurrentPageReport} {PageLinks}
{ FirstPageLink } { LastPageLink }
{ PreviousPageLink } { NextPageLink } ">
< p : column >
< p : panel header = "Imagens" style = "text-align:center" >
< h : form id = "frmPanelDtg" >
< h : panelGrid columns = "1" style = "width:100%" >
< h : form id = "frmGpcImagem" >
< p : graphicImage id = "imgObra" value = "#{img.caminho_imagem}"
style = "max-height: 100px; max-width: 120px" />
</ h : form >
< p : separator style = "width: 100%; height: 6px" />
< h : outputText value = "#{img.descricao}" styleClass = "labelPadrao" />
</ h : panelGrid >
</ h : form >
</ p : panel >
</ p : column >
</ p : dataGrid >
fiz isso cara, e continua do mesmo jeito o.õ