Hello Experts,
I am new to WDK. I managed to create a custom menu item with the help of WDK Tutorial.
Now I trying to make a menu Item visible only when the selected document is checked out. I am trying to do this preconditions.
However, I am getting Error below error from the prevalidation class when logging into webtop. I am unable to fix it. Can someone please help?
Error
Action Service - unable to instantiate qualifier class: com.ford.custom.PrivilegedCancelCheckoutPreCondition
class java.lang.InstantiationException
==========================================================================
My Action XML
=====================
<config version = "1.0">
<scope type="dm_sysobject">
<action id = "privileged_cancel_checkout_action">
<params>
<param name="objectId" required="true"/>
<param name="lockOwner" required="true"/>
</params>
<preconditions>
<precondition class="com.ford.custom.PrivilegedCancelCheckoutPreCondition">
</precondition>
</preconditions>
<execution class="com.documentum.web.formext.action.LaunchComponent">
<component>privileged_cancel_checkout_component</component>
<container>dialogcontainer</container>
</execution>
</action>
</scope>
</config>
===================================================================
My PreCondition Class:
public abstract class PrivilegedCancelCheckoutPreCondition implements IActionPrecondition
{
final private static String m_strRequiredParams[] = new String[] {"objectId", "lockOwner"};
String[] getRequiredParams()
{
System.out.println("************ INto the getRequiredParams...");
return m_strRequiredParams;
}
public boolean queryExecute(String strAction, IConfigElement config, ArgumentList arg, Context context, Component component)
{
boolean execute = false;
try
{
//get object ID
String objId = arg.get("objectId");
String strLockOwner = arg.get("lockOwner");
if ( strLockOwner == null || strLockOwner.length() == 0 )
{
execute = true;
}
}
catch(Exception de)
{
execute = false;
}
return execute;
}
}
==========================================================================
Best Regards,
A