RE: How to let a user click a column header to sort data in a t ab le u sing struts?
I did what you said but that still does not go, here the code of my page JSP. I would have forgotten something? %@ taglib uri=/WEB-INF/tld/struts-logic.tld prefix=logic % script src=sortTable.js/script html:form action=/myLookupDispatchAction.do method=GET %-- Add a vertical scroll bar to the list --% div style=overflow: auto; width: 597px; height: 100; padding:0px; margin:0px %-- List of ATM calls --% table id=table0 width=100% border=1 cellpadding=0 cellspacing=0 bordercolor=#FF %-- Title for the columns of the table --% tr bgcolor=#FFCC00 th align=left width=13%bean:message key=lable.id//th th align=left width=5%bean:message key=label.name//th th align=left width=9%bean:message key=label.type//th /tr logic:iterate id=elements name=list type=com.MyAppli offset=offset length=length tr bgcolor=#EBEBEB td bgcolor=#EBEBEB width=13% bean:write name=elements property=id/ /td td bgcolor=#EBEBEB width=5% bean:write name=elements property=name/ /td td bgcolor=#EBEBEB width=10% html:checkbox name=elements property=type value=on/ /td /tr /logic:iterate /table scriptinitTable(table0);/script /div /html:form I placed the file sortTable.js in the directory where I placed the JSP file. How can I be certain that script is called? Thanks a lot in advance -Original Message- From: Thomas CORNET [mailto:[EMAIL PROTECTED]] Sent: 15 January 2003 22:31 To: Struts Users Mailing List Subject: RE: How to let a user click a column header to sort data in a t ab le u sing struts? To resolve your problem, here is what you can do : write scriptinitTable(table0);/script after the tag /table of your table. The script only needs the contents of the table to be loaded. Putting the code on the onLoad event of the body make sure the script is executed after the whole page has been loaded, but putting this line of code instead, at the bottom of the page, works fine, I've just tested it. Thomas At 18:24 15/01/2003, you wrote: That seems indeed very simple but I will know if somebody uses it with the Tiles components. Because with these components we do not write with the hand JSP pages and more particularly the tag body attached to each page. The page is build with the content of the file tiles-def.xml. Moreover I do not understand exactly how does this work. And thus I do not see how to indicate the command onLoad='initTable(table0);' for init the table to sorting. This table can vary from one page to another, is it systematically necessary to put the same id? where do I have to put the JS command onLoad within a Tiles application? Thanks in advance. -Original Message- From: Jacob Hookom [mailto:[EMAIL PROTECTED]] Sent: 15 January 2003 15:09 To: 'Struts Users Mailing List' Subject: RE: How to let a user click a column header to sort data in a tab le u sing struts? BOMBZ!! That's really cool. It works in Mozilla too FYI. -Jacob | -Original Message- | From: Thomas CORNET [mailto:[EMAIL PROTECTED]] | Sent: Wednesday, January 15, 2003 7:55 AM | To: Struts Users Mailing List | Subject: Re: How to let a user click a column header to sort data in a tab | le u sing struts? | | | Isn't it ? This is a friend of mine who has coded it, and it's working | well. Check out the attachement. | | Thomas | | At 14:40 15/01/2003 +0100, you wrote: | 2003. január 15. 14:39 dátummal Thomas CORNET ezt írtad: | Hello | | Do you need this sequence to be full JSP ?? Because JavaScript | librairies | exist to let you directly sort tables. Thus, no page reload is needed. | | Sounds interesting! Is it running on the popular browsers? Where can I | get | this? | | Tib | | -- | To unsubscribe, e-mail: mailto:struts-user- | [EMAIL PROTECTED] | For additional commands, e-mail: mailto:struts-user- | [EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: How to let a user click a column header to sort data in a t ab le u sing struts?
This kind of HTML code works with me... What error(s) do your brower display ? html head titletest/title /head body table id=table0 cellspacing=2 cellpadding=5 align=center bgcolor=black tr tdFirst Name/td tdLast Name/td /tr tr td bgcolor=whiteJohn/td td bgcolor=whiteDoe/td /tr tr td bgcolor=whiteZinedine/td td bgcolor=whiteZidane/td /tr tr td bgcolor=whiteAndre/td td bgcolor=whiteAgassi/td /tr tr td bgcolor=whiteAlbert/td td bgcolor=whiteEinstein/td /tr /tablebr script src=sortTable.js/script scriptinitTable(table0);/script /body /html At 09:32 16/01/2003 +0100, you wrote: I did what you said but that still does not go, here the code of my page JSP. I would have forgotten something? %@ taglib uri=/WEB-INF/tld/struts-logic.tld prefix=logic % script src=sortTable.js/script %-- Add a vertical scroll bar to the list --% %-- List of ATM calls --% %-- Title for the columns of the table --% I placed the file sortTable.js in the directory where I placed the JSP file. How can I be certain that script is called? Thanks a lot in advance -Original Message- From: Thomas CORNET [mailto:[EMAIL PROTECTED]] Sent: 15 January 2003 22:31 To: Struts Users Mailing List Subject: RE: How to let a user click a column header to sort data in a t ab le u sing struts? To resolve your problem, here is what you can do : write after the tag of your table. The script only needs the contents of the table to be loaded. Putting the code on the onLoad event of the body make sure the script is executed after the whole page has been loaded, but putting this line of code instead, at the bottom of the page, works fine, I've just tested it. Thomas At 18:24 15/01/2003, you wrote: That seems indeed very simple but I will know if somebody uses it with the Tiles components. Because with these components we do not write with the hand JSP pages and more particularly the tag body attached to each page. The page is build with the content of the file tiles-def.xml. Moreover I do not understand exactly how does this work. And thus I do not see how to indicate the command onLoad='initTable(table0);' for init the table to sorting. This table can vary from one page to another, is it systematically necessary to put the same id? where do I have to put the JS command onLoad within a Tiles application? Thanks in advance. -Original Message- From: Jacob Hookom [mailto:[EMAIL PROTECTED]] Sent: 15 January 2003 15:09 To: 'Struts Users Mailing List' Subject: RE: How to let a user click a column header to sort data in a tab le u sing struts? BOMBZ!! That's really cool. It works in Mozilla too FYI. -Jacob | -Original Message- | From: Thomas CORNET [mailto:[EMAIL PROTECTED]] | Sent: Wednesday, January 15, 2003 7:55 AM | To: Struts Users Mailing List | Subject: Re: How to let a user click a column header to sort data in a tab | le u sing struts? | | | Isn't it ? This is a friend of mine who has coded it, and it's working | well. Check out the attachement. | | Thomas | | At 14:40 15/01/2003 +0100, you wrote: | 2003. január 15. 14:39 dátummal Thomas CORNET ezt írtad: | Hello | | Do you need this sequence to be full JSP ?? Because JavaScript | librairies | exist to let you directly sort tables. Thus, no page reload is needed. | | Sounds interesting! Is it running on the popular browsers? Where can I | get | this? | | Tib | | -- | To unsubscribe, e-mail: | [EMAIL PROTECTED] | For additional commands, e-mail: | [EMAIL PROTECTED]-- To unsubscribe, e-mail: For additional commands, e-mail: -- To unsubscribe, e-mail: For additional commands, e-mail: -- To unsubscribe, e-mail: For additional commands, e-mail: -- To unsubscribe, e-mail: For additional commands, e-mail: -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: How to let a user click a column header to sort data in a t ab le u sing struts?
I placed your code in my JSP page, I can view the table but I didn't see the name of the column (header name) and I can't sort the table. Do you have an idea ? -Original Message- From: Thomas CORNET [mailto:[EMAIL PROTECTED]] Sent: 16 January 2003 09:46 To: Struts Users Mailing List Subject: RE: How to let a user click a column header to sort data in a t ab le u sing struts? This kind of HTML code works with me... What error(s) do your brower display ? html head titletest/title /head body table id=table0 cellspacing=2 cellpadding=5 align=center bgcolor=black tr tdFirst Name/td tdLast Name/td /tr tr td bgcolor=whiteJohn/td td bgcolor=whiteDoe/td /tr tr td bgcolor=whiteZinedine/td td bgcolor=whiteZidane/td /tr tr td bgcolor=whiteAndre/td td bgcolor=whiteAgassi/td /tr tr td bgcolor=whiteAlbert/td td bgcolor=whiteEinstein/td /tr /tablebr script src=sortTable.js/script scriptinitTable(table0);/script /body /html At 09:32 16/01/2003 +0100, you wrote: I did what you said but that still does not go, here the code of my page JSP. I would have forgotten something? %@ taglib uri=/WEB-INF/tld/struts-logic.tld prefix=logic % script src=sortTable.js/script %-- Add a vertical scroll bar to the list --% %-- List of ATM calls --% %-- Title for the columns of the table --% I placed the file sortTable.js in the directory where I placed the JSP file. How can I be certain that script is called? Thanks a lot in advance -Original Message- From: Thomas CORNET [mailto:[EMAIL PROTECTED]] Sent: 15 January 2003 22:31 To: Struts Users Mailing List Subject: RE: How to let a user click a column header to sort data in a t ab le u sing struts? To resolve your problem, here is what you can do : write after the tag of your table. The script only needs the contents of the table to be loaded. Putting the code on the onLoad event of the body make sure the script is executed after the whole page has been loaded, but putting this line of code instead, at the bottom of the page, works fine, I've just tested it. Thomas At 18:24 15/01/2003, you wrote: That seems indeed very simple but I will know if somebody uses it with the Tiles components. Because with these components we do not write with the hand JSP pages and more particularly the tag body attached to each page. The page is build with the content of the file tiles-def.xml. Moreover I do not understand exactly how does this work. And thus I do not see how to indicate the command onLoad='initTable(table0);' for init the table to sorting. This table can vary from one page to another, is it systematically necessary to put the same id? where do I have to put the JS command onLoad within a Tiles application? Thanks in advance. -Original Message- From: Jacob Hookom [mailto:[EMAIL PROTECTED]] Sent: 15 January 2003 15:09 To: 'Struts Users Mailing List' Subject: RE: How to let a user click a column header to sort data in a tab le u sing struts? BOMBZ!! That's really cool. It works in Mozilla too FYI. -Jacob | -Original Message- | From: Thomas CORNET [mailto:[EMAIL PROTECTED]] | Sent: Wednesday, January 15, 2003 7:55 AM | To: Struts Users Mailing List | Subject: Re: How to let a user click a column header to sort data in a tab | le u sing struts? | | | Isn't it ? This is a friend of mine who has coded it, and it's working | well. Check out the attachement. | | Thomas | | At 14:40 15/01/2003 +0100, you wrote: | 2003. január 15. 14:39 dátummal Thomas CORNET ezt írtad: | Hello | | Do you need this sequence to be full JSP ?? Because JavaScript | librairies | exist to let you directly sort tables. Thus, no page reload is needed. | | Sounds interesting! Is it running on the popular browsers? Where can I | get | this? | | Tib | | -- | To unsubscribe, e-mail: | [EMAIL PROTECTED] | For additional commands, e-mail: | [EMAIL PROTECTED]-- To unsubscribe, e-mail: For additional commands, e-mail: -- To unsubscribe, e-mail: For additional commands, e-mail: -- To unsubscribe, e-mail: For additional commands, e-mail: -- To unsubscribe, e-mail: For additional commands, e-mail: -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional
RE: How to let a user click a column header to sort data in a t ab le u sing struts?
Try this... At 10:21 16/01/2003 +0100, you wrote: I placed your code in my JSP page, I can view the table but I didn't see the name of the column (header name) and I can't sort the table. Do you have an idea ? -Original Message- From: Thomas CORNET [mailto:[EMAIL PROTECTED]] Sent: 16 January 2003 09:46 To: Struts Users Mailing List Subject: RE: How to let a user click a column header to sort data in a t ab le u sing struts? This kind of HTML code works with me... What error(s) do your brower display ? First Name Last Name John Doe Zinedine Zidane Andre Agassi Albert Einstein At 09:32 16/01/2003 +0100, you wrote: I did what you said but that still does not go, here the code of my page JSP. I would have forgotten something? %@ taglib uri=/WEB-INF/tld/struts-logic.tld prefix=logic % script src=sortTable.js/script %-- Add a vertical scroll bar to the list --% %-- List of ATM calls --% %-- Title for the columns of the table --% I placed the file sortTable.js in the directory where I placed the JSP file. How can I be certain that script is called? Thanks a lot in advance -Original Message- From: Thomas CORNET [mailto:[EMAIL PROTECTED]] Sent: 15 January 2003 22:31 To: Struts Users Mailing List Subject: RE: How to let a user click a column header to sort data in a t ab le u sing struts? To resolve your problem, here is what you can do : write after the tag of your table. The script only needs the contents of the table to be loaded. Putting the code on the onLoad event of the body make sure the script is executed after the whole page has been loaded, but putting this line of code instead, at the bottom of the page, works fine, I've just tested it. Thomas At 18:24 15/01/2003, you wrote: That seems indeed very simple but I will know if somebody uses it with the Tiles components. Because with these components we do not write with the hand JSP pages and more particularly the tag body attached to each page. The page is build with the content of the file tiles-def.xml. Moreover I do not understand exactly how does this work. And thus I do not see how to indicate the command onLoad='initTable(table0);' for init the table to sorting. This table can vary from one page to another, is it systematically necessary to put the same id? where do I have to put the JS command onLoad within a Tiles application? Thanks in advance. -Original Message- From: Jacob Hookom [mailto:[EMAIL PROTECTED]] Sent: 15 January 2003 15:09 To: 'Struts Users Mailing List' Subject: RE: How to let a user click a column header to sort data in a tab le u sing struts? BOMBZ!! That's really cool. It works in Mozilla too FYI. -Jacob | -Original Message- | From: Thomas CORNET [mailto:[EMAIL PROTECTED]] | Sent: Wednesday, January 15, 2003 7:55 AM | To: Struts Users Mailing List | Subject: Re: How to let a user click a column header to sort data in a tab | le u sing struts? | | | Isn't it ? This is a friend of mine who has coded it, and it's working | well. Check out the attachement. | | Thomas | | At 14:40 15/01/2003 +0100, you wrote: | 2003. január 15. 14:39 dátummal Thomas CORNET ezt írtad: | Hello | | Do you need this sequence to be full JSP ?? Because JavaScript | librairies | exist to let you directly sort tables. Thus, no page reload is needed. | | Sounds interesting! Is it running on the popular browsers? Where can I | get | this? | | Tib | | -- | To unsubscribe, e-mail: | [EMAIL PROTECTED] | For additional commands, e-mail: | [EMAIL PROTECTED]-- To unsubscribe, e-mail: For additional commands, e-mail: -- To unsubscribe, e-mail: For additional commands, e-mail: -- To unsubscribe, e-mail: For additional commands, e-mail: -- To unsubscribe, e-mail: For additional commands, e-mail: -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] sort.zip Description: Zip archive -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: How to let a user click a column header to sort data in a t ab le u sing struts?
Hi Sandra. For each column header you need a link that gives the required parameters to your Action. You can add 1 static and one dynamic parameter. If you need more dynamic parameters, you need to add a map. Without map: html:link page=/sortmyRecords.do?staticparameterName=columName paramName=BeanNameorFormName paramId=dynamicParameterName paramProperty=parameterValueColumn Name/html:link With MapMap: html:link page=/sortmyRecords.do name=BeanNameorFormName property=MapParameterNameColumn Name/html:link And have a look at: http://localhost:8080/struts-documentation/struts-html.html#link http://localhost:8080/struts-exercise-taglib/html-link.jsp hope this helps. marcus [EMAIL PROTECTED] schrieb: I placed your code in my JSP page, I can view the table but I didn't see the name of the column (header name) and I can't sort the table. Do you have an idea ? -Original Message- From: Thomas CORNET [mailto:[EMAIL PROTECTED]] Sent: 16 January 2003 09:46 To: Struts Users Mailing List Subject: RE: How to let a user click a column header to sort data in a t ab le u sing struts? This kind of HTML code works with me... What error(s) do your brower display ? html head titletest/title /head body table id=table0 cellspacing=2 cellpadding=5 align=center bgcolor=black tr tdFirst Name/td tdLast Name/td /tr tr td bgcolor=whiteJohn/td td bgcolor=whiteDoe/td /tr tr td bgcolor=whiteZinedine/td td bgcolor=whiteZidane/td /tr tr td bgcolor=whiteAndre/td td bgcolor=whiteAgassi/td /tr tr td bgcolor=whiteAlbert/td td bgcolor=whiteEinstein/td /tr /tablebr script src=sortTable.js/script scriptinitTable(table0);/script /body /html At 09:32 16/01/2003 +0100, you wrote: I did what you said but that still does not go, here the code of my page JSP. I would have forgotten something? %@ taglib uri=/WEB-INF/tld/struts-logic.tld prefix=logic % script src=sortTable.js/script %-- Add a vertical scroll bar to the list --% %-- List of ATM calls --% %-- Title for the columns of the table --% I placed the file sortTable.js in the directory where I placed the JSP file. How can I be certain that script is called? Thanks a lot in advance -Original Message- From: Thomas CORNET [mailto:[EMAIL PROTECTED]] Sent: 15 January 2003 22:31 To: Struts Users Mailing List Subject: RE: How to let a user click a column header to sort data in a t ab le u sing struts? To resolve your problem, here is what you can do : write after the tag of your table. The script only needs the contents of the table to be loaded. Putting the code on the onLoad event of the body make sure the script is executed after the whole page has been loaded, but putting this line of code instead, at the bottom of the page, works fine, I've just tested it. Thomas At 18:24 15/01/2003, you wrote: That seems indeed very simple but I will know if somebody uses it with the Tiles components. Because with these components we do not write with the hand JSP pages and more particularly the tag body attached to each page. The page is build with the content of the file tiles-def.xml. Moreover I do not understand exactly how does this work. And thus I do not see how to indicate the command onLoad='initTable(table0);' for init the table to sorting. This table can vary from one page to another, is it systematically necessary to put the same id? where do I have to put the JS command onLoad within a Tiles application? Thanks in advance. -Original Message- From: Jacob Hookom [mailto:[EMAIL PROTECTED]] Sent: 15 January 2003 15:09 To: 'Struts Users Mailing List' Subject: RE: How to let a user click a column header to sort data in a tab le u sing struts? BOMBZ!! That's really cool. It works in Mozilla too FYI. -Jacob | -Original Message- | From: Thomas CORNET [mailto:[EMAIL PROTECTED]] | Sent: Wednesday, January 15, 2003 7:55 AM | To: Struts Users Mailing List | Subject: Re: How to let a user click a column header to sort data in a tab | le u sing struts? | | | Isn't it ? This is a friend of mine who has coded it, and it's working | well. Check out the attachement. | | Thomas | | At 14:40 15/01/2003 +0100, you wrote: | 2003. január 15. 14:39 dátummal Thomas CORNET ezt írtad: | Hello | | Do you need this
RE: How to let a user click a column header to sort data in a t ab le u sing struts?
Hi Marcus, I don't understand why you speak about a tag html:link page=/sortmyRecords.do?, the aim of the script sortTable.js, is to update the page at the client side no request is done to the server. Isn't it ? If we use an action to sort the list, a request is sent to the server and the web server send a new page. The server will be overloaded rapidly. -Original Message- From: Marcus Biel [mailto:[EMAIL PROTECTED]] Sent: 16 January 2003 10:37 To: [EMAIL PROTECTED] Subject: Re: How to let a user click a column header to sort data in a t ab le u sing struts? Hi Sandra. For each column header you need a link that gives the required parameters to your Action. You can add 1 static and one dynamic parameter. If you need more dynamic parameters, you need to add a map. Without map: html:link page=/sortmyRecords.do?staticparameterName=columName paramName=BeanNameorFormName paramId=dynamicParameterName paramProperty=parameterValueColumn Name/html:link With MapMap: html:link page=/sortmyRecords.do name=BeanNameorFormName property=MapParameterNameColumn Name/html:link And have a look at: http://localhost:8080/struts-documentation/struts-html.html#link http://localhost:8080/struts-exercise-taglib/html-link.jsp hope this helps. marcus [EMAIL PROTECTED] schrieb: I placed your code in my JSP page, I can view the table but I didn't see the name of the column (header name) and I can't sort the table. Do you have an idea ? -Original Message- From: Thomas CORNET [mailto:[EMAIL PROTECTED]] Sent: 16 January 2003 09:46 To: Struts Users Mailing List Subject: RE: How to let a user click a column header to sort data in a t ab le u sing struts? This kind of HTML code works with me... What error(s) do your brower display ? html head titletest/title /head body table id=table0 cellspacing=2 cellpadding=5 align=center bgcolor=black tr tdFirst Name/td tdLast Name/td /tr tr td bgcolor=whiteJohn/td td bgcolor=whiteDoe/td /tr tr td bgcolor=whiteZinedine/td td bgcolor=whiteZidane/td /tr tr td bgcolor=whiteAndre/td td bgcolor=whiteAgassi/td /tr tr td bgcolor=whiteAlbert/td td bgcolor=whiteEinstein/td /tr /tablebr script src=sortTable.js/script scriptinitTable(table0);/script /body /html At 09:32 16/01/2003 +0100, you wrote: I did what you said but that still does not go, here the code of my page JSP. I would have forgotten something? %@ taglib uri=/WEB-INF/tld/struts-logic.tld prefix=logic % script src=sortTable.js/script %-- Add a vertical scroll bar to the list --% %-- List of ATM calls --% %-- Title for the columns of the table --% I placed the file sortTable.js in the directory where I placed the JSP file. How can I be certain that script is called? Thanks a lot in advance -Original Message- From: Thomas CORNET [mailto:[EMAIL PROTECTED]] Sent: 15 January 2003 22:31 To: Struts Users Mailing List Subject: RE: How to let a user click a column header to sort data in a t ab le u sing struts? To resolve your problem, here is what you can do : write after the tag of your table. The script only needs the contents of the table to be loaded. Putting the code on the onLoad event of the body make sure the script is executed after the whole page has been loaded, but putting this line of code instead, at the bottom of the page, works fine, I've just tested it. Thomas At 18:24 15/01/2003, you wrote: That seems indeed very simple but I will know if somebody uses it with the Tiles components. Because with these components we do not write with the hand JSP pages and more particularly the tag body attached to each page. The page is build with the content of the file tiles-def.xml. Moreover I do not understand exactly how does this work. And thus I do not see how to indicate the command onLoad='initTable(table0);' for init the table to sorting. This table can vary from one page to another, is it systematically necessary to put the same id? where do I have to put the JS command onLoad within a Tiles application? Thanks in advance. -Original Message- From: Jacob Hookom [mailto:[EMAIL PROTECTED]] Sent: 15 January 2003 15:09 To: 'Struts Users Mailing List' Subject: RE: How to let a user click a column header to sort data in a tab le u sing struts? BOMBZ!!
Re: How to let a user click a column header to sort data in a t ab le u sing struts?
Oh - so you want to sort at the client side. Well then your in the wrong mailinglist! ;-) I mean you asked how to do it in struts. that's always on the server side. Of course you can do that with java script, but imho java script sucks! ;-) marcus [EMAIL PROTECTED] schrieb: Hi Marcus, I don't understand why you speak about a tag html:link page=/sortmyRecords.do?, the aim of the script sortTable.js, is to update the page at the client side no request is done to the server. Isn't it ? If we use an action to sort the list, a request is sent to the server and the web server send a new page. The server will be overloaded rapidly. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: How to let a user click a column header to sort data in a t ab le u sing struts?
2003. január 16. 14:55 dátummal Marcus Biel ezt írtad: I mean you asked how to do it in struts. that's always on the server side. Maybe but in this thread there was a script which did this, so that's the reason it is discussed here. Of course you can do that with java script, but imho java script sucks! ;-) Maybe, but sometimes it comes really handy. Tib -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: How to let a user click a column header to sort data in a t ab le u sing struts?
I finally found where to put the command onLoad='initTable(table0);' when we work with Tiles components. It is in fact in the jsp file which is used as model in which one definite inevitably a tag body. I thus put this JS command but the element table0 is defined in another jsp. is it possible? because that does not go. If the model file (classicLayout.jsp) is in a repertory different from the MyPage.jsp file that conatins the table0 defintion where must be to place the js file ?. I think that it is in the repertory which contains the classicLayout.jsp is true? -Original Message- From: Heligon Sandra Sent: 15 January 2003 18:25 To: 'Struts Users Mailing List' Cc: '[EMAIL PROTECTED]' Subject: RE: How to let a user click a column header to sort data in a t ab le u sing struts? That seems indeed very simple but I will know if somebody uses it with the Tiles components. Because with these components we do not write with the hand JSP pages and more particularly the tag body attached to each page. The page is build with the content of the file tiles-def.xml. Moreover I do not understand exactly how does this work. And thus I do not see how to indicate the command onLoad='initTable(table0);' for init the table to sorting. This table can vary from one page to another, is it systematically necessary to put the same id? where do I have to put the JS command onLoad within a Tiles application? Thanks in advance. -Original Message- From: Jacob Hookom [mailto:[EMAIL PROTECTED]] Sent: 15 January 2003 15:09 To: 'Struts Users Mailing List' Subject: RE: How to let a user click a column header to sort data in a tab le u sing struts? BOMBZ!! That's really cool. It works in Mozilla too FYI. -Jacob | -Original Message- | From: Thomas CORNET [mailto:[EMAIL PROTECTED]] | Sent: Wednesday, January 15, 2003 7:55 AM | To: Struts Users Mailing List | Subject: Re: How to let a user click a column header to sort data in a tab | le u sing struts? | | | Isn't it ? This is a friend of mine who has coded it, and it's working | well. Check out the attachement. | | Thomas | | At 14:40 15/01/2003 +0100, you wrote: | 2003. január 15. 14:39 dátummal Thomas CORNET ezt írtad: | Hello | | Do you need this sequence to be full JSP ?? Because JavaScript | librairies | exist to let you directly sort tables. Thus, no page reload is needed. | | Sounds interesting! Is it running on the popular browsers? Where can I | get | this? | | Tib | | -- | To unsubscribe, e-mail: mailto:struts-user- | [EMAIL PROTECTED] | For additional commands, e-mail: mailto:struts-user- | [EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: How to let a user click a column header to sort data in a t ab le u sing struts?
To resolve your problem, here is what you can do : write scriptinitTable(table0);/script after the tag /table of your table. The script only needs the contents of the table to be loaded. Putting the code on the onLoad event of the body make sure the script is executed after the whole page has been loaded, but putting this line of code instead, at the bottom of the page, works fine, I've just tested it. Thomas At 18:24 15/01/2003, you wrote: That seems indeed very simple but I will know if somebody uses it with the Tiles components. Because with these components we do not write with the hand JSP pages and more particularly the tag body attached to each page. The page is build with the content of the file tiles-def.xml. Moreover I do not understand exactly how does this work. And thus I do not see how to indicate the command onLoad='initTable(table0);' for init the table to sorting. This table can vary from one page to another, is it systematically necessary to put the same id? where do I have to put the JS command onLoad within a Tiles application? Thanks in advance. -Original Message- From: Jacob Hookom [mailto:[EMAIL PROTECTED]] Sent: 15 January 2003 15:09 To: 'Struts Users Mailing List' Subject: RE: How to let a user click a column header to sort data in a tab le u sing struts? BOMBZ!! That's really cool. It works in Mozilla too FYI. -Jacob | -Original Message- | From: Thomas CORNET [mailto:[EMAIL PROTECTED]] | Sent: Wednesday, January 15, 2003 7:55 AM | To: Struts Users Mailing List | Subject: Re: How to let a user click a column header to sort data in a tab | le u sing struts? | | | Isn't it ? This is a friend of mine who has coded it, and it's working | well. Check out the attachement. | | Thomas | | At 14:40 15/01/2003 +0100, you wrote: | 2003. január 15. 14:39 dátummal Thomas CORNET ezt írtad: | Hello | | Do you need this sequence to be full JSP ?? Because JavaScript | librairies | exist to let you directly sort tables. Thus, no page reload is needed. | | Sounds interesting! Is it running on the popular browsers? Where can I | get | this? | | Tib | | -- | To unsubscribe, e-mail: mailto:struts-user- | [EMAIL PROTECTED] | For additional commands, e-mail: mailto:struts-user- | [EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]