There's no result after filter columns

3 views
Skip to first unread message

DuLi

unread,
Apr 22, 2008, 4:20:52 AM4/22/08
to JMesa
What puzzled me this time is that when I entered my String to filter
the column and press Enter, the result set is empty, but in fact it
should have some rows in the table. Because the filter string was
belong to the column cells.

The Items is map list in my project, but I think it doesn't matter to
the result.

Jeff Johnston

unread,
Apr 22, 2008, 8:18:30 AM4/22/08
to jm...@googlegroups.com

Are you having problems anytime you filter or on just a specific column with one of your items? Just trying to see if this is a specific use case or a global problem you are having.

-Jeff Johnston

DuLi

unread,
Apr 23, 2008, 2:41:05 AM4/23/08
to JMesa
When I use Beans to fill the items, it will work, but when I put maps
in items, it will get this problem, just like this,

public class Projectstruts extends ActionSupport{
public String execute() throws Exception{
HttpServletRequest request=ServletActionContext.getRequest();
String id="struts";
String [] dates = {"10/31/01",
"01/01/01", "03/05/01", "02/04/01"};
String [] it = {"Halloween", "New Years", "Birthday",
"Anniversary"};
Map itemsmap=new HashMap();
List itemslist=new ArrayList();
itemslist.add(itemsmap);
for(int i=0;i<it.length;i++){
itemsmap.put(it[i], dates[i]);
}
String [] dates2 = {"10/31/01", "01/01/01", "03/02/05","03/05/01"};
String [] dates3 = {"10/22/05", "02/03/03", "03/05/01", "02/04/01"};
Map itemsmap2=new HashMap();
for(int i=0;i<dates2.length;i++){
itemsmap2.put(it[i], dates2[i]);
}
Map itemsmap3=new HashMap();
for(int i=0;i<it.length;i++){
itemsmap3.put(it[i], dates3[i]);
}
itemslist.add(itemsmap2);
itemslist.add(itemsmap3);

Collection<List> items=itemslist;

TableFacade tableFacade = createTableFacade(id, request);

tableFacade.setEditable(false); // switch to flip that turns
the table editable

tableFacade.setItems(items); // set the items
tableFacade.setStateAttr("restore"); // return to the table in
the same state that the user left it

String html = getHtml(tableFacade,request);
request.setAttribute("Project", html);
return SUCCESS;
}

I've got the printscreen and upload it, is it a specific use case?

On 4月22日, 下午8时18分, "Jeff Johnston" <extremecompone...@gmail.com>
wrote:
> > the result.- 隐藏被引用文字 -
>
> - 显示引用的文字 -

Jeff Johnston

unread,
Apr 23, 2008, 12:21:19 PM4/23/08
to JMesa

It appears that filtering is not working with Maps. I stepped through
it and I can see that a change I put in a long time ago is the
problem. The change made working with beans much better, but broke
filtering Maps. Strange that no-one has complained before now as that
as been in for a really long time!

I will be sure to fix the problem. In addition I think there are one
or two small things I could do in the same area that are on the todo
list. It might be a couple weeks before I have the bug fix in. If you
need it sooner I could send you a build when I get this fixed and then
do an official release a little later.

Thank you for the detailed example!

-Jeff Johnston

DuLi

unread,
Apr 23, 2008, 9:30:31 PM4/23/08
to JMesa
Hi Jeff,
Maybe usually we construct data as beans but not maps, so this
problem was not found for so long. My project is not urgent, I just
focus myself on other problems.It's my pleasure.

Thanks!

DuLi
> > > - 显示引用的文字 -- 隐藏被引用文字 -
>
> - 显示引用的文字 -
Reply all
Reply to author
Forward
0 new messages