cancel
Showing results for 
Search instead for 
Did you mean: 

Seam.GetSelectedDocuments in Sections

pibou_Bouvret
Elite Collaborator
Elite Collaborator

Still trying to access the list of selected docs in sections :

the action category for my button is

CURRENT_SELECTION_SECTIONS_LIST

the "Selection is not empty" has been replaced by a custom EL

#{documentsListsManager.isWorkingListEmpty("CURRENT_SELECTION_SECTIONS") == false}

This works but Seam.GetSelectedDocuments is useless : i have to contribute a new, not very original, operation in Nuxeo IDE

@Operation(id=GetSectionSelectedDocuments.ID, category=Constants.CAT_FETCH, requires=Constants.SEAM_CONTEXT, label="GetSectionSelectedDocuments", description="")
public class GetSectionSelectedDocuments {

    public static final String ID = "Seam.GetSectionSelectedDocuments";

    protected @Context OperationContext ctx;
   
    @OperationMethod
    public DocumentModelList run() throws Exception {
        List<DocumentModel> res =
            OperationHelper.getDocumentListManager().getWorkingList(
                            DocumentsListsManager.CURRENT_DOCUMENT_SECTION_SELECTION);
                    return new DocumentModelListImpl(res);
    }   

}

But I meet the following error: could not access: DocumentsListsManager (?)

5 REPLIES 5

Florent_Guillau
World-Class Innovator
World-Class Innovator

Please provide the actual (maybe shortened) stack trace with the error.

pibou_Bouvret
Elite Collaborator
Elite Collaborator

Seems there's been a problem with studio / ide / instance update :

everything is working fine with this soultion.

What a pity these kind of operations referencing constants do not accept a parameter : if i want to the same with deleted documents, it seems i ll have to create another operation ...

Could you please open a NXP ticket in our JIRA to request this enhancement?

Ticket opened

[NXP-9777][1]