You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by wiki <wa...@hotmail.com> on 2008/08/10 14:38:09 UTC

How to get Image with Hibernate Spring Based Application

Hi I have this code for getting property list from database but I don't know
how to display Image property  [CODE prop.hbm.xml]<property name="propImage"      
column="Images"            not-null="true"/>   [CODE]    with ListView using
compound property model. I got some code from Kent Tong book but don't know
how to use compound property model for images.
Thanks in Advance to Igor If you could give some idea.
 ListView view=new ListView("propertyViews",list)
        {
            protected void populateItem(ListItem item)
            {
                final Property property=(Property)item.getModelObject();
                item.setModel(new CompoundPropertyModel(property));
                item.add(new Label("city"));
                item.add(new Label("propertyAddress"));
                item.add(new Label("price"));
                item.add(new Label("bedrooms"));
                
/*                Resource resource = new WebResource()
                {
                    public IResourceStream getResourceStream()
                    {
                        IResourceStream stream = new FileResourceStream(new
File(
                                "" + "null id" + ".png"));
                        return stream;
                    }
                };
                add(new Image("propImage", resource));*/

-- 
View this message in context: http://www.nabble.com/How-to-get-Image-with-Hibernate-Spring-Based-Application-tp18912816p18912816.html
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org