You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Amol Yadwadkar <ay...@webifyservices.com> on 2003/07/31 07:44:56 UTC
Table Sorting on the Selection ComboBox Item
Hi MindBridge,
I am using the powerful Table Component developed by u.I am stuck at some Strange Problem!!!!!
Problem Statement :--
A>> I have dispalayed Table with all Sorting and Paging Mechanism.
B>> Sorting is done onClick of Table Column Heading which is very fine!!!!
C>> I will like to provide one more Sorting Mechanism on the same Page.
D>> What I am doing is :---
D.1 >> I have one ComboBox which is populated with all Column Headings from the respective Table
D.2 >> On Selection of those ComboBox Items .....I need to sort the respective Column Heading (ASCENDING)
How can I proceed with this?
It will be the greatest Help from u in solving the above.
Thankx
Best Regds,
Amol
Re: Table Sorting on the Selection ComboBox Item
Posted by Amol Yadwadkar <ay...@webifyservices.com>.
Hi MB,
Unfortunatelly I am not getting it wright.
Pls find an Attachment for .page,.html and .java
Thankx for all the Support!!!
Best regds,
Amol
----- Original Message -----
From: "Mindbridge" <mi...@yahoo.com>
To: "Tapestry users" <ta...@jakarta.apache.org>; "Amol Yadwadkar"
<ay...@webifyservices.com>
Sent: Thursday, July 31, 2003 1:41 PM
Subject: Re: Table Sorting on the Selection ComboBox Item
> Hi Amol,
>
> I do not think this would work for the reasons I mentioned in my previous
> email. What you are getting with getTableModel() is most likely not the
> correct table model and changing it has no effect whatsoever.
>
> As for the compile errors -- please see if you can do something about
> them -- what I sent was essentially only a sample. At the very least you
> would need to add "import
> org.apache.tapestry.contrib.table.components.Table;" to you Java file.
>
> If you cannot get it to work, can you send over the .page file of that
page?
> I will see if I can adapt it.
>
> Best regards,
> -mb
>
> ----- Original Message -----
> From: "Amol Yadwadkar" <ay...@webifyservices.com>
> To: "Tapestry users" <ta...@jakarta.apache.org>
> Sent: Thursday, July 31, 2003 10:58 AM
> Subject: Re: Table Sorting on the Selection ComboBox Item
>
>
> > Hi MB,
> > Actually I have defined method getTableModel() and this I am calling in
> the
> > same class.
> > What I doing as follows:-
> > public void TableProperties(IRequestCycle cycle){
> >
> > ITableModel itable=getTableModel();
> >
> > itable.getSortingState().setSortColumn("name",
> > ITableSortingState.SORT_ASCENDING);
> >
> > }
> >
> > So on some Action I am expecting the "name" Column get sorted
"ASCENDING"
> > .(This is my thinking)
> >
> > I have tried giving ........
> >
> > ITableModel itable = ((Table) getComponent("table")).getTableModel();
> > ///Compile Errors
> >
> > Can u pls guide me in littile Details!!!
> >
> > Pls Correct me If I am wrong anywhere.
> >
> > Thankx
> >
> > Best Regds,
> >
> > Amol
> >
> >
> >
> >
> >
> >
> > ----- Original Message -----
> > From: "Mindbridge" <mi...@yahoo.com>
> > To: "Tapestry users" <ta...@jakarta.apache.org>; "Amol
Yadwadkar"
> > <ay...@webifyservices.com>
> > Sent: Thursday, July 31, 2003 1:11 PM
> > Subject: Re: Table Sorting on the Selection ComboBox Item
> >
> >
> > > Hi Amol,
> > >
> > > Instead of
> > > > ITableModel itable=getTableModel();
> > >
> > > Try the following (assuming your Table component is named 'table'; it
> > could
> > > be the TableView component as well):
> > >
> > > ITableModel itable = ((Table) getComponent("table")).getTableModel()
> > >
> > > This will get the model that is actually used by the table, while my
> guess
> > > is that the getTableMode() creates a new one and modifying it is
> > > inconsequential.
> > >
> > > Does this work?
> > >
> > > -mb
> > >
> > > ----- Original Message -----
> > > From: "Amol Yadwadkar" <ay...@webifyservices.com>
> > > To: "Tapestry users" <ta...@jakarta.apache.org>; "Amol
> Yadwadkar"
> > > <ay...@webifyservices.com>
> > > Sent: Thursday, July 31, 2003 10:35 AM
> > > Subject: Re: Table Sorting on the Selection ComboBox Item
> > >
> > >
> > > > Hi MindBridge,
> > > > Just to add
> > > > FYI :- I am using the following
> > > > ITableModel itable=getTableModel();
> > > >
> > > > itable.getSortingState().setSortColumn("name",
> > > > ITableSortingState.SORT_ASCENDING);
> > > >
> > > > But not getting the expected............
> > > >
> > > > Thankx
> > > >
> > > > Best regds,
> > > >
> > > > Amol
> > > >
> > > >
> > > >
> > > > ----- Original Message -----
> > > > From: "Amol Yadwadkar" <ay...@webifyservices.com>
> > > > To: "Tapestry users" <ta...@jakarta.apache.org>
> > > > Sent: Thursday, July 31, 2003 11:14 AM
> > > > Subject: Table Sorting on the Selection ComboBox Item
> > > >
> > > >
> > > > Hi MindBridge,
> > > > I am using the powerful Table Component developed by u.I am stuck at
> > some
> > > > Strange Problem!!!!!
> > > >
> > > > Problem Statement :--
> > > >
> > > > A>> I have dispalayed Table with all Sorting and Paging Mechanism.
> > > > B>> Sorting is done onClick of Table Column Heading which is very
> > fine!!!!
> > > > C>> I will like to provide one more Sorting Mechanism on the same
> Page.
> > > > D>> What I am doing is :---
> > > > D.1 >> I have one ComboBox which is populated with all
Column
> > > > Headings from the respective Table
> > > > D.2 >> On Selection of those ComboBox Items .....I need to
> sort
> > > the
> > > > respective Column Heading (ASCENDING)
> > > >
> > > > How can I proceed with this?
> > > > It will be the greatest Help from u in solving the above.
> > > > Thankx
> > > > Best Regds,
> > > > Amol
> > > >
> > > >
> > > >
> > > >
> > > >
> > >
> ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> > > > For additional commands, e-mail:
tapestry-user-help@jakarta.apache.org
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> > >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
Re: Table Sorting on the Selection ComboBox Item
Posted by Mindbridge <mi...@yahoo.com>.
Hi Amol,
I do not think this would work for the reasons I mentioned in my previous
email. What you are getting with getTableModel() is most likely not the
correct table model and changing it has no effect whatsoever.
As for the compile errors -- please see if you can do something about
them -- what I sent was essentially only a sample. At the very least you
would need to add "import
org.apache.tapestry.contrib.table.components.Table;" to you Java file.
If you cannot get it to work, can you send over the .page file of that page?
I will see if I can adapt it.
Best regards,
-mb
----- Original Message -----
From: "Amol Yadwadkar" <ay...@webifyservices.com>
To: "Tapestry users" <ta...@jakarta.apache.org>
Sent: Thursday, July 31, 2003 10:58 AM
Subject: Re: Table Sorting on the Selection ComboBox Item
> Hi MB,
> Actually I have defined method getTableModel() and this I am calling in
the
> same class.
> What I doing as follows:-
> public void TableProperties(IRequestCycle cycle){
>
> ITableModel itable=getTableModel();
>
> itable.getSortingState().setSortColumn("name",
> ITableSortingState.SORT_ASCENDING);
>
> }
>
> So on some Action I am expecting the "name" Column get sorted "ASCENDING"
> .(This is my thinking)
>
> I have tried giving ........
>
> ITableModel itable = ((Table) getComponent("table")).getTableModel();
> ///Compile Errors
>
> Can u pls guide me in littile Details!!!
>
> Pls Correct me If I am wrong anywhere.
>
> Thankx
>
> Best Regds,
>
> Amol
>
>
>
>
>
>
> ----- Original Message -----
> From: "Mindbridge" <mi...@yahoo.com>
> To: "Tapestry users" <ta...@jakarta.apache.org>; "Amol Yadwadkar"
> <ay...@webifyservices.com>
> Sent: Thursday, July 31, 2003 1:11 PM
> Subject: Re: Table Sorting on the Selection ComboBox Item
>
>
> > Hi Amol,
> >
> > Instead of
> > > ITableModel itable=getTableModel();
> >
> > Try the following (assuming your Table component is named 'table'; it
> could
> > be the TableView component as well):
> >
> > ITableModel itable = ((Table) getComponent("table")).getTableModel()
> >
> > This will get the model that is actually used by the table, while my
guess
> > is that the getTableMode() creates a new one and modifying it is
> > inconsequential.
> >
> > Does this work?
> >
> > -mb
> >
> > ----- Original Message -----
> > From: "Amol Yadwadkar" <ay...@webifyservices.com>
> > To: "Tapestry users" <ta...@jakarta.apache.org>; "Amol
Yadwadkar"
> > <ay...@webifyservices.com>
> > Sent: Thursday, July 31, 2003 10:35 AM
> > Subject: Re: Table Sorting on the Selection ComboBox Item
> >
> >
> > > Hi MindBridge,
> > > Just to add
> > > FYI :- I am using the following
> > > ITableModel itable=getTableModel();
> > >
> > > itable.getSortingState().setSortColumn("name",
> > > ITableSortingState.SORT_ASCENDING);
> > >
> > > But not getting the expected............
> > >
> > > Thankx
> > >
> > > Best regds,
> > >
> > > Amol
> > >
> > >
> > >
> > > ----- Original Message -----
> > > From: "Amol Yadwadkar" <ay...@webifyservices.com>
> > > To: "Tapestry users" <ta...@jakarta.apache.org>
> > > Sent: Thursday, July 31, 2003 11:14 AM
> > > Subject: Table Sorting on the Selection ComboBox Item
> > >
> > >
> > > Hi MindBridge,
> > > I am using the powerful Table Component developed by u.I am stuck at
> some
> > > Strange Problem!!!!!
> > >
> > > Problem Statement :--
> > >
> > > A>> I have dispalayed Table with all Sorting and Paging Mechanism.
> > > B>> Sorting is done onClick of Table Column Heading which is very
> fine!!!!
> > > C>> I will like to provide one more Sorting Mechanism on the same
Page.
> > > D>> What I am doing is :---
> > > D.1 >> I have one ComboBox which is populated with all Column
> > > Headings from the respective Table
> > > D.2 >> On Selection of those ComboBox Items .....I need to
sort
> > the
> > > respective Column Heading (ASCENDING)
> > >
> > > How can I proceed with this?
> > > It will be the greatest Help from u in solving the above.
> > > Thankx
> > > Best Regds,
> > > Amol
> > >
> > >
> > >
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: Table Sorting on the Selection ComboBox Item
Posted by Amol Yadwadkar <ay...@webifyservices.com>.
Hi MB,
Actually I have defined method getTableModel() and this I am calling in the
same class.
What I doing as follows:-
public void TableProperties(IRequestCycle cycle){
ITableModel itable=getTableModel();
itable.getSortingState().setSortColumn("name",
ITableSortingState.SORT_ASCENDING);
}
So on some Action I am expecting the "name" Column get sorted "ASCENDING"
.(This is my thinking)
I have tried giving ........
ITableModel itable = ((Table) getComponent("table")).getTableModel();
///Compile Errors
Can u pls guide me in littile Details!!!
Pls Correct me If I am wrong anywhere.
Thankx
Best Regds,
Amol
----- Original Message -----
From: "Mindbridge" <mi...@yahoo.com>
To: "Tapestry users" <ta...@jakarta.apache.org>; "Amol Yadwadkar"
<ay...@webifyservices.com>
Sent: Thursday, July 31, 2003 1:11 PM
Subject: Re: Table Sorting on the Selection ComboBox Item
> Hi Amol,
>
> Instead of
> > ITableModel itable=getTableModel();
>
> Try the following (assuming your Table component is named 'table'; it
could
> be the TableView component as well):
>
> ITableModel itable = ((Table) getComponent("table")).getTableModel()
>
> This will get the model that is actually used by the table, while my guess
> is that the getTableMode() creates a new one and modifying it is
> inconsequential.
>
> Does this work?
>
> -mb
>
> ----- Original Message -----
> From: "Amol Yadwadkar" <ay...@webifyservices.com>
> To: "Tapestry users" <ta...@jakarta.apache.org>; "Amol Yadwadkar"
> <ay...@webifyservices.com>
> Sent: Thursday, July 31, 2003 10:35 AM
> Subject: Re: Table Sorting on the Selection ComboBox Item
>
>
> > Hi MindBridge,
> > Just to add
> > FYI :- I am using the following
> > ITableModel itable=getTableModel();
> >
> > itable.getSortingState().setSortColumn("name",
> > ITableSortingState.SORT_ASCENDING);
> >
> > But not getting the expected............
> >
> > Thankx
> >
> > Best regds,
> >
> > Amol
> >
> >
> >
> > ----- Original Message -----
> > From: "Amol Yadwadkar" <ay...@webifyservices.com>
> > To: "Tapestry users" <ta...@jakarta.apache.org>
> > Sent: Thursday, July 31, 2003 11:14 AM
> > Subject: Table Sorting on the Selection ComboBox Item
> >
> >
> > Hi MindBridge,
> > I am using the powerful Table Component developed by u.I am stuck at
some
> > Strange Problem!!!!!
> >
> > Problem Statement :--
> >
> > A>> I have dispalayed Table with all Sorting and Paging Mechanism.
> > B>> Sorting is done onClick of Table Column Heading which is very
fine!!!!
> > C>> I will like to provide one more Sorting Mechanism on the same Page.
> > D>> What I am doing is :---
> > D.1 >> I have one ComboBox which is populated with all Column
> > Headings from the respective Table
> > D.2 >> On Selection of those ComboBox Items .....I need to sort
> the
> > respective Column Heading (ASCENDING)
> >
> > How can I proceed with this?
> > It will be the greatest Help from u in solving the above.
> > Thankx
> > Best Regds,
> > Amol
> >
> >
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
Re: Table Sorting on the Selection ComboBox Item
Posted by Mindbridge <mi...@yahoo.com>.
Hi Amol,
Instead of
> ITableModel itable=getTableModel();
Try the following (assuming your Table component is named 'table'; it could
be the TableView component as well):
ITableModel itable = ((Table) getComponent("table")).getTableModel()
This will get the model that is actually used by the table, while my guess
is that the getTableMode() creates a new one and modifying it is
inconsequential.
Does this work?
-mb
----- Original Message -----
From: "Amol Yadwadkar" <ay...@webifyservices.com>
To: "Tapestry users" <ta...@jakarta.apache.org>; "Amol Yadwadkar"
<ay...@webifyservices.com>
Sent: Thursday, July 31, 2003 10:35 AM
Subject: Re: Table Sorting on the Selection ComboBox Item
> Hi MindBridge,
> Just to add
> FYI :- I am using the following
> ITableModel itable=getTableModel();
>
> itable.getSortingState().setSortColumn("name",
> ITableSortingState.SORT_ASCENDING);
>
> But not getting the expected............
>
> Thankx
>
> Best regds,
>
> Amol
>
>
>
> ----- Original Message -----
> From: "Amol Yadwadkar" <ay...@webifyservices.com>
> To: "Tapestry users" <ta...@jakarta.apache.org>
> Sent: Thursday, July 31, 2003 11:14 AM
> Subject: Table Sorting on the Selection ComboBox Item
>
>
> Hi MindBridge,
> I am using the powerful Table Component developed by u.I am stuck at some
> Strange Problem!!!!!
>
> Problem Statement :--
>
> A>> I have dispalayed Table with all Sorting and Paging Mechanism.
> B>> Sorting is done onClick of Table Column Heading which is very fine!!!!
> C>> I will like to provide one more Sorting Mechanism on the same Page.
> D>> What I am doing is :---
> D.1 >> I have one ComboBox which is populated with all Column
> Headings from the respective Table
> D.2 >> On Selection of those ComboBox Items .....I need to sort
the
> respective Column Heading (ASCENDING)
>
> How can I proceed with this?
> It will be the greatest Help from u in solving the above.
> Thankx
> Best Regds,
> Amol
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: Table Sorting on the Selection ComboBox Item
Posted by Amol Yadwadkar <ay...@webifyservices.com>.
Hi MindBridge,
Just to add
FYI :- I am using the following
ITableModel itable=getTableModel();
itable.getSortingState().setSortColumn("name",
ITableSortingState.SORT_ASCENDING);
But not getting the expected............
Thankx
Best regds,
Amol
----- Original Message -----
From: "Amol Yadwadkar" <ay...@webifyservices.com>
To: "Tapestry users" <ta...@jakarta.apache.org>
Sent: Thursday, July 31, 2003 11:14 AM
Subject: Table Sorting on the Selection ComboBox Item
Hi MindBridge,
I am using the powerful Table Component developed by u.I am stuck at some
Strange Problem!!!!!
Problem Statement :--
A>> I have dispalayed Table with all Sorting and Paging Mechanism.
B>> Sorting is done onClick of Table Column Heading which is very fine!!!!
C>> I will like to provide one more Sorting Mechanism on the same Page.
D>> What I am doing is :---
D.1 >> I have one ComboBox which is populated with all Column
Headings from the respective Table
D.2 >> On Selection of those ComboBox Items .....I need to sort the
respective Column Heading (ASCENDING)
How can I proceed with this?
It will be the greatest Help from u in solving the above.
Thankx
Best Regds,
Amol