-
1. Re: not get datatable in javascript func after reRender the
nbelaevski Feb 19, 2009 8:38 AM (in response to venkattippi)Try to use reset('#{rich:clientId('table')}')
-
2. Re: not get datatable in javascript func after reRender the
venkattippi Mar 4, 2009 6:05 AM (in response to venkattippi)hi,
i tried with reset clientId. it is also not working.
can have any other option to do this.
thanks,
venkat -
3. Re: not get datatable in javascript func after reRender the
nbelaevski Mar 4, 2009 3:35 PM (in response to venkattippi)Probably, table is not in DOM when oncomplete is called. Does this work ok for onclick?
-
4. Re: not get datatable in javascript func after reRender the
venkattippi Mar 5, 2009 1:17 AM (in response to venkattippi)its not working, see iam sending how iam using
<ri:dataTable columnClasses="center" id="planDataTable"
binding="#{controller.planDataTable}"value="#{controller.planResults}"
var="planResults" onRowClick="changeColor(this,'planDataTable');#{ri:component('planMenu')}.show(event, {selected: '#{controller.planDataTable.rowIndex}'});">
<ri:colomns />
</ri:dataTable>
<ri:contextMenu attached="false" id="planMenu">
<ri:menuItem ajaxSingle="false"
icon="/images/icons/move_left.gif"
action="#{controller.addPlan}">
<aj:actionparam assignTo="#{controller.selectedIndex}"
value="{selected}" />
<h:outputText id="planAdd" value="Add" />
</ri:menuItem>
in changeColor function iam taking the current row and datatable id and set the color to current selected row.
for the first when a select a row its highlighting, and in context menu i have option to add a plan to another datatable. first time iam adding that and next time iam not able to changecolor and not get the contextmenu to add the pan.
function changeColor(row, tableId)
{
var table = document.getElementById(tableId);
var rows = table.getElementsByTagName("tr");
for(i = 2; i < rows.length; i++){
rows.style.backgroundColor='white';
}
row.style.backgroundColor='#FFEBDA';
}
and i used the reset clientid in oncomplete and as well as onClick events then also its not working.
thanks,
venkat -
5. Re: not get datatable in javascript func after reRender the
nbelaevski Mar 5, 2009 6:58 AM (in response to venkattippi)Venkat,
Sorry, still not clear for me how it's used. Still do not seeoncomplete="reset('table')"
what 'table' is and where it's located. -
6. Re: not get datatable in javascript func after reRender the
venkattippi Mar 6, 2009 12:33 AM (in response to venkattippi)<ri:contextMenu attached="false" id="planMenu">
<ri:menuItem ajaxSingle="false"
icon="/images/icons/move_left.gif"
action="#{controller.addPlan}" submitMode="ajax"
oncomplete="reset('#{ri:clientId('planDataTable')}')">
<aj:actionparam assignTo="#{controller.selectedIndex}"
value="{selected}" />
<h:outputText id="planAdd" value="Add" />
</ri:menuItem> -
7. Re: not get datatable in javascript func after reRender the
nbelaevski Mar 6, 2009 9:52 AM (in response to venkattippi)What does
<h:outputText value="@ #{ri:clientId('planDataTable')} @" />
output? -
8. Re: not get datatable in javascript func after reRender the
venkattippi Mar 9, 2009 5:02 AM (in response to venkattippi)
this is the output
@ planDataTable @
what happen when we give this i cant understand.
regards,
Venkat -
9. Re: not get datatable in javascript func after reRender the
nbelaevski Mar 9, 2009 7:49 AM (in response to venkattippi)Is "planDataTable" located in form or some sort of data table?
-
10. Re: not get datatable in javascript func after reRender the
venkattippi Mar 9, 2009 8:19 AM (in response to venkattippi)it is in form
inside form i have html table
in that table i have ajax outputPanel
in outputPanel i have datatable -
11. Re: not get datatable in javascript func after reRender the
nbelaevski Mar 9, 2009 12:10 PM (in response to venkattippi)Maybe there are several id="planDataTable" components in the view?
-
12. Re: not get datatable in javascript func after reRender the
venkattippi Mar 10, 2009 12:40 AM (in response to venkattippi)No,
there is only one id="palnDataTable" in my page.
iam sure that is not a problem.
then that is the case first time itself i cannot highlight the row and cannot add data to another datatable.
why iam getting this problem at second time when i click on that row.