Displaying precise error using struts

V

Vijay

hi,

I have a webpage with a list of filenames. Each file is mapped to a
unique random number during its display on the UI
(This is being done inside the getter method in ActionForm)

I have checkboxes along each file which will be used to delete the
checked files.

In case an error is encountered in the deletion of a particular file, i
want to show the user a specific error message telling about the
particualr file on which error occured.

Is there a way to do this in struts?

Thanks for any help...

Vijay
 
R

Ryan Stewart

Vijay said:
hi,

I have a webpage with a list of filenames. Each file is mapped to a
unique random number during its display on the UI
(This is being done inside the getter method in ActionForm)

I have checkboxes along each file which will be used to delete the
checked files.

In case an error is encountered in the deletion of a particular file, i
want to show the user a specific error message telling about the
particualr file on which error occured.

Is there a way to do this in struts?
You build the error message, save it to the request, and show it with the
<html:messages> tag. If you want more specific help, you'll have to ask a more
specific question.
 
V

Vijay

oops, let me be more specific.

suppose that the 11th file throws error, i want to display on ui that
11th file could not be deleted.
with html:messages, it retrieves a constant string from the bundle
which is not what i want.

hope i'm clear now
 
V

Vijay

my list is dynamic but html:messages retrieves a constant string from
the message resource bundle. how can i display a dynamic error message?
 
W

Wendy Smoak

Vijay said:
my list is dynamic but html:messages retrieves a constant string from
the message resource bundle. how can i display a dynamic error message?

file.delete.error=The file named {0} could not be deleted.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top