hi, could anyone help me....

here's my code

....
@Persist("flash")
@Property
private Date twawal, twakhir;
.....

public Link getDailyChart(){
        System.out.println(twawal); // OK
        System.out.println(twakhir); // OK
        return _resources.createEventLink("chart", new Object[]{"400","400",
twawal, twakhir});
    }

    public StreamResponse onChart(final int width, final int height, final
Date _twawal, final Date _twakhir){

        return new StreamResponse(){
            public String getContentType(){
                return "image/gif";
            }
            public InputStream getStream() throws IOException {
                BufferedImage image  =
generateDailyChart().createBufferedImage(width, height);
                ByteArrayOutputStream byteArray = new
ByteArrayOutputStream() ;
                ChartUtilities.writeBufferedImageAsPNG(byteArray, image) ;
                return new ByteArrayInputStream(byteArray.toByteArray());
            }
            public void prepareResponse(Response response){}
        };
    }

....


i got an error said :
"Could not find a coercion from type java.lang.String to type
java.util.Date.  Available coercions: Double --> Float, Float --> Double,
Long --> Boolean, Long --> Byte, Long --> Double, Long --> Integer, Long -->
Short, Number --> Long, Object --> Object[], Object --> String, Object -->
java.util.List, Object[] --> java.util.List, String --> Boolean, String -->
Double, String --> Long, String --> java.io.File, String -->
java.math.BigDecimal, String --> java.math.BigInteger, String -->
java.text.DateFormat"

can anyone help me ?


-- 
http://www.dwiardiirawan.com
"cos everyone could be extraordinary...lighten up !"

Reply via email to