How change browse window related to LookupPickerField

Hi

I want change browse window related to LookupPickerField. I try create new view and new browse base on this,
next I created datasources uses this view, LookupPickerField component uses this datasources,

obraz

You’re looking for the setLookupScreen() method. See here.

1 Like

I used setLookupScreen() and browse change but now I have exception when select position from list

java.lang.IllegalStateException: lookupComponent is not set
	at com.haulmont.cuba.gui.components.SelectAction.getLookupComponent(SelectAction.java:71)
	at com.haulmont.cuba.gui.components.SelectAction.actionPerform(SelectAction.java:47)
	at com.haulmont.cuba.web.gui.components.WebButton.performAction(WebButton.java:44)
	at com.haulmont.cuba.web.gui.components.WebButton.lambda$new$61446b05$1(WebButton.java:36)

That occurs when the screen you are using as a lookup doesn’t have a lookup component set. On the screen properties page in the studio, set the lookup component. It will likely be the table on your page.

1 Like

Where might I set this properties in the studio ? I created browse include table like on this screenshot.

obraz

Hi Andrzej,

when you open your browse screen (…-browse.xml) go to the PROPERTIES tabsheet.
Here you find the ‘Lookup component’ field - please select your table from the option list as Weston mentioned before:

Regards,
Steven

1 Like

Hi Steven.

I’ve done it. I was searching this option in invalid tab.

Thanks !