NetBeans, however, will not allow you to do this, so you
will have to navigate to the \celebrities\src\main\java\com\packtpub\
celebrities\components\images (phew!) subfolder in the directory structure
generated by Maven at very beginning and copy the images to it.
Now the component is ready, and all we need to do to use it is to place it onto a page.
Or, indeed, we can use it in the Border component in place of that ActionLinkbased
locale switcher created in the previous chapter.
Creating Custom Components
[ 228 ]
Please remove the old switcher from Border.tml and any code related to it from the
Border.java file, and then put the following fragment of code where you want the
new locale switcher to be:
Run the application and, while at the Start page, try to switch the locale. This will
not work right now, and validation system will complain that you haven't logged in
properly. This is because in the Start class we have two generic event handlers??”
onSuccess() and onValidate()??”that react to submission of any form on the page.
We have two forms now??”one surrounding the locale switcher and another one for
logging in.
Pages:
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285