I have a test page on link user test password, which is already working ok in general It migrates employees using a shuttle object, and uses collections to update the information. So far so good. It happens that I do not want to leave enabled, or display the migration button when I remove all items from the collection, which are fed into the shuttle. In the shuttle with each change I feedback the collection and at the end I resequencio, knowing that if there is at least one record of that collection there will be at least one seq_id equal to 1. I created a small validation like this:
declare
vazio NUMBER;
begin
select 1 into vazio from dual
INTERSECT
select seq_id from apex_collections col where collection_name = 'COLECAO_POSTOS_EMPREGADOS';
if vazio = 1 then
RETURN TRUE;
END IF;
EXCEPTION WHEN NO_DATA_FOUND THEN
RETURN FALSE;
end;
I added a dynamic action on the shuttle's running change, which makes a submitt page, when returning this condition true. And I created a server-side-condition on the migration button. But when I load the shuttle the button is not displayed. As the submit has this function to give the server new customer information, I did not understand why the button was not displayed. I think my attempt was a bit daunting, too. Does anyone have any other way of showing / hiding or enabling / disabling the button with SHUTTLE features?
Thank you