简体   繁体   中英

How is jsf dialog selected?

I am working with Alfresco 4.2.3 in the explorer UI.

I am seeing a bug in a custom workflow task. More specifically when attempting to delete a resource from the Resource panel the wrong dialog config is selected and the resource/doc is not deleted.

The Dialog Config looks like so:

         <!-- Definition of the delete content dialog -->
     <dialog name="deleteFile" page="/jsp/dialog/delete.jsp" managed-bean="DeleteContentDialog" 
             icon="/images/icons/delete_large.gif" title-id="delete_file" 
             description-id="delete_file_info" />

     <dialog name="deleteFileAssoc" page="/jsp/dialog/delete.jsp" managed-bean="DeleteContentAssociationDialog" 
             icon="/images/icons/delete_large.gif" title-id="delete_file" 
             description-id="delete_file_assoc_info" />

The delete.jsp is as follows:

<h:outputText value="#{DialogManager.bean.confirmMessage}" styleClass="mainSubTitle" />

From debugging DialogManager.setCurrentDialog(DialogConfig config) I can see the DialogConfig is not correct. The deleteFileAssoc config is selected when it should select the deleteFile config. I do not understand how the dialog config is selected. Please, JSF pros could explain how the DialogConfig is selected?

Note: Here is the Alfresco Wiki on the Dialog Framework. It got me this far now i'm stuck. https://wiki.alfresco.com/wiki/Dialog_Framework#Dialog_Beans

I searched through the code for the outcome dialog:deleteFileAssoc, witch is always prefixed with "dialog" when calling a dialog. This led me to the managed bean that calls the Navigation Handler and passes the outcome. Now I can see how the dialog is selected.

            fc.getApplication().getNavigationHandler().handleNavigation(fc, null, "dialog:deleteFileAssoc");

I'm still a novice but it seems that Outcomes in jsf can lead you through the code enough to figure out whats going on.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM