Hi Stephen,
I'm keen to understand a little more about what you are trying to achieve, but before we do that let's just make sure your post is in the correct forum. If you are using the ArcGIS Runtime for Java (native applications for Windows / Linux) this is the right place, however the title of the post says Web-UI, so maybe I need to move you post to be better place. If you answer the questions below we'll be able to help you:
1. What product / platform are you using?
2. Can you explain a little more about the workflow you are trying to implement?
Thanks
Mark