wiquery provides draggable as a behavior: which would solve your problem.

On Sat, Jan 4, 2014 at 6:17 PM, Lucio Crusca <[email protected]> wrote:

> Hi everybody,
>
> I have a panel that contains a RepeatingView, which in turns generates a
> number of links. The links are generated based on the context (defined as
> current page and previous user actions).
>
> Just now the panel shows up in the top right corner of my webapp and it's
> above other things, and I'd like to let users move it where they want.
>
> My code now is:
>
> public class DataContextPanel extends Panel
> {
>   public DataContextPanel(String id)
>   {
>     super(id);
>
>     add(new Label("contextTitle", "Context"));
>
>     RepeatingView sels = new RepeatingView("repeating");
>     fill(sels);
>     add(sels);
> ...
>
>     <wicket:panel>
>       <span wicket:id="contextTitle" ></span>
>       <table cellspacing="0" class="dataview">
>         <tr>
>             <th>Type</th>
>             <th>Value</th>
>             <th>Inhibit</th>
>             <th>Forget</th>
>         </tr>
>         <tr wicket:id="repeating">
>           <td><span wicket:id="tablename">Ditta</span><a href="#"
> wicket:id="openDetail">&rArr;</a></td>
>           <td><span wicket:id="selectedrow"></span></td>
>           <td><a href="#" wicket:id="inhibit">&empty;</a></td>
>           <td><a href="#" wicket:id="forget">&timesb;</a></td>
>         </tr>
>       </table>
>     </wicket:panel>
>
> and, in the page, I have a simple <div> as placeholder for it.
>
> I've tried to change the class and make it extend Draggable from
> wicket-jquery-ui instead of Panel, and changed wicket:panel to
> wicket:extend,
> but I got the following exception:
>
> org.apache.wicket.WicketRuntimeException: The component(s) below failed to
> render. Possible reasons could be that: 1) you have added a component in
> code
> but forgot to reference it in the markup (thus the component will never be
> rendered), 2) if your components were added in a parent container then make
> sure the markup for the child container includes them in <wicket:extend>.
>
> 1. [Component id = contextTitle]
> 2. [RepeatingView [Component id = repeating]]
>
> at org.apache.wicket.Page.checkRendering(Page.java:661)
> at org.apache.wicket.Page.onAfterRender(Page.java:818)
> at org.apache.wicket.markup.html.WebPage.onAfterRender(WebPage.java:215)
> at org.apache.wicket.Component.afterRender(Component.java:892)
> at org.apache.wicket.Component.render(Component.java:2319)
> at org.apache.wicket.Page.renderPage(Page.java:1010)
> ...
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>


-- 
Regards - Ernesto Reinaldo Barreiro

Reply via email to