-
1. Re: How to reRender specific row in richfaces 4
just-greg Oct 8, 2012 2:05 PM (in response to ugossi)Can we see the actual xhtml that you are trying to use?
-
2. Re: How to reRender specific row in richfaces 4
healeyb Oct 8, 2012 5:29 PM (in response to ugossi)You're basically there, you just need to know that with bean.rowToUpdate rowToUpdate is a List<Integer> of row ids.
If you are using an ExtendedDataModel your implementation of the abstract class needs to implement a few "extra
bits" but I can't remember what off the top of my head.
Regards,
Brendan.
Java Enterprise Developer
JSF Richfaces Ajax Java 6/7 (scjp) EE 6 HTML CSS JavaScript jQuery MySQL JPA Hibernate Eclipselink
Spring Oracle SQL JPQL Sybase EJB CDI Glassfish Apache JAX-RS Primefaces UNIX Paypal and more..
-
3. Re: How to reRender specific row in richfaces 4
ugossi Oct 9, 2012 4:24 AM (in response to healeyb)My code is like:
<h:form id="form1">
....
<
rich:dataTable id="tabLab" value="#{BB.listLab}"
rows="8" var="lb" rowClasses="odd-row, even-row">
<
rich:column width="50" style="text-align:center;white-space: nowrap;font-size:medium;"
>
<f:facet name="header">
<h:outputText value="Codice" style="font-size:medium"/>
</f:facet>
<h:outputText value=" #{lb.codice}" />
</rich:column>
<rich:column width="50" style="text-align:left;white-space: nowrap;font-size:medium;" id="descr">
<f:facet name="header">
<h:outputText value="Descrizione" style="font-size:medium"/>
</f:facet>
<h:outputText value=" #{lb.descrizione}"/>
</rich:column>
</
....
</h:form>
....
<
h:form id="form2">
....
<
rich:popupPanel id="popup" modal="true" autosized="true" resizeable="false" height="360" width="500" domElementAttachment="form">
..
<
X
</a4j:commandLink>....
</h:form>
private
Set<Integer> keysSet;
publicSet<Integer> getKeysSet() {
return keysSet;}
public voidsetKeysSet(Set<Integer> keysSet) {
out.println("setKeysSet: "System.
+keysSet);
this.keysSet= keysSet;}
But i think i miss something.
Regards.
-
4. Re: How to reRender specific row in richfaces 4
iabughosh Oct 9, 2012 6:00 AM (in response to ugossi)set your id to your h:outputText not to h:column.
regards,
-
5. Re: How to reRender specific row in richfaces 4
ugossi Oct 9, 2012 6:29 AM (in response to iabughosh)Hi Ibrahim, thanks for the suggestion. I put the id on the outputText
<ey
but i have the same problem, when i close the popup nothing happens.
I also try to add in the action of the close event, (actionListener="#{BB.chiudiPop}") this code for updating the set of rows index
keysSet.clear
keysSet.add((ind) idTmp);
where idTmp contains the index of the selected row.
-
6. Re: How to reRender specific row in richfaces 4
healeyb Oct 9, 2012 8:54 AM (in response to ugossi)I just made this note to myself, don't know if it's any help but I recall that I got it working when
I realised how the client id was put together after looking at the page source...
When rendering a specific cell in a pageable extendedDataTable using the syntax:
render="topiclist:@rows(messageBoardView.updateItems):viewcount"
the updateItems ArrayList contains the id (persistent id) of the entity as
supplied by dv.process(ctx, getKey(t), argument) in RichLazyDataModel.
In other cases it might be the row index, use browser dev tools to look at
the client id, row index will start from 0.
-
7. Re: How to reRender specific row in richfaces 4
just-greg Oct 9, 2012 9:53 AM (in response to ugossi)Have you tried with the popup being in the same <h:form> ?
-
8. Re: How to reRender specific row in richfaces 4
ugossi Oct 9, 2012 10:45 AM (in response to just-greg)Ok, some small improvement...now i'm able to rerender one cell of the table.
Using
render="form1:tabLab:#{BB.riga}:descr"
Adding
<rich:dataTable id="tabLab" value="#{BB.listLab}"
rows="8" var="lb" rowClasses="odd-row, even-row" rowKey="riga">I try to rendere the entire row, using
render="form1:tabLab:#{BB.riga}
but in this case nothing happens.
-
9. Re: How to reRender specific row in richfaces 4
iabughosh Oct 10, 2012 1:48 AM (in response to ugossi)unfortunately, you can't render the entire row because of limitation with RF 4, you can render multiple cells instead.
regards.
-
10. Re: How to reRender specific row in richfaces 4
ugossi Oct 10, 2012 4:43 AM (in response to iabughosh)Hi Ibrahim,
i find this post in the forum https://community.jboss.org/message/20164. where i read
"....render="tableId:rowKey" or render="tableId:#{controller.rowKeysSet}" shoud be used for updates for the whole rows...."
I try this solution, but dosen't work! May be a future development?
Thanks.
Regards.