Use default action buttons in custom view

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-20-2008 07:52 AM
I'm pretty new to Alfresco and am currently working on a custom view (in community 2.1.0 edition). My goal is to list the properties of my custom content and add some links to actions to them. However, I would also like to make use of the "default" edit, delete, view details, … buttons in order to not force the users who want to edit the content from the list to scroll all the way down to the "Content Items" section.
Here's what I've come up with in the FTL by copy-pasting from the HTML code of the Web Client:
Edit button:
So can someone please tell me more about how this works, provide a tutorial that covers this or at least point me in the right direction to continue my search? (I have been looking for a few hours already, but to no avail…)
Thanks in advance!
Here's what I've come up with in the FTL by copy-pasting from the HTML code of the Web Client:
Edit button:
<a href="#" onclick="document.forms['browse']['browse:act'].value='browse:edit_doc_http_id_367';document.forms['browse']['id'].value='${document.id}';document.forms['browse'].submit();return false;" id="edit_doc_http_id_367"><img src="…"></a>
The same goes for Delete and View Details, with the exception that they have the "browse value" of "details_doc_id_381" and "delete_doc_id_385" (instead of "edit_doc_http_id_367"). So now I'm wondering how I could get the correct "details_doc_id_" or "delete_doc_id_" values for each document… I do have the feeling that this should be documented somewhere, but I just can't seem to find it.So can someone please tell me more about how this works, provide a tutorial that covers this or at least point me in the right direction to continue my search? (I have been looking for a few hours already, but to no avail…)
Thanks in advance!
Labels:
- Labels:
-
Archive
2 REPLIES 2
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-20-2008 05:01 PM
Hi,
the html you posted is generated by JSF. Have a look at org.alfresco.web.ui.repo.component.UIActions.java.
the html you posted is generated by JSF. Have a look at org.alfresco.web.ui.repo.component.UIActions.java.

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2008 04:40 AM
OK thanks, I'll have a look at that…
I've already kind of found a working solution for my requirements, as I've used the "ExternalAccessServlet" to create a link to the "Details page" like this:
What I haven't found so far is how I could call the "Edit" page for a document (or the checkout/checkin functionalities). Anybody got any ideas on that?
I've already kind of found a working solution for my requirements, as I've used the "ExternalAccessServlet" to create a link to the "Details page" like this:
<a href="/alfresco/navigate/showDocDetails/workspace/SpacesStore/${document.nodeRef.id}"> <img src="/alfresco/images/icons/View_details.gif" alt="View Details" title="View Details" border="0"></a>
What I haven't found so far is how I could call the "Edit" page for a document (or the checkout/checkin functionalities). Anybody got any ideas on that?
