This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problem Refreshing a JSP within itself.........

 
Gabriel Fox
Ranch Hand
Posts: 170
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am writing a JSP which removes items from a top LIST box to
dynamically generate a Table below on the same page.
And removing rows from the table to add back to the Top List.
This is working well, EXCEPT that on removing one or more rows
the items contained in the removed rows are not added to the top
List immediately.Since the code generating the List
(dynamically from a Query) as been by-passed before removing the
rows. So, the items removed are added on display after the next
request(submission of the form).
Please, how can i RELOAD the page within itself to go back to
the Logic (scriptlet block)on top which generate the list
before any next request.
Note: the Top list is generated using a HashTable (in java.util package) and the Table with each row (containing an item removed from the Top List(i.e. select) and a checkbox + textfield) is also generated by a second Hashtable.
[This message has been edited by Gabriel Fox (edited November 27, 2001).]
 
Gabriel Fox
Ranch Hand
Posts: 170
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am writing a JSP which removes items from a top LIST box to
dynamically generate a Table below on the same page.
And removing rows from the table to add back to the Top List.
This is working well, EXCEPT that on removing one or more rows
the items contained in the removed rows are not added to the top
List immediately.Since the code generating the List
(dynamically from a Query) as been by-passed before removing the
rows. So, the items removed are added on display after the next
request(submission of the form).
Please, how can i RELOAD the page within itself to go back to
the Logic (scriptlet block)on top which generate the list
before any next request.
Note: the Top list is generated using a HashTable (in java.util package) and the Table with each row (containing an item removed from the Top List(i.e. select) and a checkbox + textfield) is also generated by a second Hashtable.
 
Manas Ahlaad
Ranch Hand
Posts: 165
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi
you can use java script to do that , i dont think u need to make it a request to the server.
what do you say !
manas
 
Adam Hardy
Ranch Hand
Posts: 567
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't think you should try reloading the page, it would be more logical to re-arrange your business logic so that the JSP can work out at the top of the page which part of the page each item is in, and then go on to display the two parts.
That seems very obvious to me, so perhaps I misunderstood your question. Did I?
 
Gabriel Fox
Ranch Hand
Posts: 170
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You guys are ever wonderful.
Cheers Adam.I did just want you suggested and it worked.
I re-arranged my Logic thus:
1.Processing of java.util.TreeMap implementation handling Top List and that for bottom dynamic table came first
2.Followed by Logic to display List
3.Lastly Logic to display Dynamic table
And that's it.Thanks once again.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic