Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to dispose recieved data?

 
xin dong
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I use MVC pattern to design client.when I search or book flights.I couldn't deal with return data.
at first. I use vectors,AbstractTableModel will get data from it.when new data arrived , Listener method "dataChanged" will dispose the data .and update the vector.after this .invoke method fireTableDataChanged to remind TABLE display new data.table should get new data from vector and display .but my method didn't work.who can help me?my codes below

any answer is appreciated!!
 
xin dong
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
still no answer?I am worried about this .help!
please!
I think this is a simple question for you
 
Andrew Monkhouse
author and jackaroo
Marshal Commander
Pie
Posts: 12012
218
C++ Firefox Browser IntelliJ IDE Java Mac Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Xin,
I cannot see where a problem lies with this code. Are you sure that the problem is here, and not in either the fireDataChanged method or in the view that is supposed to be getting the DataChanged event?
When you say that your method didn't work, can you give some more information? Did you get a stacktrace, or was it the case that you just didnt see the result?
I suggest you add debug messages to your fireDataChanged method so you can see whether it is in fact firing the DataChanged event to each class that it is meant to.
I would then add code to the View to make sure it is receiving the DataChanged event, and then work out what it is doing with it.
Good luck, Andrew
 
Consider Paul's rocket mass heater.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic