Nível 1
Nível 2
Faça login na Comunidade
Faça logon para exibir todas as medalhas
Hi all, I have AEM forms Table connected to Schema binding, The rows of table repeats as per the amount of items present in the schema, Is there any event , or technique i can use to trigger a specific script only at the last instance of the table row, and not when every row is getting generated? Any help ideas would be helpful.
thanks.
Visualizações
respostas
Total de curtidas
I think triggering your script from Table::ready:layout
Visualizações
respostas
Total de curtidas
Thank you, but i should have mentioned this is Adaptive Form table where these rows are repeating. Thanks Again
Visualizações
respostas
Total de curtidas
Try triggering from "Table - Visibility" or a parent panel.
Visualizações
respostas
Total de curtidas
I tried executing from Table - Visibility event. the script does get executed after the instances are created. But seems like Dom is not updated with these new instances.
On Table Visibility: Maybe below script can help explain the problem.
==============
//Event:visibility:
var insCnt = TableA.Row1.instanceManager.instanceCount; //Gives 5 Row 1 repeats 5 times via binding.
for (var i=0 ; i< insCnt ; i++)
{
var rowID = TableA.Row1.instanceManager.instances[i].id; // Works as id of ROw1 instance is available.
$("#"+rowID) // Cant find using Jquery, as Instance is not updated in the DOM ?
}
Can you have any way around this?
Regards,
Visualizações
respostas
Total de curtidas
I think that should work. Can you console.log that and see what you get?
What are you eventually trying to achieve?
Visualizações
respostas
Total de curtidas
this.instanceManager.instanceCount - used to determine total number of repeatable instances/rows
this.instanceIndex - used to fetch current row index#(typically starts from 0,1,2..)
if(this.instanceManager.instanceCount === this.instanceIndex+1)
{
//add specific script for the last instance/row
}
Visualizações
respostas
Total de curtidas
Visualizações
Curtida
respostas
Visualizações
Curtida
respostas