There are no problems with custom entities they added via ajax and pass again to widget by
$form_state. For referencing existing nodes I'm using entityreference view and ctools popup. The problem is deliver back values selected in a view.
Common way to solve this - is custom submit callback for a view and
ajax_command_replace() widget html.
But it's not useful in my case, because I'm rebuilding form all the time and only valid data is in