Thanks igor...i'll try that... Best Regards Muro
On Tue, Sep 1, 2009 at 4:34 PM, Igor Vaynberg <[email protected]>wrote: > your save link should be a save link that submits a form, unless you > are going to manually append the value you want sent back via > javascript to the save link's url. > > -igor > > On Tue, Sep 1, 2009 at 4:27 AM, Muro Copenhagen<[email protected]> > wrote: > > Hi, > > > > I have an issue with AjaxEditableLabel that i hope i can get some help > with. > > > > In my application i have a couple of AjaxEditableLabel's. > > > > Though i am not interested in the default feature of AjaxEditableLabel. > > > > I want edit button and a save button, that switches automatically between > > the Label and TextInput mode for > > all the AjaxEditableLabel fields i have. > > > > I used AjaxFallbackLink to implement a save button and edit button, that > > switches between the Label and TextInput fields > > of the AjaxEditableLabel. And this works for me now. > > > > The only problem i have is that the feedback is not displaying unless i > > submit the form. It does not show when i switch > > between the modes. > > > > When i log the onError method in my instance of the AjaxEditableLabel, i > can > > see that the error is caugth, but > > for some reason not displayed. > > > > Here is some of my code: > > > > MyAjaxEditableLabel adress = new MyAjaxEditableLabel("adress", new > > PropertyModel(wildcardProfil, "adress.street")); > > add(adresse.setRequired(true)); > > FeedbackPanel adressFP = new NbFeedbackPanel("adress.feedback", > new > > ContainerFeedbackMessageFilter(adress)); > > add(adressFP); > > > > And the AjaxFallbackLink's: > > > > class SaveAjaxFallbackLink extends AjaxFallbackLink { > > > > public void onClick(AjaxRequestTarget target) { > > if (target != null) { > > // shift visibility > > adress.makeEditorlVisible(true); > > adress.makeLabelVisible(false); > > target.addComponent(adress); > > ... > > } > > > > class EditAjaxFallbackLink extends AjaxFallbackLink { > > > > public void onClick(AjaxRequestTarget target) { > > if (target != null) { > > // shift visibility > > adress.makeEditorlVisible(true); > > adress.makeLabelVisible(false); > > target.addComponent(adress); > > ... > > } > > > > > > So when i click edit it should be in display mode, when click save it > should > > save the content and go back to none-edit mode. But how do i get the > > feedback, when press the save button ? > > > > Hope someone can help me on this. > > > > Best Regards > > Cemil > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > >
