0

I created a custom plugin for Commerce Business Tools. Added 2 Buttons (actions) in it Add And Update. When clicking On Add it inserts a row and view is showing all the rows added.

I used UIHint = "Table" in EntityView to get the rows in a table. Now I want to select a row and update that row using Update button just like Promotions does.

The problem is I'm not able to select row from table. I thought that should have been default functionality of the UIHint = "Table" to be able to select row just like List. But I don't want to use List.

Please can anybody help me on this. Any suggestions on how to implement that?

6
  • Can you compare the json you are receiving for your custom view you have created with the json from the promotions sections you are referring and see if there are any differences? Commented Aug 9, 2019 at 12:07
  • @Vipin can't see anything obvious.
    – Kanchan
    Commented Aug 9, 2019 at 14:55
  • is your first row coming as selected on load? and can you check that for each row there is a child view and each child view has an ItemId property that should have some value. Commented Aug 11, 2019 at 5:39
  • Yes the first row was selected. I corrected ItemId to have unique value for each child view and now I can select a Row. Thanks for your help Vipin. My next question was how to get that selected row while editing. Does it have any event where I can store value somewhere or I need to call that plugin in Edit Action to see which one is selected?
    – Kanchan
    Commented Aug 12, 2019 at 9:18
  • Hi Kanchan, please create another question for same and lets discuss there. Commented Aug 12, 2019 at 9:35

1 Answer 1

0

Each row is represented by a Child view in the response from Commerce Engine and on the load of page, first row should be selected bu default. To be able to select any other row, each row should have a unique Item Id. please see image below:

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.