Developer forum

Forum » Development » DataSource null in PIM RibbonBar

DataSource null in PIM RibbonBar

Martin Moen
Reply

I'm trying to make a ribbon bar addin for PIM, using DW 9.15.7.

Followed the code examples for products, and started out with this code:

The ribbon bar addin is showing, but I do not get any data from the data source. It is always null.

What might I be missing?


Replies

 
Imar Spaanjaars Dynamicweb Employee
Imar Spaanjaars
Reply

Is product null? Or Ribbon.DataContext.DataSource? In the former case, your data source may not be a Lazy<Product> but something else?

Imar

 
Martin Moen
Reply

Tried this also:

Still null

Looks like it is working through Ecommerce, but not through PIM.

 
Imar Spaanjaars Dynamicweb Employee
Imar Spaanjaars
Reply

Looks like a bug or missing implementation to me. In Ecom Product Edit I see code like this:

RibbonBar.DataContext.Initialize(_prod)

but for the Pim Product Edit it's not there and thus your Data Source is never set. I would report this as a bug.

Imar

 

 
Martin Moen
Reply

Good thanks Imar, I reported it through Care.

 
Kristian Kirkholt Dynamicweb Employee
Kristian Kirkholt
Reply

Hi Martin

This feature #14315 RibbonBar.DataContext.Initialize(_prod) for PIM

Now implemented in Dynamicweb version 9.15.10 

https://doc.dynamicweb.dk/downloads/dynamicweb-9

Kind Regards
Dynamicweb Care Support
Kristian Kirkholt

 

You must be logged in to post in the forum