The width of the image has nothing to do w/ JSF. These values are merely pass through, whether directly or via CSS and @style.
To accomplish what you are trying to do, you may want to dynamically set the width property of the UIGraphic component corresponding to the graphic tag. If @width supports a value binding expression, you are in luck. Otherwise, you may have to grab a reference to the component itself in a managed bean and set the value there. You will of course need some mechanism in place to programatically identify the width of the image in the first place. Dennis Byrne >-----Original Message----- >From: Dave [mailto:[EMAIL PROTECTED] >Sent: Tuesday, August 29, 2006 12:10 AM >To: users@myfaces.apache.org >Subject: graphicImage width > >Is there a way to set maximum width for a <h:graphicImage>? > > If a image width is less than 200 pixels, use its actual width. If its width > is more than 200 pixels, then resize it to 200 pixels. > > If I set width="200", the image will always be resized to 200 pixel width, > and distorted. > > Thanks for help. > > >--------------------------------- >Get your own web address for just $1.99/1st yr. We'll help. Yahoo! Small >Business.