16.02.2015 Views

Step by step tutorial: how to build a bean for Servoy - Servoy Stuff

Step by step tutorial: how to build a bean for Servoy - Servoy Stuff

Step by step tutorial: how to build a bean for Servoy - Servoy Stuff

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

How <strong>to</strong> <strong>build</strong> a <strong>bean</strong> <strong>for</strong> <strong>Servoy</strong> - A <strong>step</strong> <strong>by</strong> <strong>step</strong> <strong>tu<strong>to</strong>rial</strong> brought <strong>to</strong> you <strong>by</strong> <strong>Servoy</strong> <strong>Stuff</strong><br />

Y. Assembling all the pieces of our <strong>bean</strong><br />

The key element is the use of yet another “not so public” interface, and one that you cannot do<br />

without <strong>to</strong> <strong>build</strong> smart/web client <strong>bean</strong>s: that is the I<strong>Servoy</strong>BeanFac<strong>to</strong>ry interface<br />

(com.servoy.j2db.I<strong>Servoy</strong>BeanFac<strong>to</strong>ry).<br />

Once again I urge you <strong>to</strong> petition with me <strong>to</strong> update the Public API javadocs <strong>to</strong> contain this interface.<br />

Without it, there is simply no Wicket <strong>bean</strong>s, no web client <strong>bean</strong>s possible!<br />

So go <strong>to</strong> the <strong>for</strong>um, check this post: http://<strong>for</strong>um.servoy.com/view<strong>to</strong>pic.phpf=15&t=12712<br />

And please add your support <strong>to</strong> my request; I think it is more than reasonable, it is imperative! And an<br />

anonymous case in the support system, easily overlooked will not be enough. * Johan Compagner<br />

agreed <strong>to</strong> add it <strong>to</strong>day (July 14 th )<br />

Back <strong>to</strong> our I<strong>Servoy</strong>BeanInterface, this one only have two methods, so I guess we are lucky, not <strong>to</strong>o<br />

much code <strong>to</strong> add here… We create a new simple class, call it “<strong>Servoy</strong>TestBean” inside our<br />

“net.stuff.servoy.<strong>bean</strong>s.test” package, it must implement the I<strong>Servoy</strong>BeanInterface, like so:<br />

28/37

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!