it might be help :
-------------------
GridClub.tml
------------------
<form t:type="Form" t:id="clubForm">
        <table t:type="grid" rowsPerPage="5" pagerPosition="top"
source="clubList" row="club" remove="idClub" model="clubModel">
                <t:parameter name="deleteCell">
                        <input t:type="Checkbox" t:id="delete" value="delete"/>
                </t:parameter>
                <t:parameter name="updateCell">
                        <a t:type="PageLink" t:id="update" page="admin/FormClub"
context="club.idClub"><img src="../images/edit.gif"/></a>
                </t:parameter>
                <!-- <t:parameter name="deleteCell">
                        <a t:type="ActionLink" t:id="delete"
context="club.idClub">delete</a>
                </t:parameter>-->
        </table>
        <input type="submit" value="delete"/>

---------------------
GridClub.java
---------------------
@Inject
        private IClubDao clubDao;
        private List<Club> clubList;
        private Club club;      
        
        @Retain
        private BeanModel clubModel;
        @Inject
        private BeanModelSource beanModelSource;
    @Inject
    private ComponentResources resources;

    private boolean delete;
    public List<String> deletedList;


    public boolean isDelete() {
                return delete;
        }

        public void setDelete(boolean delete) {
                if(delete){                     
                        getDeletedList().add(club.getIdClub());
                }
                
        }
        
        
        public List<String> getDeletedList() {
                if(deletedList == null){
                        deletedList = new ArrayList<String>();                  
        
                }
                return deletedList;
        }

        void pageLoaded(){
        clubModel = beanModelSource.create(Club.class, true, resources);
        clubModel.add("delete",null);
        clubModel.add("update",null);
                        
    }

        public Club getClub() {
                return club;
        }
        public void setClub(Club club) {
                this.club = club;
        }
        public IClubDao getClubDao() {
                return clubDao;
        }
        public List<Club> getClubList() {
                if(clubList == null){
                        clubList = new ArrayList<Club>();       
                        clubList = getClubDao().queryForList("", "");
                }
                
                return clubList;
        }
        
        public BeanModel getClubModel() {
                return clubModel;
        }
        
        Object onSuccessFromClubForm(){
                for (Iterator<String> iter = getDeletedList().iterator(); 
iter.hasNext();) {
                        String element = iter.next();
                        setClub((Club) getClubDao().findByPrimaryKey(element));
                        getClubDao().delete(getClub());
                                                                        
                }       
                deletedList = null;
                return GridClub.class;
        }

On 12/10/07, Cristian Gonzalo Gary <[EMAIL PROTECTED]> wrote:
>
> Hello
> I need to modified the Column label, and put into and image with a link .
>
> Thanks.
> Gracias.
> --
> View this message in context:
> http://www.nabble.com/-T5--How-Add-and-Image-to-Grid-Column-Label.-tp14242580p14242580.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to