duplicate records
posted 17 years ago
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
when i am creating a record like inserting a record then if i refresh a page same record get inserted again . I am auto incrementing Emp Id. which is a primary key.
but other than that everything else is duplicating.
please reply
Supriya
but other than that everything else is duplicating.
please reply
Supriya
posted 17 years ago
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
When you are refreshing a page the http event like "/addemployee.do" (assuming
struts flow) is getting fired again as before refreshing the page the
url which made employee record insertion before page refresh is still there
in browsers address bar.There couldn't be new entry if you were editing existing field , I mean "/editemployee.do" kinda functionality.
Whatever happening is quiet natural only instead of you clicking on "submit"
button and in turn it resulting into corresponding action(in this case /addemployee.do)browser directly firing this http event.
But why do you need to refresh your pade anyway?
struts flow) is getting fired again as before refreshing the page the
url which made employee record insertion before page refresh is still there
in browsers address bar.There couldn't be new entry if you were editing existing field , I mean "/editemployee.do" kinda functionality.
Whatever happening is quiet natural only instead of you clicking on "submit"
button and in turn it resulting into corresponding action(in this case /addemployee.do)browser directly firing this http event.
But why do you need to refresh your pade anyway?
posted 17 years ago
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
Did you use empid as a primary key or composite primary key?
Thanks,<br />Prabhakaran.M
posted 17 years ago
We don't assume that Struts is being used unless the original poster says it is.
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
Originally posted by Shrikant Kesarkar:
... (assuming
struts flow)
We don't assume that Struts is being used unless the original poster says it is.
supriya ratnakar
Greenhorn
Posts: 5
posted 17 years ago
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
yes emp id is primary key and i am just using mvc not struts
posted 17 years ago
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
you can handle this problem by using a flag before inserting the row into the database and then false this flag after insertion.
is this help.
is this help.
posted 17 years ago
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
hi supriya,
you can solve that problem by redirecting the action to some other page.
In that page you again redirect to your page (whichever you need).
you redirect your actual page to some other page like what i have did and in that page you mention the next page action.
try it
;)
you can solve that problem by redirecting the action to some other page.
In that page you again redirect to your page (whichever you need).
you redirect your actual page to some other page like what i have did and in that page you mention the next page action.
try it
;)
| There is no beard big enough to make me comfortable enough with my masculinity to wear pink. Tiny ad: The new gardening playing cards kickstarter is now live! https://www.kickstarter.com/projects/paulwheaton/garden-cards |











