[Seaside] imageButton and seaside 2.7

Michel Bany michel.bany at gmail.com
Sat Apr 7 19:32:35 UTC 2007


Salut Nicolas,

You can use a subclass of WAFileLibrary (see WAFileLibraryDemo as an  
example).
Make sure you add the library and upload your file into the image  
using the 'config' app.

	html imageButton
			url: '../files/YourFileLibrary/yourpicture.png';
			...

If you do not like the idea of having graphical files in your image,  
you can also use the file system like this

	html imageButton
			url: (html context urlForDocument: (WACachedDocument fileName:  
'yourpicture.png') asMIMEDocument content);
			...

The file must reside in the execution path.
AFAIK, there is currently no conveniency method for the above lengthy  
piece code.

HTH
Michel.





On 18 Apr 2007, at 17:10 , Nicolas Petton wrote:

> Hi,
>
> I'm new with Seaside and I don't know how to use the imageButton with
> Seaside 2.7.
>
> I can put an image from the web with :
>
> html form: [
>     html imageButton
>         url: 'www.myurl.com/mypicture.png';
>         callback: [self inform: 'hello']]
>
> but it doesn't works with local files, and I didn't find any other
> method to do this.
>
> With image I do :
>
> html image
>     fileName: 'example.png'.
>
>
> Does someone know how it works with local files ?
>
> Thanks,
>
> Nicolas Petton
>
>
> -- 
>                                 ___
> .:! DEBIAN GNU/Linux !:.       / _ \
>                               | /   |
>     The universal OS          | \__/
>                                \
> -------------------------------------
> Ma clé GPG est disponible ici :
> http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xE788C34D
> _______________________________________________
> Seaside mailing list
> Seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside



More information about the seaside mailing list