Before answering your question, I'll explain how the UI editor works. It's easiest to see this if you play along with the
Blockly Playground.
When you click the blue editor gear in a mutable block, Blockly creates a separate workspace -- the editor workspace. The editor workspace has its own blocks. These represent the parts of the block in the main workspace that is being edited. In the case of the create_lists_with block, the editor workspace has a container block ("list") and 0 or more blocks representing items in the list ("item"). As you add or remove item blocks from the list block in the editor workspace, Blockly updates the shape of the block in the main workspace. (Try it!)
Now let's see what valueConnection_ is.
Create a list block with two items in it and connect two text value blocks to it. The first piece of text should be "abc" and the second "def". Open the mutation editor and add a new item block between the existing two items. Notice what happens to the block in the main workspace: an empty value input is added between the inputs with "abc" and "def".
valueConnection_ is a property of the item block in the editor workspace. It stores the connection (if any) of the corresponding value block in the main workspace. (Remember that an item in the editor workspace corresponds to a value input on the block in the main workspace.) This is done so that the correct value block is connected to the correct value input after you make changes with the editor. In this case, valueConnection_ for the first item block is the connection to the "abc" block; valueConnection_ for the second item block is null; and valueConnection_ for the third item block is the connection to the "def" block.
valueConnection_ is set in the saveConnections function, which is discussed after the discussions of compose and decompose.
As to the error and how to implement what you want, we'll need more information. Can you describe what block you're trying to create, what code you're using, and what causes the error?
Thanks,