I guess to make it work i have to delete it in the backing beans "list"
too, am i right?
Yes, you are right.
I would suggest, if you delete the entry in db when fireing the
delete-entry action, refresh the
list in the managed bean by fetching the new list from db and not
deleting it out of the list.
Normally you would delete the entry in the managed bean list first,
and then persist it with pushing a kind of save button. In this case
you should also update the list after re-rendering it or go to another
page.
In your case you would work after the following response with "old"
data, which can cause side effects.
Does it work now?
cheers,
Gerald
On 11/13/06, Torsten Krah <[EMAIL PROTECTED]> wrote:
I get the bean from the rowData, use its unique id to find it in the
database and delete it there ( the bean knows howto delete itself ).
I guess to make it work i have to delete it in the backing beans "list"
too, am i right?
Torsten
Am Montag, den 13.11.2006, 00:03 +0100 schrieb Gerald Müllan:
> If you delete the entry out of the list you need no special
> refreshing. All the list items are fetched in the render response
> phase and rendered out. So the changes in the list are reflected on
> the page after the response.
>
> If the deleted item is still there, there is another problem. How do
> you get the item
> out of the table and delete it?
>
> cheers,
>
> Gerald
>
> On 11/12/06, Torsten Krah <[EMAIL PROTECTED]> wrote:
> > Ok - got the action error.
> >
> > Cleaned and compiled my ant project dozen times - but it seams the class
> > does not get recompiled or packaged right at the deployment path.
> > After cleaning out everything, it works.
> > In the first time, my action method was not found.
> >
> > So the only things i've got - how to delete something in the backend,
> > and redisplaying the page and forcing the view to be refreshed to show
> > correct results?
> >
> > Torsten
> >
> > Am Sonntag, den 12.11.2006, 19:37 +0100 schrieb Torsten Krah:
> > > No a rule is there which should be invoked.
> > > However, in usecases where i want to refresh the page, action = null
> > > outcome, how can i force the view to reload the data from the bean
> > > instead of restoring it?
> > >
> > > Torsten
> > >
> > > Am Sonntag, den 12.11.2006, 15:31 +0000 schrieb Gary VanMatre:
> > > > >Using a commandLink with an action and an action listener does not
> > > > >invoke the action, neither the page is redisplayed correct.
> > > > >
> > > > ><h:commandLink action="#{a.fire}">
> > > > ><f:actionListener type="my.class">
> > > > ></h:commandLink>
> > > > >
> > > > >My action listener is called and does its job.
> > > > >But the action from the commandLink isn't - but it should, shouldn't
> > > > it?
> > > > >
> > > > >Anyway - the actionListener is for deleting a row in a table. When
> > > > the
> > > > >page redisplays ( if cases where i dont want to navigate away from
> > > > the
> > > > >action - when it would be called ) , the "deleted" row is still there
> > > > -
> > > > >but the backing bean is in correct state, the list with the item the
> > > > >table should show does not have the deleted item anymore, how can i
> > > > >force the view to be "refreshed".
> > > > >
> > > > >Scenario:
> > > > >
> > > > >Table displays a set of customers. A delete Link is there, an
> > > > >actionListener is called which fetches the backingbean, from this
> > > > >information the needed data is constructed to delete the customer in
> > > > the
> > > > >datasource.
> > > > >After deleting the table should be displayed without the last deleted
> > > > >row.
> > > > >
> > > > >
> > > > >Any things i've missed, thought this should work.
> > > > >
> > > >
> > > > I think you are missing a navigation rule matching your action's
> > > > outcome. If the navigation handler finds a matching rule and it is
> > > > not a redirect, it call createView() on the veiw handler. Otherwise
> > > > the view is restored.
> > > >
> > > >
http://svn.apache.org/viewvc/myfaces/core/branches/1_1_4/impl/src/main/java/org/apache/myfaces/application/NavigationHandlerImpl.java?view=markup
> > > >
> > > >
> > > > >Torsten
> > > > >
> > > >
> > > > Gary
> > > >
> > > > >ps: using myfaces 1.1.4
> > > > >
> > > > E-Mail-Nachricht-Anlage
> > > > > -------- Weitergeleitete Nachricht --------
> > > > > Von: Torsten Krah <[EMAIL PROTECTED]>
> > > > > An: MyFaces Discussion' <[email protected]>
> > > > > Betreff: commandLink - action not invoked when actionListener is a
> > > > > child of it, which gets called - however the action is ignored
> > > > > Datum: Sun, 12 Nov 2006 12:29:15 +0000
> > > > >
> > > > > Using a commandLink with an action and an action listener does not
> > > > > invoke the action, neither the page is redisplayed correct.
> > > > >
> > > > > <h:commandLink action="#{a.fire}">
> > > > > <f:actionListener type="my.class">
> > > > > </h:commandLink>
> > > > >
> > > > > My action listener is called and does its job.
> > > > > But the action from the commandLink isn't - but it should, shouldn't
it?
> > > > >
> > > > > Anyway - the actionListener is for deleting a row in a table. When the
> > > > > page redisplays ( if cases where i dont want to navigate away from the
> > > > > action - when it would be called ) , the "deleted" row is still there
-
> > > > > but the backing bean is in correct state, the list with the item the
> > > > > table should show does not have the deleted item anymore, how can i
> > > > > force the view to be "refreshed".
> > > > >
> > > > > Scenario:
> > > > >
> > > > > Table displays a set of customers. A delete Link is there, an
> > > > > actionListener is called which fetches the backingbean, from this
> > > > > information the needed data is constructed to delete the customer in
the
> > > > > datasource.
> > > > > After deleting the table should be displayed without the last deleted
> > > > > row.
> > > > >
> > > > >
> > > > > Any things i've missed, thought this should work.
> > > > >
> > > > > Torsten
> > > > >
> > > > > ps: using myfaces 1.1.4
> > > > >
> > > > >
> >
> >
> >
>
>
--
http://www.irian.at
Your JSF powerhouse -
JSF Consulting, Development and
Courses in English and German
Professional Support for Apache MyFaces