So, it is looking like I could do something like this:

        Link<String> link = new AjaxLink<String>(componentId, new 
Model<String>("View Details")) {
            @Override
            public void onClick(AjaxRequestTarget target) {
                        String resultHTML = convertPanelToHTML();  // I 
understand this

                        // how can I override the target response with the 
result HTML?
            }
        };

1) I just want to return straight HTML (not contents within the <ajax-response> 
node)
2) I need the link to return the contents directly (not handle the contents 
with the Wicket ajax javascript code)

Is type of behavior possible?  If not, does anyone have any other ideas as to 
how I could show a dynamic tooltip with data retrieved using ajax?  Thank you 
very much.

Joe


-----Original Message-----
From: Pedro Santos [mailto:pedros...@gmail.com] 
Sent: Thursday, October 01, 2009 8:19 AM
To: users@wicket.apache.org
Subject: Re: is it possible to somehow create a url to return the contents of a 
panel

1) Is there a component (the someMadeUpAjaxComponent) that I can get a URL
for which will trigger the onClick method
http://wicket.apache.org/docs/1.4/org/apache/wicket/IRequestTarget.html
http://wicket.apache.org/docs/1.4/org/apache/wicket/behavior/AbstractAjaxBehavior.html#getCallbackUrl%28%29

2) I need to attach the URL for the component to a link - not add the
component directly - is this possible?
I don't understand. Is possible to do a lot overriding onComponentTag,
onRender, ....

3) Given an AjaxRequestTarget, is there any way I can write out the HTML
response (as opposed to adding components for rendering)?
you can append javascript to response...

On Thu, Oct 1, 2009 at 9:11 AM, Joe Hudson <joe.hud...@clear2pay.com> wrote:

> Thank you so much for the response, that was very helpful.
>
> So, I've got half of the equation figured out but now, I have the issue of
> how to generate a URL that call a component that allows for a straight HTML
> response.
>
> Here is the issue now:
>
> Component someMadeUpAjaxComponent = ... {
>        onClick(AjaxRequestTarget target) {
>                // return the component output
>        }
> }
>
> 1) Is there a component (the someMadeUpAjaxComponent) that I can get a URL
> for which will trigger the onClick method
> 2) I need to attach the URL for the component to a link - not add the
> component directly - is this possible?
> 3) Given an AjaxRequestTarget, is there any way I can write out the HTML
> response (as opposed to adding components for rendering)?
>
>
> Because, the result will look something like this:
> <a href="{the AJAX URL that will respond with the component HTML
> content}">View Details</a>
>
> I will then attach a tooltip to this link which will know that it can take
> the href attribute of the link to obtain the tooltip content.
>
> Thank you very much for any help you could offer.
>
> Joe
>
>
>
> -----Original Message-----
> From: Jeremy Thomerson [mailto:jer...@wickettraining.com]
> Sent: Wednesday, September 30, 2009 9:15 PM
> To: users@wicket.apache.org
> Subject: Re: is it possible to somehow create a url to return the contents
> of a panel
>
> search this list for how to generate emails with wicket.  there are a bunch
> of posts of that sort.  that will teach you how to render a component to a
> string.  this could be used to return the contents.
>
> --
> Jeremy Thomerson
> http://www.wickettraining.com
>
>
>
> On Wed, Sep 30, 2009 at 8:10 PM, Joe Hudson <joe.hud...@clear2pay.com
> >wrote:
>
> > Hi - hopefully I can explain this clearly...
> >
> > I understand that I can use the AjaxEventBehavior to refresh the contents
> > of any components that I have on the screen or add new components.
> >
> > I am trying to use a tooltip to display additional details for grid data.
> >  I plan to use a tooltip library which supports retrieving content via an
> > ajax call.  The question is: how (or is it possible at all) can I take a
> > Panel and get a url that would return the contents of that Panel.  I'm
> > probably not explaining this well so, here is an example:
> >
> > AbstractLink link = createLink(IModel rowModel);
> >
> > Private AbstractLink createLink(IModel rowModel) {
> >                // I need to return a URL which would contain the contents
> > of the additional details panel
> >                // for this particular row in the grid
> >
> >                // the tooltip library will use the href attribute of this
> > link to dynamically retrieve the contents of the tooltip when displayed
> > }
> >
> > Any help or ideas would be greatly appreciated.  Thanks.
> >
> > Joe
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


-- 
Pedro Henrique Oliveira dos Santos

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to