This week's book giveaway is in the Cloud forum.
We're giving away four copies of The Business Blockchain and have William Mougayar on-line!
See this thread for details.
Win a copy of The Business Blockchain this week in the Cloud forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

criteriaFind question

 
Dilip kumar
Ranch Hand
Posts: 360
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If criteriaFind returns no records do we need to retain the previously displayed records in JTable ? I feel empty JTable doesn't look good.
Any suggestions ?
Thanks
 
Matt DeLacey
Ranch Hand
Posts: 318
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've been wondering this same exact thing for awhile, and I just can't decide. 2 very different ideas I've come up with are to:
1.) Report that there were no matches to the query and show
an empty JTable (I agree that an empty JTable looks bad though).
2.) Report that there were no matches to the query and show
all records in the JTable so that the user may be better able
to formulate the next query.
Not too keen on either but can't think of another way to handle it. I guess either would work as long as you document it and tell WHY you did it.
 
Swapan Golla
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
May be you dont want to show the JTable frame at all if criteriafind returns nothing and just display a dialog saying no match found or something like that in the selection frame. Of course, I am assuming that you have different frames for selecting(this is where you select the orig and dest airports) and displaying (show the matching records in a jtable). I dont know how much help I have been to you guys !
Anyway, thats my 2 cents of thought.
Regards,
Swapan.
 
Dilip kumar
Ranch Hand
Posts: 360
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for your feedback.
If no records found I'm retaining the old values in JTable. Also displaying the message "No matching records found..."
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic