You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Carlos Pita (JIRA)" <ji...@apache.org> on 2007/08/10 23:51:42 UTC

[jira] Created: (WICKET-836) feedback panels not being updated when inside repeaters

feedback panels not being updated when inside repeaters
-------------------------------------------------------

                 Key: WICKET-836
                 URL: https://issues.apache.org/jira/browse/WICKET-836
             Project: Wicket
          Issue Type: Bug
          Components: wicket
    Affects Versions: 1.3.0-beta2, 1.3.0-beta3
            Reporter: Carlos Pita


see the attached example

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (WICKET-836) feedback panels not being updated when inside repeaters

Posted by "Igor Vaynberg (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-836?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Igor Vaynberg reassigned WICKET-836:
------------------------------------

    Assignee: Matej Knopp

see my comment, do you remember what the reason was?

> feedback panels not being updated when inside repeaters
> -------------------------------------------------------
>
>                 Key: WICKET-836
>                 URL: https://issues.apache.org/jira/browse/WICKET-836
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.3.0-beta2, 1.3.0-beta3
>            Reporter: Carlos Pita
>            Assignee: Matej Knopp
>             Fix For: 1.3.0-beta4
>
>         Attachments: FeedbackPage.html, FeedbackPage.java
>
>
> see the attached example

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (WICKET-836) feedback panels not being updated when inside repeaters

Posted by "Jean-Baptiste Quenot (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-836?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jean-Baptiste Quenot updated WICKET-836:
----------------------------------------

    Fix Version/s: 1.3.0-beta4

Looks reasonable to do for the next release

> feedback panels not being updated when inside repeaters
> -------------------------------------------------------
>
>                 Key: WICKET-836
>                 URL: https://issues.apache.org/jira/browse/WICKET-836
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.3.0-beta2, 1.3.0-beta3
>            Reporter: Carlos Pita
>             Fix For: 1.3.0-beta4
>
>         Attachments: FeedbackPage.html, FeedbackPage.java
>
>
> see the attached example

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WICKET-836) feedback panels not being updated when inside repeaters

Posted by "Matej Knopp (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-836?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12522867 ] 

Matej Knopp commented on WICKET-836:
------------------------------------

Right now we call updateFeedback() before calling beforeRender() on components, thus the feedback panels in repeater don't even exist at that point. I think we should call updateFeedback() when the hierarchy is complete.

> feedback panels not being updated when inside repeaters
> -------------------------------------------------------
>
>                 Key: WICKET-836
>                 URL: https://issues.apache.org/jira/browse/WICKET-836
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.3.0-beta2, 1.3.0-beta3
>            Reporter: Carlos Pita
>             Fix For: 1.3.0-beta4
>
>         Attachments: FeedbackPage.html, FeedbackPage.java
>
>
> see the attached example

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WICKET-836) feedback panels not being updated when inside repeaters

Posted by "Matej Knopp (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-836?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12532052 ] 

Matej Knopp commented on WICKET-836:
------------------------------------

Hi, It's not feedback that is broken. It's the FormComponentFeedbackIndicator/Border that is broken. Looking at the code, probably changing updateFeedback to onBeforeRender should fix the problem.

As for the other FeedbackPanel problem you mention, can you be more specific? I haven't noticed any problem with it.

> feedback panels not being updated when inside repeaters
> -------------------------------------------------------
>
>                 Key: WICKET-836
>                 URL: https://issues.apache.org/jira/browse/WICKET-836
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.3.0-beta2, 1.3.0-beta3
>            Reporter: Carlos Pita
>            Assignee: Matej Knopp
>             Fix For: 1.3.0-beta4
>
>         Attachments: FeedbackPage.html, FeedbackPage.java
>
>
> see the attached example

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WICKET-836) feedback panels not being updated when inside repeaters

Posted by "Matej Knopp (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-836?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12524282 ] 

Matej Knopp commented on WICKET-836:
------------------------------------

Okay, so Johan finally reminded me what updateFeedback() is for. The good thing is, that since we store messages in session, we no longer need it.

it was meant to collect feedback messages from component that would be removed in onBeforeRender. Such as when there are textfields in ListView with setReuseItems(false). Now since we store feedback messages ins session, they are not discarded when component is removed and we can safely ditch the updateFeedback() method (and thus all those stupid traversal that we had all over the place).

However, we still need IFeedback, but only as a marker interface. We need to be sure that onBeforeRender on IFeedback components is called _after_ all other (non feedback) component's onBeforeRender was called. So that we can collect all feedback messages, even from things like repeaters. 

I've already implemented this, but I'll need to test it properly before commiting.

> feedback panels not being updated when inside repeaters
> -------------------------------------------------------
>
>                 Key: WICKET-836
>                 URL: https://issues.apache.org/jira/browse/WICKET-836
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.3.0-beta2, 1.3.0-beta3
>            Reporter: Carlos Pita
>            Assignee: Matej Knopp
>             Fix For: 1.3.0-beta4
>
>         Attachments: FeedbackPage.html, FeedbackPage.java
>
>
> see the attached example

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WICKET-836) feedback panels not being updated when inside repeaters

Posted by "Matej Knopp (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-836?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12524275 ] 

Matej Knopp commented on WICKET-836:
------------------------------------

Actually, I'm not sure that we should do anything about it. It's not true that feedback panel is not update. Feedback panel should be updated regardless of whether updateFeedback was called or not. If it's not called. the panel should be updated on render. The updateFeedback method is only for getting feedback from components that might be removed in onBeforeRender (which is also the place  where feedback in repeaters are constructed). 

The problem that we have now, is that when there is an error message registered _after_ updateFeedback has been called, the panel doesn't display that message (e.g. register feedback message in populateItem(), the panel outside list will not display the message)

> feedback panels not being updated when inside repeaters
> -------------------------------------------------------
>
>                 Key: WICKET-836
>                 URL: https://issues.apache.org/jira/browse/WICKET-836
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.3.0-beta2, 1.3.0-beta3
>            Reporter: Carlos Pita
>            Assignee: Matej Knopp
>             Fix For: 1.3.0-beta4
>
>         Attachments: FeedbackPage.html, FeedbackPage.java
>
>
> see the attached example

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WICKET-836) feedback panels not being updated when inside repeaters

Posted by "Carlos Pita (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-836?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12524279 ] 

Carlos Pita commented on WICKET-836:
------------------------------------

I'm using a custom feedback panel as a temporary workaround for this
problem. The panel is only visible when there is feedback registered for its
target component. It has no need to be updated for this, it's just a matter
of overriding isVisible and using the right message filter. I wonder if
wicket's own feedback panels couldn't be implemented this way, instead of
relying on being explicitly notified.



> feedback panels not being updated when inside repeaters
> -------------------------------------------------------
>
>                 Key: WICKET-836
>                 URL: https://issues.apache.org/jira/browse/WICKET-836
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.3.0-beta2, 1.3.0-beta3
>            Reporter: Carlos Pita
>            Assignee: Matej Knopp
>             Fix For: 1.3.0-beta4
>
>         Attachments: FeedbackPage.html, FeedbackPage.java
>
>
> see the attached example

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (WICKET-836) feedback panels not being updated when inside repeaters

Posted by "Carlos Pita (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-836?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Carlos Pita updated WICKET-836:
-------------------------------

    Attachment: FeedbackPage.html

> feedback panels not being updated when inside repeaters
> -------------------------------------------------------
>
>                 Key: WICKET-836
>                 URL: https://issues.apache.org/jira/browse/WICKET-836
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.3.0-beta2, 1.3.0-beta3
>            Reporter: Carlos Pita
>         Attachments: FeedbackPage.html, FeedbackPage.java
>
>
> see the attached example

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (WICKET-836) feedback panels not being updated when inside repeaters

Posted by "Matej Knopp (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-836?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Matej Knopp resolved WICKET-836.
--------------------------------

    Resolution: Fixed

> feedback panels not being updated when inside repeaters
> -------------------------------------------------------
>
>                 Key: WICKET-836
>                 URL: https://issues.apache.org/jira/browse/WICKET-836
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.3.0-beta2, 1.3.0-beta3
>            Reporter: Carlos Pita
>            Assignee: Matej Knopp
>             Fix For: 1.3.0-beta4
>
>         Attachments: FeedbackPage.html, FeedbackPage.java
>
>
> see the attached example

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WICKET-836) feedback panels not being updated when inside repeaters

Posted by "Matej Knopp (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-836?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12524148 ] 

Matej Knopp commented on WICKET-836:
------------------------------------

I don't. Guess we will have to try and see.

> feedback panels not being updated when inside repeaters
> -------------------------------------------------------
>
>                 Key: WICKET-836
>                 URL: https://issues.apache.org/jira/browse/WICKET-836
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.3.0-beta2, 1.3.0-beta3
>            Reporter: Carlos Pita
>            Assignee: Matej Knopp
>             Fix For: 1.3.0-beta4
>
>         Attachments: FeedbackPage.html, FeedbackPage.java
>
>
> see the attached example

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WICKET-836) feedback panels not being updated when inside repeaters

Posted by "Igor Vaynberg (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-836?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12523999 ] 

Igor Vaynberg commented on WICKET-836:
--------------------------------------

what was the reason for specifically calling updatefeedback() _before_ onbeginrender(). it had something to do with repeaters - maybe because they remove components...but i dont remember what it was exactly now. we might have to do a second traversal.

> feedback panels not being updated when inside repeaters
> -------------------------------------------------------
>
>                 Key: WICKET-836
>                 URL: https://issues.apache.org/jira/browse/WICKET-836
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.3.0-beta2, 1.3.0-beta3
>            Reporter: Carlos Pita
>             Fix For: 1.3.0-beta4
>
>         Attachments: FeedbackPage.html, FeedbackPage.java
>
>
> see the attached example

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WICKET-836) feedback panels not being updated when inside repeaters

Posted by "Matej Knopp (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-836?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12524278 ] 

Matej Knopp commented on WICKET-836:
------------------------------------

There seems to be bigger problem :-(

Let's say we have this hierarchy:

 FeedbackPanel
 ListView

inside listView's onPopulateItem we call item.info("something");
That string will not be shown inside FeedbackPanel, because feedback panel onBeforeRender is called before the listitem is built.

> feedback panels not being updated when inside repeaters
> -------------------------------------------------------
>
>                 Key: WICKET-836
>                 URL: https://issues.apache.org/jira/browse/WICKET-836
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.3.0-beta2, 1.3.0-beta3
>            Reporter: Carlos Pita
>            Assignee: Matej Knopp
>             Fix For: 1.3.0-beta4
>
>         Attachments: FeedbackPage.html, FeedbackPage.java
>
>
> see the attached example

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (WICKET-836) feedback panels not being updated when inside repeaters

Posted by "Carlos Pita (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-836?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Carlos Pita updated WICKET-836:
-------------------------------

    Attachment: FeedbackPage.java

> feedback panels not being updated when inside repeaters
> -------------------------------------------------------
>
>                 Key: WICKET-836
>                 URL: https://issues.apache.org/jira/browse/WICKET-836
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.3.0-beta2, 1.3.0-beta3
>            Reporter: Carlos Pita
>         Attachments: FeedbackPage.html, FeedbackPage.java
>
>
> see the attached example

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WICKET-836) feedback panels not being updated when inside repeaters

Posted by "Matej Knopp (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-836?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12524292 ] 

Matej Knopp commented on WICKET-836:
------------------------------------

Okay. I've commited the code. I hope I haven't broken the world. Which wouldn't surprise me at all.

> feedback panels not being updated when inside repeaters
> -------------------------------------------------------
>
>                 Key: WICKET-836
>                 URL: https://issues.apache.org/jira/browse/WICKET-836
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.3.0-beta2, 1.3.0-beta3
>            Reporter: Carlos Pita
>            Assignee: Matej Knopp
>             Fix For: 1.3.0-beta4
>
>         Attachments: FeedbackPage.html, FeedbackPage.java
>
>
> see the attached example

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WICKET-836) feedback panels not being updated when inside repeaters

Posted by "Jason Mosser (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-836?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12532172 ] 

Jason Mosser commented on WICKET-836:
-------------------------------------

Matej,
  Having looked more in depth at the Wicket code I agree with your assessment.

Regarding what I thought might have been issues with FeedbackPanel, I now believe there is no problem.  The odd behavior in my app was the result of changes outside the scope of this issue.  

<off-topic>
I have some form components that were using AjaxFormComponentUpdatingBehavior to handle 'onFocus' and 'onChange' events.  It appears that the API of AjaxFormComponentUpdatingBehavior has changed slightly with 1.3.0.  In Wicket 1.2.6, AjaxFormComponentUpdatingBehavior would invoke the onUpdate(...) method even if the component was 'invalid'.  This basically forced subclasses to check if the component had errors by way of getFormComponent().hasErrorMessage().  This has now been changed to be more atomic: onUpdate(...) is invoked when an update occurs and onError(...) is invoked when (validation) errors occur.  A couple of quick code changes in my app and all is back to normal.
</off-topic>

Sorry for the confusion on that part.

Does a separate issue need to be created to handle the FormComponentFeedbackIndicator/Border issue?

Regards,
  JM

> feedback panels not being updated when inside repeaters
> -------------------------------------------------------
>
>                 Key: WICKET-836
>                 URL: https://issues.apache.org/jira/browse/WICKET-836
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.3.0-beta2, 1.3.0-beta3
>            Reporter: Carlos Pita
>            Assignee: Matej Knopp
>             Fix For: 1.3.0-beta4
>
>         Attachments: FeedbackPage.html, FeedbackPage.java
>
>
> see the attached example

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.