cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

actionContext.getData() returning null

Former Member
0 Kudos
522

Hello,

In my custom action, actionContext.getData() returns null.

Here is my backoffice-config.xml:

     <y:actions xmlns:y="http://www.hybris.com/cockpit/config/hybris" xmlns:editorArea="http://www.hybris.com/cockpitng/component/editorArea" xmlns:wz="http://www.hybris.com/cockpitng/config/wizard-config" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
         <y:group qualifier="common">
             <y:label>actiongroup.common</y:label>
             <y:action action-id="com.custom.activate" property="currentObject"/>
         </y:group>
     </y:actions>
   </context>

And definitions.xml :

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hello ,

My requirement is adding a new button adjacent to delete button in one custom item (eg: MyProduct). On click of that button, need to fetch the attributes of that item type in Action.

What is missing in my implementation ?

former_member625836
Active Contributor
0 Kudos

You still didn't say what is the context in which the action is used. Please provide at least a line from configuration that contains a context for your action?

Former Member
0 Kudos

context type="CustomType" component="editorareaactions"

former_member625836
Active Contributor
0 Kudos

Then I would say that everything is fine. Either selected object is in fact null, when you click the action or it is slightly different then you say. Please check widget model - whether currentObject is available there.

Cheers, Jacek