Hi,

As you can see in the Tapestry documentation of the Submit component:
http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/corelib/components/Submit.html
and what your stacktrace is teeling you is that the "image" parameter
expects an object of the type " org.apache.tapestry5.Asset" and not just
a String.

You can add to your page class the following:

@Property
@Inject
@Path("context:layout/images/pdf_download.jpg")
private Asset pdfDownloadImage;

and in your .tml file:

<t:submit t:id="pdf" t:image="pdfDownloadImage" />


On 06/06/14 08:17, Net Dawg wrote:
> I have the following submit button that works great:
>
> <t:submit t:id="pdf" name="Run Report" value="Run Report" /> 
>
> with an onSelectedFromPdf() method in page class that references component id 
> "pdf". 
>
> Question:  How can this submit button be changed from just "Run Report" to an 
> image?  
>
> I tried: 
>
> <input id="pdf" type="image" src="${context:layout/images/pdf_download.jpg}" 
> />
>
> which gives the error that "id Pdf does not exist".
>
> And also: 
>
> <t:submit t:id="pdf" t:image="${context:layout/images/pdf_download.jpg}" /> 
>
> which would be great if it worked!  But gives error:
>
> Failure reading parameter 'image' of component ...: Could not find a coercion 
> from type java.lang.String to type org.apache.tapestry5.Asset.

Reply via email to