<p:rowEditor> bean action when pencil is clicked?

UI Components for JSF
Post Reply
kwutzke
Posts: 201
Joined: 20 Jul 2012, 21:35

21 Mar 2013, 14:27

How do you correctly call a bean method (action) with PF 3.5 on the <p:rowEditor> when clicking the pencil icon?

I found a thread that demonstrates several hacks of how to do it:

viewtopic.php?f=3&t=12051

I decided to go for the last one, the <p:commandButton> wrapping the <p:rowEditor>:

Code: Select all

                <p:commandLink action="#{insiderManager.onEditPencil(ins)}"
                               update="insider-form:button-panel">
                    <p:rowEditor />
                </p:commandLink>
It worked using PF 3.4.2, but when upgrading to 3.5 or 3.6-SNAPSHOT the <p:rowEditor> stopped to work, that is clicking on the pencil does absolutely nothing.

So, what is the preferred solution here?
(ideally one that will not break with the next release of PF...)

Karsten
PrimeFaces 13, Mojarra 4.0, WildFly 31, Jakarta 10 + PrimeReact

kukeltje
Expert Member
Posts: 9605
Joined: 17 Jun 2010, 13:34
Location: Netherlands

21 Mar 2013, 14:49

How do you know what you used was 'supposed/designed' to work that way? Maybe it was a 'hack' that someone found by 'accident'. It (to me at least) looks like a 'workaround'. In that case, PF 3.5 is *not* breaking anything by not supporting it anymore.

Suppose I was able to replace the engine in VW Beatle by one from a Porche 911 just because the al the mounting positions etc were (almost) identical. And with a newer release this would not be possible. Would I blame VW?

I know the comparison is not fully valid, but never the less

Edit: in the orignal post, it said:
So, what is the solution that will not break with the next release of PF?
This seems to be a little less strong now with
So, what is the preferred solution here? (ideally one that will not break with the next release of PF...)
which is good.

kwutzke
Posts: 201
Joined: 20 Jul 2012, 21:35

21 Mar 2013, 14:59

Hmmm it looks like you didn't read carefully. Of course, as I mentioned
I found a thread that demonstrates several hacks of how to do it:
I took hack #x.

But what is the standard/preferred way to achieve this, since p:rowEditor itself has no action or actionListener attribute?

Is it just a missing feature for which I should create a request or is there a "safe" hack?

Karsten
PrimeFaces 13, Mojarra 4.0, WildFly 31, Jakarta 10 + PrimeReact

kwutzke
Posts: 201
Joined: 20 Jul 2012, 21:35

21 Mar 2013, 15:28

PrimeFaces 13, Mojarra 4.0, WildFly 31, Jakarta 10 + PrimeReact

kwutzke
Posts: 201
Joined: 20 Jul 2012, 21:35

10 Apr 2013, 14:19

There is rowEditInit in 3.5.
PrimeFaces 13, Mojarra 4.0, WildFly 31, Jakarta 10 + PrimeReact

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 85 guests