cancel
Showing results for 
Search instead for 
Did you mean: 

[Solved] how to add URL link to a 'more action' menù

d_segato
Champ in-the-making
Champ in-the-making
I created a custom JSP with it's bean.

I edited an Alfresco JSP to add the link to my custom JSP.
Example:

<h:graphicImage id="some-logo" url="/images/icons/custom-icon.gif" title="#{myCustomBundle['myCustomMessage']}" alt="#{myCustomBundle['myCustomMessage']}" style="border-width: 0px; vertical-align: middle;" />
<h:outputLink value="/alfresco/faces/jsp/custom-path/custom.jsp">
   <h:outputText value="#{myCustomBundle['myCustomMessage']}" id="msgBL" />
</h:outputLink>

It's good but i don't like to modify an alfresco JSP only to add a link.
I would like to add the image/text link to a "more action" menu somewhere…

it's easy for wizard and dialogs, I would do something like this

 <action id="my_custom_action">
            <permissions>
               <permission allow="true">Write</permission>
            </permissions>
            <evaluator>my.custom.package.evaluator.MyCustomEvaluator</evaluator>
            <label-id>my-custom-id</label-id>
            <image>/images/icons/custom-icon.gif</image>
            <action-listener>#{SomeListener.setupCustomAction}</action-listener>
            <params>
               <param name="id">#{actionContext.id}</param>
            </params>
         </action>

the action-listener is then supposed to return an outcome like "dialog:customDialog" or "wizard:customWizard" that open the correct dialog/wizard.

But i didn't find how I can do this action to open an URL (in this case my JSP)

can you, please, show my the right direction?
Thanks Smiley Happy
1 REPLY 1

d_segato
Champ in-the-making
Champ in-the-making
sorry…
my bad!
I didn't noticed i could place "href" and "target" tag to the "action" definition…

<action id="my_custom_action">
            <permissions>
               <permission allow="true">Write</permission>
            </permissions>
            <evaluator>my.custom.package.evaluator.MyCustomEvaluator</evaluator>
            <label-id>my-custom-id</label-id>
            <image>/images/icons/custom-icon.gif</image>
            <href>/faces/jsw/myjsp.jsp</href>
            <target>_blank</blank>
            <params>
               <param name="id">#{actionContext.id}</param>
            </params>
         </action>

sorry for the disturb