[JBoss Seam] - How to strip request parameters for page reloads
by gzoller
Sorry about the title, but its hard to capture in a sentence what I'm struggling with.
I have a simple DataModel display page, fed by a manager bean that maintains the list, as shown in the Seam tutorial.
It all works great but for one small gotcha: What happens if someone reloads the page after an operation like a delete?
For example say I have 3 items in my list. I use a s:link to trigger deletion operations. Say I click delete on the second item. Seam will pass a parameter string that includes "myList[1]". That works, but--after the page is redrawn if the user hits referesh the deletion operation will happen again (because the myList[1] is still part of the query string) on a list item the user probably didn't intend to delete! Worse if they accidentally run the list index beyond the bounds of the backing list they get a messy-bad-error-exception-thingy(tm).
My initial attempt was to have the s:link view attribute take them to a dummy "bounce" page never intended to be displayed. The bounce.page.xml would have an always-true nav rule to redirect them back to my main page. So far I haven't been able to get this working.
Any thoughts/better approaches?
Thanks,
Greg
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4035114#4035114
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4035114
19 years
[JBoss Seam] - home.update not being called.
by MikeDougherty
I'm having a bit of trouble figuring out why my Home.update method is not being called. When I use an <h:inputText ... /> the form posts, and everything works fine. However, I need to have the input as a <h:selectOneListbox .../>. But when I put the <h:selectOneListbox ... /> tag in the page the forum doesn't post as expected. The Home.update is not called, the values are not set in the entity, and to top it all off when the page returns Home.isManaged seem to return false.
I've turned up the logging output on org.jboss.seam.jsf and org.apache.myfaces to see if that would help me find the problem. I get a lot more output, but combing through it, I can not seem to find the reason for the change in behavior.
So, what else can I do to begin debugging this? Which categor{y,ies} might I turn up to give me more info in the log? Which source files might I dig through to help me understand what is happening?
The most troublesome part is that I have <h:selectOneListbox .../> tags working in other pages with similar entities. So I suspect it has something to do with the entity itself, and not the <h:selectOneListbox /> tag, but I'm having trouble figuring out what the problem is.
Thanks for any and all help.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4035112#4035112
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4035112
19 years