Problem with ParameterDefinition
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-28-2008 07:02 PM
Hi folks,
I've created my custom action and it's works, but now I wont add a parameter.
I have add it to the list:
protected void addParameterDefinitions(List<ParameterDefinition> paramList) {
paramList.add(new ParameterDefinitionImpl(PARAM_STOP_FOLDER, DataTypeDefinition.NODE_REF, true, getParamDisplayLabel(PARAM_STOP_FOLDER)));
}
And I have denined the action in spring context file, but when I add the action and I click button "" the action is added, but I can't set the parameter and when I execute this action I have this exception:
org.alfresco.service.cmr.rule.RuleServiceException: A value for the mandatory parameter stop-folder has not been set on the rule item copy-content-with-struct-action
at org.alfresco.repo.action.ParameterizedItemAbstractBase.checkMandatoryProperties(ParameterizedItemAbstractBase.java:164)
at org.alfresco.repo.action.executer.ActionExecuterAbstractBase.execute(ActionExecuterAbstractBase.java:117)
Where is my error??? What I forget?
Thanks
I've created my custom action and it's works, but now I wont add a parameter.
I have add it to the list:
protected void addParameterDefinitions(List<ParameterDefinition> paramList) {
paramList.add(new ParameterDefinitionImpl(PARAM_STOP_FOLDER, DataTypeDefinition.NODE_REF, true, getParamDisplayLabel(PARAM_STOP_FOLDER)));
}
And I have denined the action in spring context file, but when I add the action and I click button "" the action is added, but I can't set the parameter and when I execute this action I have this exception:
org.alfresco.service.cmr.rule.RuleServiceException: A value for the mandatory parameter stop-folder has not been set on the rule item copy-content-with-struct-action
at org.alfresco.repo.action.ParameterizedItemAbstractBase.checkMandatoryProperties(ParameterizedItemAbstractBase.java:164)
at org.alfresco.repo.action.executer.ActionExecuterAbstractBase.execute(ActionExecuterAbstractBase.java:117)
Where is my error??? What I forget?
Thanks

Labels:
- Labels:
-
Archive
5 REPLIES 5
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-30-2008 05:52 AM
I have resolve my issue.
I have forget to define the Handler
Now all works
Thanks,
Davide
I have forget to define the Handler

Now all works

Thanks,
Davide

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-01-2008 11:56 PM
Hi,
I'm a newbie here. I'm trying to setup a testing custom action with parameter input by jsp. And I've got the same problem.
I'm now using the Alfresco Community 2.1 on Fedora 4. I've added a web-client-config-custom.xml into $TOMCAT/webapps/alfresco/WEB-INF/classes/alfresco/extension. The content of the xml file is :
<alfresco-config>
<config evaluator="string-compare" condition="Action Wizards">
<action-handlers>
<handler name="Test" class="org.alfresco.extension.TestActionHandler" />
</action-handlers>
</config>
</alfresco-config>
However, when I execute the "Run Action" wizard and select my custom action and click the "Set Values and Add" button, my customized jsp doesn't pop up. Also, when I click the finish button, a similar error message prompt out.
So, would it be possible if you can share more details on how you fix your problem? Thanks a lot!
Regards,
Wing
I'm a newbie here. I'm trying to setup a testing custom action with parameter input by jsp. And I've got the same problem.
I'm now using the Alfresco Community 2.1 on Fedora 4. I've added a web-client-config-custom.xml into $TOMCAT/webapps/alfresco/WEB-INF/classes/alfresco/extension. The content of the xml file is :
<alfresco-config>
<config evaluator="string-compare" condition="Action Wizards">
<action-handlers>
<handler name="Test" class="org.alfresco.extension.TestActionHandler" />
</action-handlers>
</config>
</alfresco-config>
However, when I execute the "Run Action" wizard and select my custom action and click the "Set Values and Add" button, my customized jsp doesn't pop up. Also, when I click the finish button, a similar error message prompt out.
So, would it be possible if you can share more details on how you fix your problem? Thanks a lot!
Regards,
Wing

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-09-2009 08:36 AM
Hi,
I had a similar issue, the (partial) resolution of it included the following steps:
- The Action definition has a public static final String NAME
- This string has to be identical with the bean-id of the action (action-context.xml in the extension folder)
- The respective action handler name has to be identical with the NAME String as well
- The ActionHandler class needs to implement the prepareFor{Edit,Save} methods, so that the properties are correctly copied between the two property maps (see the implementation of an existing action handler as a reference)
Still, in my case, the values from the jsp don't get correctly passed to action handler, but otherwise the jsp is found and executes fine.
Hope this helps.
I had a similar issue, the (partial) resolution of it included the following steps:
- The Action definition has a public static final String NAME
- This string has to be identical with the bean-id of the action (action-context.xml in the extension folder)
- The respective action handler name has to be identical with the NAME String as well
- The ActionHandler class needs to implement the prepareFor{Edit,Save} methods, so that the properties are correctly copied between the two property maps (see the implementation of an existing action handler as a reference)
Still, in my case, the values from the jsp don't get correctly passed to action handler, but otherwise the jsp is found and executes fine.
Hope this helps.

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-27-2009 06:22 AM
Help, I have the same problem. I respected all task, my jsp works correctly, but the handler is completely ignored (nothing happened although I took care about name and bean id)…

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-01-2009 10:41 AM
Hi,
for me, the trouble was implementing the prepareForEdit and prepareForSave methods. Make sure that:
Here's what you need to do:
for me, the trouble was implementing the prepareForEdit and prepareForSave methods. Make sure that:
- The property PROP_DESTINATION gets copied as well
- That you copy from the input map to the output map
Here's what you need to do:
- prepareForEdit: copy the entries from the second argument into the first argument
- prepareForSave: just the opposite
