Using Java applets in Notes

I have a little trouble using applets on domino’s forms and pages. I need to access from Java to information such as CurrentDatabase, CurrentDocument etc… So when using Java agents I have AgentContext with all these infirmation. But I want to use Java controls like edits, text field etc. on domino’s forms, so I use Java applets. But in this case as I understand I don’t have any access to the user context from Java… Is there any way to resolve this problem ?