Answer the question
In order to leave comments, you need to log in
Working with Wicket WiQuery Selectable?
The project uses wicket, you need to make a selection of images. Of course, the choice fell on jquery selectable and its implementation under wicket.
There is this code
SelectableAjaxBehavior selectableAjaxBehavior = new SelectableAjaxBehavior() {<br>
<br>
private static final long serialVersionUID = 1L;<br>
<br>
@Override<br>
public void onSelection(Component[] components, AjaxRequestTarget ajaxRequestTarget) {<br>
System.out.println("SIZE: " + components.length);<br>
}<br>
};<br>
selectableAjaxBehavior.getSelectableBehavior().setSelectedEvent(new JsScopeUiEvent() {<br>
@Override<br>
protected void execute(JsScopeContext scopeContext) {<br>
scopeContext.append("console.log('ID: ' + ui.selected.id);");<br>
}<br>
});<br>
selectableAjaxBehavior.setFilter(".tooth-image");<br>
add(selectableAjaxBehavior);<br>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question