Skip to main content
Information Mgmt
New to Lotus
How to buy
Live demos
Technical library
Forums & community
Java™ technology
Open source
SOA and Web services
Web development
My developerWorks
About dW
Submit content

developerWorks  >  Lotus  >  Forums & community  >  Notes/Domino 6 and 7 Forum

Notes/Domino 6 and 7 Forum



Sign in to participate PreviousPrevious NextNext

RE: Can an agent ask a user for a path to a file?
Andrei Kouvchinnikov 1.May.06 05:24 PM a Web browser
Domino Designer 7.0 All Platforms

You can use Java Swing and Java AWT classes.

You can create a Java application which emulates a path prompt (Form, field, browse button, OK button) and then attach the class file into your agent (Edit Project option). You can create a Java class using any of the Java GUI editing tools available for download (NetBeans, Eclipse), just make sure you compile the file with Java version supported by Lotus Notes (1.3 for R6 and 1.4 for R7 ?).
Then you can from the agent call the public method of your class which shows the prompt.
Actually you can write the Java Swing code directly in the agent's code panel but it's much easier to use GUI editor to build the form using drag-and-drop.

Take a look at this example:
You can sligtly modify the file and use it in your agent. I've just tried it myself and it works in Notes 7. I could browse for files from a Java agent, the problem is that the agent finishes before any file is chosen. It must wait until the file selection is done, but that should be rather easy to fix.

If you can't fix the agent by yourself i can take a closer look at it, but I will be unable to do it until next week.

2 quick tips:
This line causes security error and I just commented it out:
// frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

In agent you can test the file chooser with:
FileChooserDemo fcd=new FileChooserDemo();


Can an agent ask a user for a path ... (Cole A Aldridge... 1.May.06)
. . RE: Can an agent ask a user for a p... (Harkpabst Melia... 1.May.06)
. . RE: Can an agent ask a user for a p... (Andrei Kouvchin... 1.May.06)
. . RE: Can an agent ask a user for a p... (Andre Guirard 1.May.06)

Document Options

  Document options
Print this pagePrint this page

Search this forum

Forum views and search

  Forum views and search
Date (threaded)
Date (flat)
With excerpt
Advanced search

Sign In or Register

 Sign In or Register
Sign in
Forgot your password?
Forgot your user name?
Create new registration

Member Tools

RSS Feeds

 RSS feedsRSS
All forum posts RSS
All main topics RSS
More Lotus RSS feeds


Forum use and etiquette
Native Notes Access
Web site Feedback

Lotus Support

 Lotus Support
IBM Support Portal - Lotus software
Lotus Support documents
Lotus support by product
Lotus support downloads
Lotus support RSS feeds


IBM Composite Applications
IBM Mashup Center
IBM Connections
IBM Connections Cloud Developers
IBM Docs
IBM Forms
IBM Mobile Connect
IBM Sametime
IBM SmartCloud for Social Business
IBM Web Experience Factory
Lotus Domino
Lotus Domino Designer
Lotus Expeditor
Lotus Foundations
Lotus iNotes
Lotus Instructor Community Courseware
Lotus Notes
Lotus Notes & Domino Application Development
Lotus Notes Traveler
Lotus Protector
Lotus Quickr
Lotus Symphony
IBM Web Content Manager
WebSphere Portal

Lotus Forums

 Lotus Forums
Notes/Domino 9.0
Notes/Domino 8.5 + Traveler
Notes/Domino XPages development forum
Notes/Domino 8
Notes/Domino 6 and 7
IBM Connections
IBM Mobile Connect
IBM Sametime
IBM SmartCloud Notes
Lotus Enterprise Integration
Lotus Protector
Lotus Quickr
Lotus SmartSuite