PermaLink How to create a Lotus Notes Widget that submits data to a form on the web02/24/2008 11:48 AM
In this tutorial I want you to understand how to create:
a) a new Recognizerusing regular expressions
b) a new component based on a web form
c) a new action to wire the component to the recognizer

I am demonstrating the technique by recognizing a books ISBN number in any richt text and search that book on amazon.

Let's start configuring the recognizer by using the option in the My Widgets sidebar and clicking Configure Recognizer...



Give that recognizer a name of ISBN Recognizer, make a new type with a name of ISBN and enter the regular expression "ISBN\s([-0-9xX ]{10,13})". This is a simple regex that does no validation, it simply checks for the string "ISBN" followed by a space and 10 to 13 characters from a list (numbers, the character x, minus or space).



To wire that recognizer to a web form, I have to locate a search form on the amazon.com server. I found this URL which is a searchform that is usually used on IFRAMES.
http://rcm.amazon.com/e/cm?t=chrisbrandleh-20&o=1&p=20&l=qs1&f=ifr

Open this URL using the built in browser in Lotus Notes and click the configure a Widget ... button on the toolbar.



Now choose to build a form.



Lotus Notes will recognize on form on the web page, if you click on the number "1", the input field will change its color to green.



Give the component a name and enable using a keyword.



Now you can link the keyword to your ISBN recognizer.



Now you are done and ready to test.




I created a second component for amazon.de and wired it to the same recognizer. The user can now choose from multiple components.




This page has been accessed 5615 times. .
Disclaimer
The weblog represent my personal views and comments and does not represent the views of my current or previous employers or customers.

About me
By Category
The BlogRoll
XING advertisement
Proudly Employed By
IBM Lotus Logo
Buy this book
Search
Monthly Archive
2012
2011
2010
2010
2010
2010
2009
2009
2009
2009
2009
2009
2009
2009
2008
2008
2008
2008
2008
2008
2008
2007
2007
2007
2007
2007
2007
2007
2007
2007
2007
2006
2006
2006
2006
2006
2006
2006
2006
2006
2006
2006
2006
2005
2005
2005
2005
2005
2005
2005
2005
2005
2005
2005
2004
2004
2004
2004
2004
2004
2004
2004
2004
2004
2004
2004
2003
2003
Full Archive
Todays Referrers
Advertisement