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

availableValuesProvider doesnt work in wizard

1,375

Hello,

The "availableValuesProvider" doesn't work for me. I've followed the steps of the Post below and this is what I have ended up with:

backoffice-config:

      <wz:step id="step1" label="b2BUserRegistrationForm.mainUser">
        <wz:content id="step1.content">
          <wz:property-list root="b2BUserRegistrationForm">
            <wz:property qualifier="b2BCustomer" editor="com.hybris.cockpitng.editor.extendedmultireferenceeditor">
               <wz:editor-parameter>
                <wz:name>availableValuesProvider</wz:name>
                <wz:value>openRegistrationUsersProvider</wz:value>
              </wz:editor-parameter>
            </wz:property>
          </wz:property-list>
        </wz:content>
      </wz:step>

Backoffice-Spring:

  <bean id="openRegistrationUsersProvider" class="...backoffice.provider.OpenRegistrationUsersProvider"/>

(The filepath is correct)

OpenRegistrationUsersProvider (My Bean):

public class OpenRegistrationUsersProvider extends SampleReferenceEditorSearchFacade {
  private static final Logger LOG = Logger.getLogger(DefaultCustomUserService.class);

  @Resource
  private CustomUserService customUserService;

  @Override
  public Pageable search(final SearchQueryData searchQueryData) {
      List<B2BCustomerModel> openB2BCustomers = customUserService.getOpenRegistrationUsers();

      if (openB2BCustomers != null) {
        openB2BCustomers.stream().forEach(i -> LOG.info(i));
      } else {
        LOG.error("openB2BCustomer is empty");
      }
      
      return super.search(searchQueryData);
  }
}

This doesn't work. There is a new warning in the log:

[15-10-2019 13:53:31,986] WARN  [   hybrisHTTP16] [c.h.c.w.c.r.ConfigurableFlowRenderer:515] Can not load data type, since passed object is null. Returning null.
[15-10-2019 13:53:32,086] WARN  [   hybrisHTTP16] [c.h.c.c.Editor:451] Rendering of editor failed. Improper value type: de.hybris.platform.b2b.model.B2BCustomerModel

I have tried

  • adding <T> to the name and parent
  • checking everything for spelling mistakes
  • changing extendes SampleReferenceEditorSe... to implements ReferenceEditorSe..

The Post:
https://answers.sap.com/questions/12767793/view.html

Documentation:
https://help.sap.com/viewer/5c9ea0c629214e42b727bf08800d8dfa/6.3.0.0/en-US/8bab997f86691014852cfbeab...

Accepted Solutions (1)

Accepted Solutions (1)

0 Likes

I found the solution.

I've added type="Reference(B2BCustomer)" to the property

<wz:property qualifier="b2BCustomer" type="Reference(B2BCustomer)" editor="com.hybris.cockpitng.editor.defaultreferenceeditor">

Then restarted and made an update running system. Yesterday it didn't work. The next morning it suddenly started working.

Answers (1)

Answers (1)

0 Likes

This one is similar, you might want to check this one out, if you are searching for a solution:

https://answers.sap.com/questions/12768988/filtering-itemtypes-enum-returns-and-getting-itemt.html