You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by henry <he...@yahoo.com> on 2011/06/02 12:02:43 UTC

adding link to datatable

hi guys am having some issues my code any help will do,am trying to add a
link to my datatable 
firstly i created the DetailPage class

//DetailPage class code
public DetailsPage(String id , IModel entryModel) {
        super(id,entryModel);

        Link link = new Link("link"){
            @Override
            public void onClick() {
                showDetails details = new showDetails(getEntry());
                setResponsePage(details);
            }
        };
   
        add(new Label("id",getEntry().getId()+""));
        add(link);
    }

    private PhoneTransferRequest getEntry(){
        return (PhoneTransferRequest)getDefaultModelObject();
    }

and i try adding the DetailPage panel to my datatable

IColumn[]columns = {new AbstractColumn<PhoneTransferRequest>(new
Model<String>("id")) {
        public void populateItem(Item cellItem, String componentId, IModel
rowModel)
        {
            cellItem.add(new DetailsPage(componentId, rowModel));
        }
        },
        new
ExportablePropertyColumn<PhoneTransferRequest>(Model.of("Initiator"),
"customerId" ),
        new
ExportablePropertyColumn<PhoneTransferRequest>(Model.of("StartTime"),
"startTime" ),
        new
ExportablePropertyColumn<PhoneTransferRequest>(Model.of("switchResponse"),
"switchResponse"),
        new
ExportablePropertyColumn<PhoneTransferRequest>(Model.of("SourceAccount"),
"sourceAccount"),
        new
ExportablePropertyColumn<PhoneTransferRequest>(Model.of("DestAccount"),
"destAccount"),
        new
ExportablePropertyColumn<PhoneTransferRequest>(Model.of("Amount"),
"amount"),
        new
ExportablePropertyColumn<PhoneTransferRequest>(Model.of("Notication"),
"notificationSent"),};

        //creating dataTable object
        DefaultDataTable dataTable1 = new
DefaultDataTable("datatable",columns,new PhoneTransferProvider(),30);

any time i run this code i get

an INTERNAL ERROR MESSAGE.

please i need to get this sorted out today.

Regards

--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/adding-link-to-datatable-tp3567971p3567971.html
Sent from the Users forum 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


Re: adding link to datatable

Posted by henry <he...@yahoo.com>.
Here is the detailspage.html hierarchy
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
        <title>DetailsPage</title>
        <link rel="stylesheet" type="text/css" href="style.css"/>
    </head>
        <wicket:panel>
            henry 
        </wicket:panel>
 
</html>

--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/adding-link-to-datatable-tp3567971p3568183.html
Sent from the Users forum 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


Re: adding link to datatable

Posted by henry <he...@yahoo.com>.
here is the DetailsPage hierarchy

//DetailsPage.html

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
        <title>DetailsPage</title>
        <link rel="stylesheet" type="text/css" href="style.css"/>
    </head>
        <wicket:panel>
            henry 
        </wicket:panel>
 
</html>


--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/adding-link-to-datatable-tp3567971p3568176.html
Sent from the Users forum 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


Re: adding link to datatable

Posted by James Carman <ja...@carmanconsulting.com>.
Class hierarchy.

On Thu, Jun 2, 2011 at 6:56 AM, James Carman <ja...@carmanconsulting.com> wrote:
> What is DetailsPage's hierarchy?
>
> On Thu, Jun 2, 2011 at 6:02 AM, henry <he...@yahoo.com> wrote:
>> hi guys am having some issues my code any help will do,am trying to add a
>> link to my datatable
>> firstly i created the DetailPage class
>>
>> //DetailPage class code
>> public DetailsPage(String id , IModel entryModel) {
>>        super(id,entryModel);
>>
>>        Link link = new Link("link"){
>>            @Override
>>            public void onClick() {
>>                showDetails details = new showDetails(getEntry());
>>                setResponsePage(details);
>>            }
>>        };
>>
>>        add(new Label("id",getEntry().getId()+""));
>>        add(link);
>>    }
>>
>>    private PhoneTransferRequest getEntry(){
>>        return (PhoneTransferRequest)getDefaultModelObject();
>>    }
>>
>> and i try adding the DetailPage panel to my datatable
>>
>> IColumn[]columns = {new AbstractColumn<PhoneTransferRequest>(new
>> Model<String>("id")) {
>>        public void populateItem(Item cellItem, String componentId, IModel
>> rowModel)
>>        {
>>            cellItem.add(new DetailsPage(componentId, rowModel));
>>        }
>>        },
>>        new
>> ExportablePropertyColumn<PhoneTransferRequest>(Model.of("Initiator"),
>> "customerId" ),
>>        new
>> ExportablePropertyColumn<PhoneTransferRequest>(Model.of("StartTime"),
>> "startTime" ),
>>        new
>> ExportablePropertyColumn<PhoneTransferRequest>(Model.of("switchResponse"),
>> "switchResponse"),
>>        new
>> ExportablePropertyColumn<PhoneTransferRequest>(Model.of("SourceAccount"),
>> "sourceAccount"),
>>        new
>> ExportablePropertyColumn<PhoneTransferRequest>(Model.of("DestAccount"),
>> "destAccount"),
>>        new
>> ExportablePropertyColumn<PhoneTransferRequest>(Model.of("Amount"),
>> "amount"),
>>        new
>> ExportablePropertyColumn<PhoneTransferRequest>(Model.of("Notication"),
>> "notificationSent"),};
>>
>>        //creating dataTable object
>>        DefaultDataTable dataTable1 = new
>> DefaultDataTable("datatable",columns,new PhoneTransferProvider(),30);
>>
>> any time i run this code i get
>>
>> an INTERNAL ERROR MESSAGE.
>>
>> please i need to get this sorted out today.
>>
>> Regards
>>
>> --
>> View this message in context: http://apache-wicket.1842946.n4.nabble.com/adding-link-to-datatable-tp3567971p3567971.html
>> Sent from the Users forum 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
>>
>>
>

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


Re: adding link to datatable

Posted by James Carman <ja...@carmanconsulting.com>.
What is DetailsPage's hierarchy?

On Thu, Jun 2, 2011 at 6:02 AM, henry <he...@yahoo.com> wrote:
> hi guys am having some issues my code any help will do,am trying to add a
> link to my datatable
> firstly i created the DetailPage class
>
> //DetailPage class code
> public DetailsPage(String id , IModel entryModel) {
>        super(id,entryModel);
>
>        Link link = new Link("link"){
>            @Override
>            public void onClick() {
>                showDetails details = new showDetails(getEntry());
>                setResponsePage(details);
>            }
>        };
>
>        add(new Label("id",getEntry().getId()+""));
>        add(link);
>    }
>
>    private PhoneTransferRequest getEntry(){
>        return (PhoneTransferRequest)getDefaultModelObject();
>    }
>
> and i try adding the DetailPage panel to my datatable
>
> IColumn[]columns = {new AbstractColumn<PhoneTransferRequest>(new
> Model<String>("id")) {
>        public void populateItem(Item cellItem, String componentId, IModel
> rowModel)
>        {
>            cellItem.add(new DetailsPage(componentId, rowModel));
>        }
>        },
>        new
> ExportablePropertyColumn<PhoneTransferRequest>(Model.of("Initiator"),
> "customerId" ),
>        new
> ExportablePropertyColumn<PhoneTransferRequest>(Model.of("StartTime"),
> "startTime" ),
>        new
> ExportablePropertyColumn<PhoneTransferRequest>(Model.of("switchResponse"),
> "switchResponse"),
>        new
> ExportablePropertyColumn<PhoneTransferRequest>(Model.of("SourceAccount"),
> "sourceAccount"),
>        new
> ExportablePropertyColumn<PhoneTransferRequest>(Model.of("DestAccount"),
> "destAccount"),
>        new
> ExportablePropertyColumn<PhoneTransferRequest>(Model.of("Amount"),
> "amount"),
>        new
> ExportablePropertyColumn<PhoneTransferRequest>(Model.of("Notication"),
> "notificationSent"),};
>
>        //creating dataTable object
>        DefaultDataTable dataTable1 = new
> DefaultDataTable("datatable",columns,new PhoneTransferProvider(),30);
>
> any time i run this code i get
>
> an INTERNAL ERROR MESSAGE.
>
> please i need to get this sorted out today.
>
> Regards
>
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/adding-link-to-datatable-tp3567971p3567971.html
> Sent from the Users forum 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
>
>

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