I have a java agent in lotus notes and this java agent will launch a swing dialog where i have some buttons.Now i want to enable or disable those buttons based on the view of lotus notes.How can i get the current view using java agent? I seen in some of the threads that its not possible from java. So how can i approach to solve this.
Thanks for your response. I am very new to lotus notes and i dont have any idea of creating a profile document in view’s postopen and get from java agent.
It would be greatfull if you give a small example on this.
To create a profile document and add a value to it you can either use @Formulas or LotusScript in PostOpen (no Java). The example mentioned above uses LotusScript, but you would only need the part that actually sets the value. In your case you would want to store
Source.Viewname
in the profile doc. To retrieve the profile document from your Java method, use
Once you have access to the profile document, you can read out the item value storing the view name just like any other item value.
To make this work, the code to write the view name into the profile document would have to be in every view, that needs this feature. And: If users switch between different views, this could get messed up.
Thank you for your help.It works for me…I have another requirement like, java agent has to get all the selected documents from any view like inbox,draft…I can get these by using getUnprocessedDocuments() and the agent target should be “All Selected Documents”.But if i run the agent for any open mails and those are not saved then it saying like “Please save the document”.This will work if i make target of that java agent to “None”.As per our requirement i need to get these two features, if inbox view is opened i need to get all the selected documents, if i open a new memo, it should not ask for saving the document before calling agent. Is these any way to solve this problem from one single java agent OR is there any way to call one java agent from another java agent through coding.