This week's book giveaway is in the Server-Side JavaScript and NodeJS forum.
We're giving away four copies of Micro Frontends in Action and have Michael Geers on-line!
See this thread for details.
Win a copy of Micro Frontends in Action this week in the Server-Side JavaScript and NodeJS forum!
    Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Paul Clapham
  • Bear Bibeault
  • Jeanne Boyarsky
Sheriffs:
  • Ron McLeod
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Jj Roberts
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • salvin francis
  • Scott Selikoff
  • fred rosenberger

Display error message in div tag

 
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Report post to moderator
Hi,

After i have caught an error using try catch i would like to display that message on the same page in a div panel.

I was just wondering how would i call a div panel and display the message in it without clearing the rest of the page. Would i have to re-create the page in the java code?

The code is as follows:
 
Ranch Hand
Posts: 89
  • Mark post as helpful
  • send pies
  • Report post to moderator
You could try setting a boolean variable inside that catch and somewhere outside the table check to see if that variable is true. If yes, then print the message.
 
Talhah Mafawalla
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Report post to moderator
Hi Wilson,

Thanks very much for the help.

I was just wondering if you could explain why when i had my code in that catch statement and it printed the message the entire page above that catch code got over written and only the error message and the "Add New" <a> tag got displayed.

When i changed it to the following the page prints out correctly.



Thanks again for the help
Talhah Mafawalla
 
Ranch Hand
Posts: 2874
 
Don't get me started about those stupid light bulbs.
    Bookmark Topic Watch Topic
  • New Topic