Ritesh Trivedi wrote:
Edvin,
Before posting, I already made Form a private member of the toolbar and
passed it from the parent fragment as a workaround.
My main question was - why didnt getForm() on the button work? and second -
not sure how you are saying markupProvider is the form? markup provider is
the page. My page markup file has the fragments. What am I missing?
Martijn answered the first one I see. Sorry for not stating it right away. I
was more focused on finding a solution for you :)
So to the markupProvider being your form: You wrote:
// Cart Header Toolbar
cartForm.add(new CartActionToolbar("cartHeaderToolbar", "cartActionToolbar",
ViewCartPage.this, cartForm));
And your only constructor in CartActionToolbar is:
public CartActionToolbar(String id, String markupId, MarkupContainer
markupProvider)
I didn't count the arguments, I just saw that markupProvider was the last argument, and also that cartForm was the last argument you passed into it. (God damned wrapping in the mail client confused me, I read your mail on the ASUS EEPC - not the biggest screen in the world :)
It seems you don't hit this constructor at all? :)
Anyways, a cleaner way to do this is to override the onBeforeRender() method of
the fragment. Then the component hierarchy is complete, so you can call
getParent() or even better, getForm() directly on the component to get the
form. Just remember to call super.onBeforeRender() as well :)
-- Edvin
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]