Bootstrap DateTimePicker and ISO8601 date format

2016-03-15 Thread Marco Di Sabatino Di Diodoro

Hi,

I'm working with Wicket Bootstrap. I have some problems with the date 
picker. Currently, the Bootstrap DateTimePicker component is not working 
properly with some**java date formats.
When I try to use the ISO8601 date format, wicket returns an exception - 
date is not valid.


Any suggestions?

Regards
M

--
Dott. Marco Di Sabatino Di Diodoro
Tel. +39 3939065570

Tirasa S.r.l.
Viale D'Annunzio 267 - 65127 Pescara
Tel +39 0859116307 / FAX +39 085973
http://www.tirasa.net

Apache Syncope PMC Member
http://people.apache.org/~mdisabatino/



WicketTester and confirmation modal

2016-01-15 Thread Marco Di Sabatino Di Diodoro

Hi all,

I'm implementing tests with WicketTester for Apache Syncope console.
How can I simulate a click on my confirmation modal?

This is my java class

public class ConfirmationModalBehavior extends Behavior {

private final String message;

public ConfirmationModalBehavior() {
this("confirmDelete");
}

public ConfirmationModalBehavior(final String msg) {
message = new ResourceModel(msg, "Are you sure?").getObject();
}

@Override
public void renderHead(final Component component, final 
IHeaderResponse response) {

super.renderHead(component, response);

response.render(JavaScriptHeaderItem.forScript("var confirm = 
false;", null));

response.render($(component).on("click",
new JavaScriptInlineFunction(""
+ "var element = $(this);"
+ "evt.preventDefault();"
+ "if(confirm == false){"
+ "evt.stopImmediatePropagation();"
+ "bootbox.confirm(\"" + message + "\", 
function(result){"

+ "if(result == true){"
+ "confirm = true;"
+ "element.click();"
+ "}"
+ "else{confirm = false;}"
+ "return true;"
+ "})} "
+ "else {confirm = false;};"
)).asDomReadyScript());
}
}

and this is the generated html






class="bootbox-close-button close" type="button" style="margin-top: 
-10px;">×
Do you really want to delete 
the selected item(s)?



data-bb-handler="cancel">Cancel
data-bb-handler="confirm">OK






Any suggestions?

Regards
M

--
Dott. Marco Di Sabatino Di Diodoro
Tel. +39 3939065570

Tirasa S.r.l.
Viale D'Annunzio 267 - 65127 Pescara
Tel +39 0859116307 / FAX +39 085973
http://www.tirasa.net

Apache Syncope PMC Member
http://people.apache.org/~mdisabatino/



Re: WicketTester and confirmation modal

2016-01-15 Thread Marco Di Sabatino Di Diodoro



Il 15/01/2016 13:51, Martin Grigorov ha scritto:

Hi,

You cannot test JavaScript with WicketTester.
You can set some request parameter that says "confirmed" or "denied" and
make a request to the server side where you process it.

You can use something like Selenium for testing real clicks in JavaScript.

Thanks, for your support.
I used wicketTester.getRequest().addParameter("confirm", "true");

Regards
M

Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov

On Fri, Jan 15, 2016 at 11:13 AM, Marco Di Sabatino Di Diodoro <
marco.disabat...@tirasa.net> wrote:


Hi all,

I'm implementing tests with WicketTester for Apache Syncope console.
How can I simulate a click on my confirmation modal?

This is my java class

public class ConfirmationModalBehavior extends Behavior {

 private final String message;

 public ConfirmationModalBehavior() {
 this("confirmDelete");
 }

 public ConfirmationModalBehavior(final String msg) {
 message = new ResourceModel(msg, "Are you sure?").getObject();
 }

 @Override
 public void renderHead(final Component component, final
IHeaderResponse response) {
 super.renderHead(component, response);

 response.render(JavaScriptHeaderItem.forScript("var confirm =
false;", null));
 response.render($(component).on("click",
 new JavaScriptInlineFunction(""
 + "var element = $(this);"
 + "evt.preventDefault();"
 + "if(confirm == false){"
 + "evt.stopImmediatePropagation();"
 + "bootbox.confirm(\"" + message + "\",
function(result){"
 + "if(result == true){"
 + "confirm = true;"
 + "element.click();"
 + "}"
 + "else{confirm = false;}"
 + "return true;"
 + "})} "
 + "else {confirm = false;};"
 )).asDomReadyScript());
 }
}

and this is the generated html


 
     
         
         ×
 Do you really want to delete the
selected item(s)?
 
 
 Cancel
 OK
 
 
 


Any suggestions?

Regards
M

--
Dott. Marco Di Sabatino Di Diodoro
Tel. +39 3939065570

Tirasa S.r.l.
Viale D'Annunzio 267 - 65127 Pescara
Tel +39 0859116307 / FAX +39 085973
http://www.tirasa.net

Apache Syncope PMC Member
http://people.apache.org/~mdisabatino/




--
Dott. Marco Di Sabatino Di Diodoro
Tel. +39 3939065570

Tirasa S.r.l.
Viale D'Annunzio 267 - 65127 Pescara
Tel +39 0859116307 / FAX +39 085973
http://www.tirasa.net

Apache Syncope PMC Member
http://people.apache.org/~mdisabatino/



Delete old feedback messages

2015-12-22 Thread Marco Di Sabatino Di Diodoro

Hi all,

how can I delete old feedback messagesfor a new request?The previous 
feedback messages are not deleted from the list.


Regards
Marco

--
Dott. Marco Di Sabatino Di Diodoro
Tel. +39 3939065570

Tirasa S.r.l.
Viale D'Annunzio 267 - 65127 Pescara
Tel +39 0859116307 / FAX +39 085973
http://www.tirasa.net

Apache Syncope PMC Member
http://people.apache.org/~mdisabatino/



Re: Delete old feedback messages

2015-12-22 Thread Marco Di Sabatino Di Diodoro



Il 22/12/2015 13:01, Martin Grigorov ha scritto:

Just set a default cleanup filter that clears all messages, not just the
rendered ones.

Thanks for your help. It's works
Marco


Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov

On Tue, Dec 22, 2015 at 12:54 PM, Marco Di Sabatino Di Diodoro <
marco.disabat...@tirasa.net> wrote:


Hi Martin,

Il 22/12/2015 12:14, Martin Grigorov ha scritto:


Hi,

By default Wicket removes all _rendered_ messages. If they are not
rendered
in the previous request cycle then they stay for the next one.
See
org.apache.wicket.settings.ApplicationSettings#setFeedbackMessageCleanupFilter()
and org.apache.wicket.feedback.DefaultCleanupFeedbackMessageFilter


thanks for your help. but how can I force the cleaning. I saw the two
methods, but it's not clear to me how I should do.

Marco


Martin Grigorov

Wicket Training and Consulting
https://twitter.com/mtgrigorov

On Tue, Dec 22, 2015 at 11:25 AM, Marco Di Sabatino Di Diodoro <
marco.disabat...@tirasa.net> wrote:

Hi all,

how can I delete old feedback messagesfor a new request?The previous
feedback messages are not deleted from the list.

Regards
Marco

--
Dott. Marco Di Sabatino Di Diodoro
Tel. +39 3939065570

Tirasa S.r.l.
Viale D'Annunzio 267 - 65127 Pescara
Tel +39 0859116307 / FAX +39 085973
http://www.tirasa.net

Apache Syncope PMC Member
http://people.apache.org/~mdisabatino/




--
Dott. Marco Di Sabatino Di Diodoro
Tel. +39 3939065570

Tirasa S.r.l.
Viale D'Annunzio 267 - 65127 Pescara
Tel +39 0859116307 / FAX +39 085973
http://www.tirasa.net

Apache Syncope PMC Member
http://people.apache.org/~mdisabatino/




--
Dott. Marco Di Sabatino Di Diodoro
Tel. +39 3939065570

Tirasa S.r.l.
Viale D'Annunzio 267 - 65127 Pescara
Tel +39 0859116307 / FAX +39 085973
http://www.tirasa.net

Apache Syncope PMC Member
http://people.apache.org/~mdisabatino/


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



Re: Delete old feedback messages

2015-12-22 Thread Marco Di Sabatino Di Diodoro

Hi Martin,

Il 22/12/2015 12:14, Martin Grigorov ha scritto:

Hi,

By default Wicket removes all _rendered_ messages. If they are not rendered
in the previous request cycle then they stay for the next one.
See 
org.apache.wicket.settings.ApplicationSettings#setFeedbackMessageCleanupFilter()
and org.apache.wicket.feedback.DefaultCleanupFeedbackMessageFilter
thanks for your help. but how can I force the cleaning. I saw the two 
methods, but it's not clear to me how I should do.


Marco


Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov

On Tue, Dec 22, 2015 at 11:25 AM, Marco Di Sabatino Di Diodoro <
marco.disabat...@tirasa.net> wrote:


Hi all,

how can I delete old feedback messagesfor a new request?The previous
feedback messages are not deleted from the list.

Regards
Marco

--
Dott. Marco Di Sabatino Di Diodoro
Tel. +39 3939065570

Tirasa S.r.l.
Viale D'Annunzio 267 - 65127 Pescara
Tel +39 0859116307 / FAX +39 085973
http://www.tirasa.net

Apache Syncope PMC Member
http://people.apache.org/~mdisabatino/




--
Dott. Marco Di Sabatino Di Diodoro
Tel. +39 3939065570

Tirasa S.r.l.
Viale D'Annunzio 267 - 65127 Pescara
Tel +39 0859116307 / FAX +39 085973
http://www.tirasa.net

Apache Syncope PMC Member
http://people.apache.org/~mdisabatino/



Re: Avoid busy indicator into DataTable

2015-11-27 Thread Marco Di Sabatino Di Diodoro



Il 27/11/2015 11:21, Marco Di Sabatino Di Diodoro ha scritto:

Hi all,

I add a checkgroup into datatable.

group = new ActionTableCheckGroup("checkgroup", model) {

};

group.add(new AjaxFormChoiceComponentUpdatingBehavior() {

private static final long serialVersionUID = 
-151291731388673682L;


@Override
protected void onUpdate(final AjaxRequestTarget target) {
}
});

When I select all or one checkbox, the Ajax busy Indicator begins with 
flickering for all the chosen elements. How can I remove this behavior 
for the checkgroup component?
One solution was to ovverride BootstrapAjaxPagingNavigator with an 
submit link and remove AjaxFormChoiceComponentUpdatingBehavior, but 
prev and next aren't working for me.


Any suggestions are welcome

I solved the problem my question by extending the 
AjaxFormChoiceComponentUpdatingBehavior class and implementing 
IAjaxIndicatorAware.


Regards
M

Marco



--
Dott. Marco Di Sabatino Di Diodoro
Tel. +39 3939065570

Tirasa S.r.l.
Viale D'Annunzio 267 - 65127 Pescara
Tel +39 0859116307 / FAX +39 085973
http://www.tirasa.net

Apache Syncope PMC Member
http://people.apache.org/~mdisabatino/


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



Avoid busy indicator into DataTable

2015-11-27 Thread Marco Di Sabatino Di Diodoro

Hi all,

I add a checkgroup into datatable.

group = new ActionTableCheckGroup("checkgroup", model) {

};

group.add(new AjaxFormChoiceComponentUpdatingBehavior() {

private static final long serialVersionUID = 
-151291731388673682L;


@Override
protected void onUpdate(final AjaxRequestTarget target) {
}
});

When I select all or one checkbox, the Ajax busy Indicator begins with 
flickering for all the chosen elements. How can I remove this behavior 
for the checkgroup component?
One solution was to ovverride BootstrapAjaxPagingNavigator with an 
submit link and remove AjaxFormChoiceComponentUpdatingBehavior, but prev 
and next aren't working for me.


Any suggestions are welcome

Marco

--
Dott. Marco Di Sabatino Di Diodoro
Tel. +39 3939065570

Tirasa S.r.l.
Viale D'Annunzio 267 - 65127 Pescara
Tel +39 0859116307 / FAX +39 085973
http://www.tirasa.net

Apache Syncope PMC Member
http://people.apache.org/~mdisabatino/



Re: Custom confirmation behavior

2015-09-24 Thread Marco Di Sabatino Di Diodoro

Hi Sven,

Thanks for your help, I solved my problem.

Regards
Marco

Il 23/09/2015 16:01, Sven Meier ha scritto:

Hi,

you'll have to trigger the AjaxLink by yourself after the user 
confirmed your bootbox:


http://stackoverflow.com/questions/30064980/pass-the-triggered-element-to-the-bootbox-callback-jquery 



Have fun
Sven


On 23.09.2015 15:06, Marco Di Sabatino Di Diodoro wrote:

Hi Sven,

thanks for your help

Il 23/09/2015 14:28, Sven Meier ha scritto:

Hi,

you'll have to call #stopImmediatePropagation() to prevent AjaxLink 
from handling the "click" event.


I added your suggestion in my code

response.render($(component).on("click",
new JavaScriptInlineFunction(""
+ "evt.preventDefault();"
+ "evt.stopImmediatePropagation();"
+ "bootbox.confirm(\"Are you sure?\", 
function(result){return true;});"

)).asDomReadyScript());

now the onClick is never performed.

M


Have fun
Sven


On 23.09.2015 14:17, Marco Di Sabatino Di Diodoro wrote:

Hi,

I like to add a confirmation dialog to my application with 
Bootbox.js. To do this I created a new//ConfirmationModalBehavior 
(I haven taken ConfirmationBehavior from wicket-bootstrap as 
example) with


@Override
public void renderHead(final Component component, final 
IHeaderResponse response) {

super.renderHead(component, response);

References.renderWithFilter(response, 
JavaScriptHeaderItem.forReference(new JQueryPluginResourceReference(

ConfirmationModalBehavior.class, "bootbox.min.js")));

response.render($(component).on("click",
new JavaScriptInlineFunction(""
+ "evt.preventDefault();"
+ "bootbox.confirm(\"Are you sure?\", 
function (result) {"

+  "return true;" +
"});")).asDomReadyScript());
}
/
/and in my wicket page

 final AjaxLink deleteLink = new AjaxLink("deleteLink", 
Model.of("Delete")) {


private static final long serialVersionUID = 
3776750333491622263L;


@Override
public void onClick(final AjaxRequestTarget target) {
info("Invoked link's #onClick()!");
}
};

 deleteLink.add(new ConfirmationModalBehavior());

when I click on the AjaxLink, the confirm dialog is displayed after 
the execution of the onclick method. What's wrong?


Regards
M




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






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



--
Dott. Marco Di Sabatino Di Diodoro
Tel. +39 3939065570

Tirasa S.r.l.
Viale D'Annunzio 267 - 65127 Pescara
Tel +39 0859116307 / FAX +39 085973
http://www.tirasa.net

Apache Syncope PMC Member
http://people.apache.org/~mdisabatino/



Re: Custom confirmation behavior

2015-09-23 Thread Marco Di Sabatino Di Diodoro

Hi Sven,

thanks for your help

Il 23/09/2015 14:28, Sven Meier ha scritto:

Hi,

you'll have to call #stopImmediatePropagation() to prevent AjaxLink 
from handling the "click" event.


I added your suggestion in my code

response.render($(component).on("click",
new JavaScriptInlineFunction(""
+ "evt.preventDefault();"
+ "evt.stopImmediatePropagation();"
+ "bootbox.confirm(\"Are you sure?\", 
function(result){return true;});"

)).asDomReadyScript());

now the onClick is never performed.

M


Have fun
Sven


On 23.09.2015 14:17, Marco Di Sabatino Di Diodoro wrote:

Hi,

I like to add a confirmation dialog to my application with 
Bootbox.js. To do this I created a new//ConfirmationModalBehavior (I 
haven taken ConfirmationBehavior from wicket-bootstrap as example) with


@Override
public void renderHead(final Component component, final 
IHeaderResponse response) {

super.renderHead(component, response);

References.renderWithFilter(response, 
JavaScriptHeaderItem.forReference(new JQueryPluginResourceReference(

ConfirmationModalBehavior.class, "bootbox.min.js")));

response.render($(component).on("click",
new JavaScriptInlineFunction(""
+ "evt.preventDefault();"
+ "bootbox.confirm(\"Are you sure?\", 
function (result) {"

+  "return true;" +
"});")).asDomReadyScript());
}
/
/and in my wicket page

 final AjaxLink deleteLink = new AjaxLink("deleteLink", 
Model.of("Delete")) {


private static final long serialVersionUID = 
3776750333491622263L;


@Override
public void onClick(final AjaxRequestTarget target) {
info("Invoked link's #onClick()!");
}
};

 deleteLink.add(new ConfirmationModalBehavior());

when I click on the AjaxLink, the confirm dialog is displayed after 
the execution of the onclick method. What's wrong?


Regards
M




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



--
Dott. Marco Di Sabatino Di Diodoro
Tel. +39 3939065570

Tirasa S.r.l.
Viale D'Annunzio 267 - 65127 Pescara
Tel +39 0859116307 / FAX +39 085973
http://www.tirasa.net

Apache Syncope PMC Member
http://people.apache.org/~mdisabatino/


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



Custom confirmation behavior

2015-09-23 Thread Marco Di Sabatino Di Diodoro

Hi,

I like to add a confirmation dialog to my application with Bootbox.js. 
To do this I created a new//ConfirmationModalBehavior (I haven taken 
ConfirmationBehavior from wicket-bootstrap as example) with


@Override
public void renderHead(final Component component, final 
IHeaderResponse response) {

super.renderHead(component, response);

References.renderWithFilter(response, 
JavaScriptHeaderItem.forReference(new JQueryPluginResourceReference(

ConfirmationModalBehavior.class, "bootbox.min.js")));

response.render($(component).on("click",
new JavaScriptInlineFunction(""
+ "evt.preventDefault();"
+ "bootbox.confirm(\"Are you sure?\", function 
(result) {"

+  "return true;" +
"});")).asDomReadyScript());
}
/
/and in my wicket page

 final AjaxLink deleteLink = new AjaxLink("deleteLink", 
Model.of("Delete")) {


private static final long serialVersionUID = 
3776750333491622263L;


@Override
public void onClick(final AjaxRequestTarget target) {
info("Invoked link's #onClick()!");
}
};

 deleteLink.add(new ConfirmationModalBehavior());

when I click on the AjaxLink, the confirm dialog is displayed after the 
execution of the onclick method. What's wrong?


Regards
M

--
Dott. Marco Di Sabatino Di Diodoro
Tel. +39 3939065570

Tirasa S.r.l.
Viale D'Annunzio 267 - 65127 Pescara
Tel +39 0859116307 / FAX +39 085973
http://www.tirasa.net

Apache Syncope PMC Member
http://people.apache.org/~mdisabatino/



JQuery onclick events broken on component reloading

2015-09-16 Thread Marco Di Sabatino Di Diodoro

Hi All,

I've some trouble working to integrate AdminLTE template onto my wicket 
application (wicket-bootstrap based).
An AdminLTE SimpleThemeProvider  has been implemented and configured 
successfully.
Currently, I'm working to create a sidebar panel based on AdminLTE 
components: this component is created dynamically based on items 
retrieved via REST querying my server.


The AdminLTE sidebar is a  side menu managed by specifying particular 
behaviours (defined by JQuery functions) for specific click events.
This events are given by the AdminLTE.js javascript file itself included 
among page header items and executed at every page loading.


Till this point, everything works fine.
The problem occurs when I need to reload the sidebar panel ( via 
target.add(sidebar) ): in fact this operation seems to break each link 
between click events and behaviours previously defined on panel side bar 
components (via AdminLTE.js, as said before).


 To fix the problem AdminLTE.js re-execution is required. I implemented 
this operation by providing a renderHead function into the side bar 
panel that I'm going to reload.


@Override
public void renderHead(final IHeaderResponse response) {
super.renderHead(response);

final PackageTextTemplate ptt = new 
PackageTextTemplate(AdminLTE.class, "js/AdminLTE-app.min.js");

response.render(OnLoadHeaderItem.forScript(ptt.asString()));
}

In this way some malfunctions have been introduced: it seems that at the 
first page loading the same event is attached twice.
By including a boolean into the panel to check for the first loading, it 
seems that I solve the problem  at least for the sidebar panel 
itself. Unfortunately, other components seem to be affected by this 
multi-execution.


What is the best-practice to manage this kind of scenario? Can someone 
help me with this issue?


Regards
Marco

--
Dott. Marco Di Sabatino Di Diodoro
Tel. +39 3939065570

Tirasa S.r.l.
Viale D'Annunzio 267 - 65127 Pescara
Tel +39 0859116307 / FAX +39 085973
http://www.tirasa.net

Apache Syncope PMC Member
http://people.apache.org/~mdisabatino/



Re: Modal closed callback

2015-08-28 Thread Marco Di Sabatino Di Diodoro

Hi Gabriel,

thanks for your help.

Regards
Marco

Il 27/08/2015 20:27, Gabriel Landon ha scritto:

You mean something like this :

public class PanelContentModal extends ModalVoid {
 /** close callback. */
 private WindowClosedCallback windowClosedCallback = null;


 public PanelContentModal(final String varMarkupId) {
 super(varMarkupId);
 setUseCloseHandler(true);
 }

 @Override
 protected void onClose(final AjaxRequestTarget paramTarget) {
 if (windowClosedCallback != null) {
 windowClosedCallback.onClose(paramTarget);
 }
 }

  public PanelContentModal setWindowClosedCallback(final
WindowClosedCallback callback) {
 windowClosedCallback = callback;
 return this;
 }
}

And then use it like a ModalWindow :

PanelContentModal  modal = new PanelContentModal(yourId);
modal.setWindowClosedCallback(new WindowClosedCallback() {
 @Override
 public void onClose(final AjaxRequestTarget paramTarget) {
 // Do your refresh
 }
});

regards,

Gabriel.
});

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Modal-closed-callback-tp4671861p4671862.html
Sent from the Users forum mailing list archive at Nabble.com.

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



--
Dott. Marco Di Sabatino Di Diodoro
Tel. +39 3939065570

Tirasa S.r.l.
Viale D'Annunzio 267 - 65127 Pescara
Tel +39 0859116307 / FAX +39 085973
http://www.tirasa.net

Apache Syncope PMC Member
http://people.apache.org/~mdisabatino/



Modal closed callback

2015-08-27 Thread Marco Di Sabatino Di Diodoro

Hi,

I'm using de.agilecoders.wicket.core.markup.html.bootstrap.dialog.Modal, 
how can I implement a Modal Closed Callback? I must refresh a ListView 
after submit from a Modal.


Thanks
Marco

--
Dott. Marco Di Sabatino Di Diodoro
Tel. +39 3939065570

Tirasa S.r.l.
Viale D'Annunzio 267 - 65127 Pescara
Tel +39 0859116307 / FAX +39 085973
http://www.tirasa.net

Apache Syncope PMC Member
http://people.apache.org/~mdisabatino/



Re: Add components inside the footer and header of a Modal

2015-08-27 Thread Marco Di Sabatino Di Diodoro

Hi Martin,


Il 24/08/2015 22:06, Martin Grigorov ha scritto:

Hi,

On Mon, Aug 24, 2015 at 4:05 PM, Marco Di Sabatino Di Diodoro 
marco.disabat...@tirasa.net wrote:


Hi Martin,

Il 24/08/2015 12:16, Martin Grigorov ha scritto:


Hi,

1. File an issue so that becomes more user friendly.


I opened the issue on git

2. You can roll MyModal that extends from Modal and has MyModal.html with

the extra components in header and footer. In MyModal#onInitialize() you
can use get(header).add(anExtraHeaderComponent)


I followed your suggestion and I added a new button in the footer. At
first time I can see my Modal. If I close and reopen I have this exception:
org.apache.wicket.markup.MarkupNotFoundException: Failed to find markup
file associated

If I remove my button, I can open and close without problems.

Without giving us more information (e.g. code and/or stacktrace) we cannot
tell you what is wrong.

here is my source code.

public class BaseModalT extends ModalT {
...
...
public BaseModal(final String id) {
super(id);
container = new WebMarkupContainer(container);
container.add(new EmptyPanel(CONTENT));
container.setOutputMarkupId(true);
add(container);
}

@Override
public MarkupContainer addOrReplace(final Component... component) {
return container.addOrReplace(component);
}

public static String getModalContentId() {
return CONTENT;
}
}

BaseModal.html

html xmlns=http://www.w3.org/1999/xhtml; 
xmlns:wicket=http://wicket.apache.org;

  wicket:panel
div class=modal-dialog wicket:id=dialog
  div class=modal-content
div wicket:id=header class=modal-header
  button type=button class=close data-dismiss=modal 
aria-hidden=truetimes;/button
  h4 wicket:id=header-label class=modal-titleModal 
header/h4

/div
div class=modal-body
  div wicket:id=container
span wicket:id=modalContent[modalContent]/span
  /div
/div
div class=modal-footer
  span wicket:id=footer
wicket:fragment wicket:id=buttons
  button type=button wicket:id=button/button
/wicket:fragment
  /span
/div
  /div
/div
  /wicket:panel
/html

If I close and reopen I have this exception:

org.apache.wicket.markup.MarkupNotFoundException: Failed to find markup 
file associated. RealmModalPanel: [RealmModalPanel [Component id = 
modalContent]]
   at 
org.apache.wicket.markup.html.panel.AssociatedMarkupSourcingStrategy.getMarkup(AssociatedMarkupSourcingStrategy.java:98) 
~[wicket-core-7.0.0.jar:7.0.0]
   at 
org.apache.wicket.MarkupContainer.getMarkup(MarkupContainer.java:453) 
~[wicket-core-7.0.0.jar:7.0.0]
   at org.apache.wicket.Component.getMarkup(Component.java:755) 
~[wicket-core-7.0.0.jar:7.0.0]
   at org.apache.wicket.Component.getMarkupTag(Component.java:1438) 
~[wicket-core-7.0.0.jar:7.0.0]
   at 
org.apache.wicket.Component.getMarkupAttributes(Component.java:1467) 
~[wicket-core-7.0.0.jar:7.0.0]
   at 
org.apache.wicket.ajax.form.AjaxFormSubmitBehavior.updateAjaxAttributes(AjaxFormSubmitBehavior.java:148) 
~[wicket-core-7.0.0.jar:7.0.0]
   at 
org.apache.wicket.ajax.markup.html.form.AjaxSubmitLink$1.updateAjaxAttributes(AjaxSubmitLink.java:103) 
~[wicket-core-7.0.0.jar:7.0.0]
   at 
org.apache.wicket.ajax.AbstractDefaultAjaxBehavior.getAttributes(AbstractDefaultAjaxBehavior.java:146) 
~[wicket-core-7.0.0.jar:7.0.0]
   at 
org.apache.wicket.ajax.AbstractDefaultAjaxBehavior.renderExtraHeaderContributors(AbstractDefaultAjaxBehavior.java:119) 
~[wicket-core-7.0.0.jar:7.0.0]
   at 
org.apache.wicket.ajax.AbstractDefaultAjaxBehavior.renderHead(AbstractDefaultAjaxBehavior.java:104) 
~[wicket-core-7.0.0.jar:7.0.0]
   at 
org.apache.wicket.ajax.AjaxEventBehavior.renderHead(AjaxEventBehavior.java:90) 
~[wicket-core-7.0.0.jar:7.0.0]
   at 
org.apache.wicket.Component.internalRenderHead(Component.java:2726) 
~[wicket-core-7.0.0.jar:7.0.0]
   at 
org.apache.wicket.markup.renderStrategy.ChildFirstHeaderRenderStrategy$1.component(ChildFirstHeaderRenderStrategy.java:85) 
~[wicket-core-7.0.0.jar:7.0.0]
   at 
org.apache.wicket.markup.renderStrategy.DeepChildFirstVisitor.visit(DeepChildFirstVisitor.java:96) 
~[wicket-core-7.0.0.jar:7.0.0]
   at 
org.apache.wicket.markup.renderStrategy.DeepChildFirstVisitor.visit(DeepChildFirstVisitor.java:87) 
~[wicket-core-7.0.0.jar:7.0.0]
   at 
org.apache.wicket.markup.renderStrategy.DeepChildFirstVisitor.visit(DeepChildFirstVisitor.java:87) 
~[wicket-core-7.0.0.jar:7.0.0]
   at 
org.apache.wicket.markup.renderStrategy.DeepChildFirstVisitor.visit(DeepChildFirstVisitor.java:87) 
~[wicket-core-7.0.0.jar:7.0.0]
   at 
org.apache.wicket.markup.renderStrategy.DeepChildFirstVisitor.visit(DeepChildFirstVisitor.java:87) 
~[wicket-core-7.0.0.jar:7.0.0

Re: Add components inside the footer and header of a Modal

2015-08-24 Thread Marco Di Sabatino Di Diodoro

Hi Martin,

Il 24/08/2015 12:16, Martin Grigorov ha scritto:

Hi,

1. File an issue so that becomes more user friendly.

I opened the issue on git


2. You can roll MyModal that extends from Modal and has MyModal.html with
the extra components in header and footer. In MyModal#onInitialize() you
can use get(header).add(anExtraHeaderComponent)
I followed your suggestion and I added a new button in the footer. At 
first time I can see my Modal. If I close and reopen I have this exception:
org.apache.wicket.markup.MarkupNotFoundException: Failed to find markup 
file associated


If I remove my button, I can open and close without problems.

Marco

Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov

On Mon, Aug 24, 2015 at 11:46 AM, Marco Di Sabatino Di Diodoro 
marco.disabat...@tirasa.net wrote:


Hi all,

I'm using wicket-bootstrap to implement a new console.
In this moment, I'm implementing my Modal with
de.agilecoders.wicket.core.markup.html.bootstrap.dialog.Modal component.

I would like to add some components in the header or footer, but all
fields are declared private and the aren't getter and setter methods.
What can I do? Any suggestions?

Regards
Marco

--
Dott. Marco Di Sabatino Di Diodoro
Tel. +39 3939065570

Tirasa S.r.l.
Viale D'Annunzio 267 - 65127 Pescara
Tel +39 0859116307 / FAX +39 085973
http://www.tirasa.net

Apache Syncope PMC Member
http://people.apache.org/~mdisabatino/




--
Dott. Marco Di Sabatino Di Diodoro
Tel. +39 3939065570

Tirasa S.r.l.
Viale D'Annunzio 267 - 65127 Pescara
Tel +39 0859116307 / FAX +39 085973
http://www.tirasa.net

Apache Syncope PMC Member
http://people.apache.org/~mdisabatino/



Add components inside the footer and header of a Modal

2015-08-24 Thread Marco Di Sabatino Di Diodoro

Hi all,

I'm using wicket-bootstrap to implement a new console.
In this moment, I'm implementing my Modal with 
de.agilecoders.wicket.core.markup.html.bootstrap.dialog.Modal component.


I would like to add some components in the header or footer, but all 
fields are declared private and the aren't getter and setter methods.

What can I do? Any suggestions?

Regards
Marco

--
Dott. Marco Di Sabatino Di Diodoro
Tel. +39 3939065570

Tirasa S.r.l.
Viale D'Annunzio 267 - 65127 Pescara
Tel +39 0859116307 / FAX +39 085973
http://www.tirasa.net

Apache Syncope PMC Member
http://people.apache.org/~mdisabatino/



Next Apache Wicket Release

2014-02-06 Thread Marco Di Sabatino Di Diodoro
Hi all,

You know approximately when Apache Wicket 6.14 will be released?

Thanks
M

-- 
Dott. Marco Di Sabatino Di Diodoro
Tel. +39 3939065570

Tirasa S.r.l.
Viale D'Annunzio 267 - 65127 Pescara
Tel +39 0859116307 / FAX +39 085973
http://www.tirasa.net

Apache Syncope PMC Member
http://people.apache.org/~mdisabatino/



Re: Next Apache Wicket Release

2014-02-06 Thread Marco Di Sabatino Di Diodoro
Hi,

Il giorno 06/feb/2014, alle ore 14:38, Martin Grigorov mgrigo...@apache.org 
ha scritto:

 6.13.0 has been released at Jan 05 (
 http://wicket.apache.org/2014/01/05/wicket-6.13.0-released.html) so it is
 about time for 6.14.0.
 It depends whether our release manager (Martijn Dashorst) will have time to
 do this week.
 As far as I remember Apache Syncope uses 6.14.0-SNAPSHOT at the moment,
 right ? You don't experience any problems with it ?

No problems with 6.14.0-SNAPSHOT.

Thanks
M

 
 Martin Grigorov
 Wicket Training and Consulting
 
 
 On Thu, Feb 6, 2014 at 2:30 PM, Andrea Del Bene an.delb...@gmail.comwrote:
 
 Hi Marco!
 
 In a week or two, according to what Martin said.
 Hi all,
 
 You know approximately when Apache Wicket 6.14 will be released?
 
 Thanks
 M
 
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 
 

-- 
Dott. Marco Di Sabatino Di Diodoro
Tel. +39 3939065570

Tirasa S.r.l.
Viale D'Annunzio 267 - 65127 Pescara
Tel +39 0859116307 / FAX +39 085973
http://www.tirasa.net

Apache Syncope PMC Member
http://people.apache.org/~mdisabatino/



Upgrade to 6.13.0 Alert popup appears through page navigation after modal window closing

2014-01-15 Thread Marco Di Sabatino Di Diodoro
Hi all,

Upgrade to 6.13.0:

after the closing of a modal window if I click on another page, appear a alert 
popup that asks whether to leave or stay into the modal window.
It seems that something is still hanging after the modal window has been closed.

Can you help me?

Thanks
M


-- 
Dott. Marco Di Sabatino Di Diodoro
Tel. +39 3939065570

Tirasa S.r.l.
Viale D'Annunzio 267 - 65127 Pescara
Tel +39 0859116307 / FAX +39 085973
http://www.tirasa.net

Apache Syncope PMC Member
http://people.apache.org/~mdisabatino/



Re: Upgrade to 6.13.0 Alert popup appears through page navigation after modal window closing

2014-01-15 Thread Marco Di Sabatino Di Diodoro
Thanks Martin,

is 5469 the ticket number?

M

Il giorno 15/gen/2014, alle ore 09:57, Martin Grigorov mgrigo...@apache.org 
ha scritto:

 There is a ticket about this with a workaround.
 Unfortunately Apache Jira doesn't work again.
 
 Martin Grigorov
 Wicket Training and Consulting
 
 
 On Wed, Jan 15, 2014 at 10:54 AM, Marco Di Sabatino Di Diodoro 
 marco.disabat...@tirasa.net wrote:
 
 Hi all,
 
 Upgrade to 6.13.0:
 
 after the closing of a modal window if I click on another page, appear a
 alert popup that asks whether to leave or stay into the modal window.
 It seems that something is still hanging after the modal window has been
 closed.
 
 Can you help me?
 
 Thanks
 M
 
 
 --
 Dott. Marco Di Sabatino Di Diodoro
 Tel. +39 3939065570
 
 Tirasa S.r.l.
 Viale D'Annunzio 267 - 65127 Pescara
 Tel +39 0859116307 / FAX +39 085973
 http://www.tirasa.net
 
 Apache Syncope PMC Member
 http://people.apache.org/~mdisabatino/
 
 

-- 
Dott. Marco Di Sabatino Di Diodoro
Tel. +39 3939065570

Tirasa S.r.l.
Viale D'Annunzio 267 - 65127 Pescara
Tel +39 0859116307 / FAX +39 085973
http://www.tirasa.net

Apache Syncope PMC Member
http://people.apache.org/~mdisabatino/



Re: Upgrade to 6.13.0 Alert popup appears through page navigation after modal window closing

2014-01-15 Thread Marco Di Sabatino Di Diodoro
Hi Martin,

Il giorno 15/gen/2014, alle ore 10:30, Martin Grigorov mgrigo...@apache.org 
ha scritto:

 Yes, and it is fixed now.
 

Thank you very much.

Regards
M

 Martin Grigorov
 Wicket Training and Consulting
 
 
 On Wed, Jan 15, 2014 at 11:17 AM, Marco Di Sabatino Di Diodoro 
 marco.disabat...@tirasa.net wrote:
 
 Thanks Martin,
 
 is 5469 the ticket number?
 
 M
 
 Il giorno 15/gen/2014, alle ore 09:57, Martin Grigorov 
 mgrigo...@apache.org ha scritto:
 
 There is a ticket about this with a workaround.
 Unfortunately Apache Jira doesn't work again.
 
 Martin Grigorov
 Wicket Training and Consulting
 
 
 On Wed, Jan 15, 2014 at 10:54 AM, Marco Di Sabatino Di Diodoro 
 marco.disabat...@tirasa.net wrote:
 
 Hi all,
 
 Upgrade to 6.13.0:
 
 after the closing of a modal window if I click on another page, appear a
 alert popup that asks whether to leave or stay into the modal window.
 It seems that something is still hanging after the modal window has been
 closed.
 
 Can you help me?
 
 Thanks
 M
 
 
 --
 Dott. Marco Di Sabatino Di Diodoro
 Tel. +39 3939065570
 
 Tirasa S.r.l.
 Viale D'Annunzio 267 - 65127 Pescara
 Tel +39 0859116307 / FAX +39 085973
 http://www.tirasa.net
 
 Apache Syncope PMC Member
 http://people.apache.org/~mdisabatino/
 
 
 
 --
 Dott. Marco Di Sabatino Di Diodoro
 Tel. +39 3939065570
 
 Tirasa S.r.l.
 Viale D'Annunzio 267 - 65127 Pescara
 Tel +39 0859116307 / FAX +39 085973
 http://www.tirasa.net
 
 Apache Syncope PMC Member
 http://people.apache.org/~mdisabatino/
 
 

-- 
Dott. Marco Di Sabatino Di Diodoro
Tel. +39 3939065570

Tirasa S.r.l.
Viale D'Annunzio 267 - 65127 Pescara
Tel +39 0859116307 / FAX +39 085973
http://www.tirasa.net

Apache Syncope PMC Member
http://people.apache.org/~mdisabatino/



PageReference#getPage return null

2014-01-14 Thread Marco Di Sabatino Di Diodoro
Hi all,

We upgrade Apache Syncope to Wicket 6.13.0 and PageReference#getPage is now 
returning null instead of the expectedPage instance [1].
What has changed from 6.12.0?

[1] https://issues.apache.org/jira/browse/SYNCOPE-476

Thanks
Marco
-- 
Dott. Marco Di Sabatino Di Diodoro
Tel. +39 3939065570

Tirasa S.r.l.
Viale D'Annunzio 267 - 65127 Pescara
Tel +39 0859116307 / FAX +39 085973
http://www.tirasa.net

Apache Syncope PMC Member
http://people.apache.org/~mdisabatino/



Re: PageReference#getPage return null

2014-01-14 Thread Marco Di Sabatino Di Diodoro
Hi Martin, 

Il giorno 14/gen/2014, alle ore 16:20, Martin Grigorov mgrigo...@apache.org 
ha scritto:

 Hi,
 
 Wild guess: you have a reference to non-initialized page (
 https://issues.apache.org/jira/browse/WICKET-5415)
 Non-initialized pages are not stored because they were not rendered.
 
 Try with page.internalInitialize() before page.getPageReference().
 

I solved the issue.

Thanks
Marco

 Martin Grigorov
 Wicket Training and Consulting
 
 
 On Tue, Jan 14, 2014 at 5:02 PM, Marco Di Sabatino Di Diodoro 
 marco.disabat...@tirasa.net wrote:
 
 Hi all,
 
 We upgrade Apache Syncope to Wicket 6.13.0 and PageReference#getPage is
 now returning null instead of the expectedPage instance [1].
 What has changed from 6.12.0?
 
 [1] https://issues.apache.org/jira/browse/SYNCOPE-476
 
 Thanks
 Marco
 --
 Dott. Marco Di Sabatino Di Diodoro
 Tel. +39 3939065570
 
 Tirasa S.r.l.
 Viale D'Annunzio 267 - 65127 Pescara
 Tel +39 0859116307 / FAX +39 085973
 http://www.tirasa.net
 
 Apache Syncope PMC Member
 http://people.apache.org/~mdisabatino/
 
 

-- 
Dott. Marco Di Sabatino Di Diodoro
Tel. +39 3939065570

Tirasa S.r.l.
Viale D'Annunzio 267 - 65127 Pescara
Tel +39 0859116307 / FAX +39 085973
http://www.tirasa.net

Apache Syncope PMC Member
http://people.apache.org/~mdisabatino/



Re: quick CRUD application

2013-11-13 Thread Marco Di Sabatino Di Diodoro
Hi,

take a look at Apache Syncope. 
Apache Syncope is an Open Source system for managing digital identities. The 
console is implemented with Apache Wicket.

BR
Marco


Il giorno 12/nov/2013, alle ore 23:39, saty satya...@gmail.com ha scritto:

 Ok, thanks
 
 
 
 
 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/quick-CRUD-application-tp4662346p4662350.html
 Sent from the Users forum mailing list archive at Nabble.com.
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 

-- 
Dott. Marco Di Sabatino Di Diodoro
Tel. +39 3939065570

Tirasa S.r.l.
Viale D'Annunzio 267 - 65127 Pescara
Tel +39 0859116307 / FAX +39 085973
http://www.tirasa.net

Apache Syncope PMC Member
http://people.apache.org/~mdisabatino/



Wicket Charts

2013-08-05 Thread Marco Di Sabatino Di Diodoro
Hi all, 

In your opinion, what is the best library (open source licensed) for creating 
charts with wicket?

Regards
M
-- 
Dott. Marco Di Sabatino Di Diodoro
Tel. +39 3939065570

Tirasa S.r.l.
Viale D'Annunzio 267 - 65127 Pescara
Tel +39 0859116307 / FAX +39 085973
http://www.tirasa.net

Apache Syncope PMC Member
http://people.apache.org/~mdisabatino/



Draw inside Apache Wicket

2013-07-29 Thread Marco Di Sabatino Di Diodoro
Hi all, 

I'm implementing a Dashboard with Apache Wicket. 
In the Dashboard I need to display a diagram with blocks and arrows that 
changes over time.

Can you suggest me a graphic library that allows me to draw inside Apache 
Wicket?

Thanks,

BR
M

-- 
Dott. Marco Di Sabatino Di Diodoro
Tel. +39 3939065570

Tirasa S.r.l.
Viale D'Annunzio 267 - 65127 Pescara
Tel +39 0859116307 / FAX +39 085973
http://www.tirasa.net

Apache Syncope PMC Member
http://people.apache.org/~mdisabatino/



Re: Draw inside Apache Wicket

2013-07-29 Thread Marco Di Sabatino Di Diodoro
Thanks to all,

Il giorno 29/lug/2013, alle ore 16:53, Pierre Goupil goupilpie...@gmail.com 
ha scritto:

 I can't reply, but I'd be curious to have a look at your dashboard
 application. Especially compared to that one:
 https://github.com/decebals/wicket-dashboard

I'm in the analysis phase of my development. 

I'm sorry

M
 
 Regards,
 
 Pierre
 
 
 
 On Mon, Jul 29, 2013 at 4:40 PM, Maxim Solodovnik solomax...@gmail.comwrote:
 
 Here is an example: https://github.com/andunslg/Whiteboard-Wicket/
 This project is currently in work-in-progress state
 
 
 On Mon, Jul 29, 2013 at 9:32 PM, Marco Di Sabatino Di Diodoro 
 marco.disabat...@tirasa.net wrote:
 
 Hi all,
 
 I'm implementing a Dashboard with Apache Wicket.
 In the Dashboard I need to display a diagram with blocks and arrows that
 changes over time.
 
 Can you suggest me a graphic library that allows me to draw inside Apache
 Wicket?
 
 Thanks,
 
 BR
 M
 
 --
 Dott. Marco Di Sabatino Di Diodoro
 Tel. +39 3939065570
 
 Tirasa S.r.l.
 Viale D'Annunzio 267 - 65127 Pescara
 Tel +39 0859116307 / FAX +39 085973
 http://www.tirasa.net
 
 Apache Syncope PMC Member
 http://people.apache.org/~mdisabatino/
 
 
 
 
 --
 WBR
 Maxim aka solomax
 
 
 
 
 -- 
 Un truc bien avec la musique, c'est que quand elle te frappe, tu n'as pas
 mal.
 Alors frappez-moi de musique !
 Frappez-moi de musique, maintenant !
 
 (Bob Marley : Trenchtown Rock)

-- 
Dott. Marco Di Sabatino Di Diodoro
Tel. +39 3939065570

Tirasa S.r.l.
Viale D'Annunzio 267 - 65127 Pescara
Tel +39 0859116307 / FAX +39 085973
http://www.tirasa.net

Apache Syncope PMC Member
http://people.apache.org/~mdisabatino/



DropDownChoice with Confirm Dialog

2013-07-24 Thread Marco Di Sabatino Di Diodoro
Hi all,

I like implement a DropDownChoice with an Confirm Dialog.
I used an AjaxFormComponentUpdatingBehavior(on change) to intercept the 
change in the DropDownChoice. 
In addition,  the user must first confirm the operation with a dialog before 
changing the value in the DropDownChoice. 

To do that I add an AjaxCallListeners:

@Override
protected void updateAjaxAttributes(final AjaxRequestAttributes 
attributes) {
super.updateAjaxAttributes(attributes);
final AjaxCallListener ajaxCallListener = new 
AjaxCallListener() {
private static final long serialVersionUID = 
7160235486520935153L;

@Override
public CharSequence getPrecondition(final Component 
component) {
return if (confirm(' + getString(confirmDelete) + 
')) return false;;
}  
};
attributes.getAjaxCallListeners().add(ajaxCallListener);
}});

When I click cancel on the Confirm Dialog, the DropDownChoice changes and I can 
not restore the old value. 
How I understand that the user clicked on Cancel? Is the correct way to 
implement this functionality?

Best Regards
M

-- 
Dott. Marco Di Sabatino Di Diodoro
Tel. +39 3939065570

Tirasa S.r.l.
Viale D'Annunzio 267 - 65127 Pescara
Tel +39 0859116307 / FAX +39 085973
http://www.tirasa.net

Apache Syncope PMC Member
http://people.apache.org/~mdisabatino/



Re: DropDownChoice with Confirm Dialog

2013-07-24 Thread Marco Di Sabatino Di Diodoro
Hi Martin,

attrs.event.preventDefault() not work. My DropDownChoice changes always.

M 

Il giorno 24/lug/2013, alle ore 10:59, Martin Grigorov mgrigo...@apache.org 
ha scritto:

 Hi,
 
 
 On Wed, Jul 24, 2013 at 11:54 AM, Marco Di Sabatino Di Diodoro 
 marco.disabat...@tirasa.net wrote:
 
 Hi all,
 
 I like implement a DropDownChoice with an Confirm Dialog.
 I used an AjaxFormComponentUpdatingBehavior(on change) to intercept the
 change in the DropDownChoice.
 In addition,  the user must first confirm the operation with a dialog
 before changing the value in the DropDownChoice.
 
 To do that I add an AjaxCallListeners:
 
@Override
protected void updateAjaxAttributes(final
 AjaxRequestAttributes attributes) {
super.updateAjaxAttributes(attributes);
final AjaxCallListener ajaxCallListener = new
 AjaxCallListener() {
private static final long serialVersionUID =
 7160235486520935153L;
 
@Override
public CharSequence getPrecondition(final Component
 component) {
return if (confirm(' +
 getString(confirmDelete) + ')) return false;;
 
 
 Try with: return if (confirm(' + getString(confirmDelete) +
 ')) { attrs.event.preventDefault(); return false;};
 
 The precondition just stops the Ajax call, but it has no logic to do
 anything else.
 
 
}
};
attributes.getAjaxCallListeners().add(ajaxCallListener);
}});
 
 When I click cancel on the Confirm Dialog, the DropDownChoice changes and
 I can not restore the old value.
 How I understand that the user clicked on Cancel? Is the correct way to
 implement this functionality?
 
 Best Regards
 M
 
 --
 Dott. Marco Di Sabatino Di Diodoro
 Tel. +39 3939065570
 
 Tirasa S.r.l.
 Viale D'Annunzio 267 - 65127 Pescara
 Tel +39 0859116307 / FAX +39 085973
 http://www.tirasa.net
 
 Apache Syncope PMC Member
 http://people.apache.org/~mdisabatino/
 
 

-- 
Dott. Marco Di Sabatino Di Diodoro
Tel. +39 3939065570

Tirasa S.r.l.
Viale D'Annunzio 267 - 65127 Pescara
Tel +39 0859116307 / FAX +39 085973
http://www.tirasa.net

Apache Syncope PMC Member
http://people.apache.org/~mdisabatino/



Skip dynamically an item in populateItem of ListView

2013-04-30 Thread Marco Di Sabatino Di Diodoro
Hi all,

Which is the best way to skip dynamically an item in populateItem of ListView. 
Currently I use setEnable and setVisible, but I like to know if there was a 
better approach. 

Regards
Marco


--

Dott. Marco Di Sabatino Di Diodoro
mdisabatinodidiod...@gmail.com





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



Re: Skip dynamically an item in populateItem of ListView

2013-04-30 Thread Marco Di Sabatino Di Diodoro

On Apr 30, 2013, at 3:19 PM, Maxim Solodovnik wrote:

 Maybe you can filter List prior to populate items from it?

No, I can not filter the List before.

M
 
 
 
 On Tue, Apr 30, 2013 at 8:01 PM, Marco Di Sabatino Di Diodoro 
 mdisabatinodidiod...@gmail.com wrote:
 
 Hi all,
 
 Which is the best way to skip dynamically an item in populateItem of
 ListView.
 Currently I use setEnable and setVisible, but I like to know if there was
 a better approach.
 
 Regards
 Marco
 
 
 --
 
 Dott. Marco Di Sabatino Di Diodoro
 mdisabatinodidiod...@gmail.com
 
 
 
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 
 
 -- 
 WBR
 Maxim aka solomax

--

Dott. Marco Di Sabatino Di Diodoro
Tel. +39 3939065570

Tirasa S.r.l.
Viale D'Annunzio 267 - 65127 Pescara
Tel +39 0859116307 / FAX +39 085973
http://www.tirasa.net

Apache Syncope PMC Member
http://people.apache.org/~mdisabatino







AjaxFallbackDefaultDataTable with checkbox column

2013-01-24 Thread Marco Di Sabatino Di Diodoro
Hi all,

I need to implement a AjaxFallbackDefaultDataTable that allow the user to 
select one or more rows by clicking on checkboxes located in a column. In 
addition I must implement select/deselect all in the header of the column.
Is there an example for wicket 6.X or suggestions? 

Marco
--

Dott. Marco Di Sabatino Di Diodoro
Tel. +39 3939065570

Tirasa S.r.l.
Viale D'Annunzio 267 - 65127 Pescara
Tel +39 0859116307 / FAX +39 085973
http://www.tirasa.net

Apache Syncope PMC Member
http://people.apache.org/~mdisabatino







Sort ListChoice component

2012-10-29 Thread Marco Di Sabatino Di Diodoro
Hi all, 

how can I sort ListChoice elements with moveUp and moveDown button?

Thanks
M
--

Dott. Marco Di Sabatino Di Diodoro
Tel. +39 3939065570

Tirasa S.r.l.
Viale D'Annunzio 267 - 65127 Pescara
Tel +39 0859116307 / FAX +39 085973
http://www.tirasa.net

Apache Syncope PPMC Member
http://people.apache.org/~mdisabatino






Re: Selected item into Palette

2012-10-25 Thread Marco Di Sabatino Di Diodoro
Hi Sven,

with Apache Wicket 1.5.8 

@Override
protected IAjaxCallDecorator getAjaxCallDecorator() {
return new 
AjaxPreprocessingCallDecorator(super.getAjaxCallDecorator()) {
private static final long serialVersionUID = 
-7927968187160354605L;

@Override
public CharSequence preDecorateScript(final CharSequence 
script) {
return script + reportlets.getEditOnClickJS();
}
};
}

I migrate to Apache Wicket 6.2

@Override
protected void updateAjaxAttributes(AjaxRequestAttributes 
attributes) {
super.updateAjaxAttributes(attributes);

final AjaxCallListener ajaxCallListener = new 
AjaxCallListener() {
private static final long serialVersionUID = 
7160235486520935153L;
 
@Override
public CharSequence getPrecondition(Component component) {
return reportlets.getEditOnClickJS();
}
};
attributes.getAjaxCallListeners().add(ajaxCallListener);
}

the reportlets.getEditOnClickJS(); call an javascript function 
Syncope.SingleColumnPalette.choicesOnFocus.  
My recorder.onselect is always null, how can I attached to the recorder 
component the javascript onselect event?

If you like, I can attach to Jira issue 
(https://issues.apache.org/jira/browse/WICKET-4834) my quickstart project with 
apache wicket 1.5.8. where everything worked correctly.

Thanks
Marco

On Oct 24, 2012, at 12:43 PM, Marco Di Sabatino Di Diodoro wrote:

 Hi,
 
 On Oct 23, 2012, at 6:41 PM, Sven Meier wrote:
 
 I'm not sure how you're using AjaxFormComponentUpdatingBehavior together 
 with the palette component.
 
 Please create a quickstart and attach it to a Jira issue.
 I create a quickstart and attach it to Jira issue 
 (https://issues.apache.org/jira/browse/WICKET-4834)
 
 Regards
 Marco
 
 
 Sven
 
 
 On 10/23/2012 05:42 PM, Marco Di Sabatino Di Diodoro wrote:
 Thanks,
 
 but i like have the current selected item in the palette. With Apache 
 Wicket 1.5.8 I use AjaxFormComponentUpdatingBehavior to see which item was 
 selected.
 Now, when I click on an item into palette the onUpdate method is never 
 invoked.
 
 Marco
 
 
 On Oct 23, 2012, at 5:31 PM, Sven Meier wrote:
 
 selectedItems = (ListFoo)palette.getDefaultModelObject()
 
 or
 
 palette = new Palette(palette, model, choices, ...);
 selectedItems = model.getObject();
 
 Sven
 
 On 10/23/2012 05:01 PM, Marco Di Sabatino Di Diodoro wrote:
 Hi all,
 
 With Apache Wicket 6.1.
 How can I get hold of a palette's selected item?
 
 Marco
 --
 
 Dott. Marco Di Sabatino Di Diodoro
 Tel. +39 3939065570
 
 Tirasa S.r.l.
 Viale D'Annunzio 267 - 65127 Pescara
 Tel +39 0859116307 / FAX +39 085973
 http://www.tirasa.net
 
 Apache Syncope PPMC Member
 http://people.apache.org/~mdisabatino
 
 
 
 
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 
 --
 
 Dott. Marco Di Sabatino Di Diodoro
 Tel. +39 3939065570
 
 Tirasa S.r.l.
 Viale D'Annunzio 267 - 65127 Pescara
 Tel +39 0859116307 / FAX +39 085973
 http://www.tirasa.net
 
 Apache Syncope PPMC Member
 http://people.apache.org/~mdisabatino
 
 
 
 
 
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 --
 
 Dott. Marco Di Sabatino Di Diodoro
 Tel. +39 3939065570
 
 Tirasa S.r.l.
 Viale D'Annunzio 267 - 65127 Pescara
 Tel +39 0859116307 / FAX +39 085973
 http://www.tirasa.net
 
 Apache Syncope PPMC Member
 http://people.apache.org/~mdisabatino
 
 
 
 

--

Dott. Marco Di Sabatino Di Diodoro
Tel. +39 3939065570

Tirasa S.r.l.
Viale D'Annunzio 267 - 65127 Pescara
Tel +39 0859116307 / FAX +39 085973
http://www.tirasa.net

Apache Syncope PPMC Member
http://people.apache.org/~mdisabatino






Re: Selected item into Palette

2012-10-24 Thread Marco Di Sabatino Di Diodoro
Hi,

On Oct 23, 2012, at 6:41 PM, Sven Meier wrote:

 I'm not sure how you're using AjaxFormComponentUpdatingBehavior together with 
 the palette component.
 
 Please create a quickstart and attach it to a Jira issue.
I create a quickstart and attach it to Jira issue 
(https://issues.apache.org/jira/browse/WICKET-4834)

Regards
Marco

 
 Sven
 
 
 On 10/23/2012 05:42 PM, Marco Di Sabatino Di Diodoro wrote:
 Thanks,
 
 but i like have the current selected item in the palette. With Apache Wicket 
 1.5.8 I use AjaxFormComponentUpdatingBehavior to see which item was selected.
 Now, when I click on an item into palette the onUpdate method is never 
 invoked.
 
 Marco
 
 
 On Oct 23, 2012, at 5:31 PM, Sven Meier wrote:
 
 selectedItems = (ListFoo)palette.getDefaultModelObject()
 
 or
 
 palette = new Palette(palette, model, choices, ...);
 selectedItems = model.getObject();
 
 Sven
 
 On 10/23/2012 05:01 PM, Marco Di Sabatino Di Diodoro wrote:
 Hi all,
 
 With Apache Wicket 6.1.
 How can I get hold of a palette's selected item?
 
 Marco
 --
 
 Dott. Marco Di Sabatino Di Diodoro
 Tel. +39 3939065570
 
 Tirasa S.r.l.
 Viale D'Annunzio 267 - 65127 Pescara
 Tel +39 0859116307 / FAX +39 085973
 http://www.tirasa.net
 
 Apache Syncope PPMC Member
 http://people.apache.org/~mdisabatino
 
 
 
 
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 
 --
 
 Dott. Marco Di Sabatino Di Diodoro
 Tel. +39 3939065570
 
 Tirasa S.r.l.
 Viale D'Annunzio 267 - 65127 Pescara
 Tel +39 0859116307 / FAX +39 085973
 http://www.tirasa.net
 
 Apache Syncope PPMC Member
 http://people.apache.org/~mdisabatino
 
 
 
 
 
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 

--

Dott. Marco Di Sabatino Di Diodoro
Tel. +39 3939065570

Tirasa S.r.l.
Viale D'Annunzio 267 - 65127 Pescara
Tel +39 0859116307 / FAX +39 085973
http://www.tirasa.net

Apache Syncope PPMC Member
http://people.apache.org/~mdisabatino






Selected item into Palette

2012-10-23 Thread Marco Di Sabatino Di Diodoro
Hi all,

With Apache Wicket 6.1. 
How can I get hold of a palette's selected item?

Marco
--

Dott. Marco Di Sabatino Di Diodoro
Tel. +39 3939065570

Tirasa S.r.l.
Viale D'Annunzio 267 - 65127 Pescara
Tel +39 0859116307 / FAX +39 085973
http://www.tirasa.net

Apache Syncope PPMC Member
http://people.apache.org/~mdisabatino






Re: Selected item into Palette

2012-10-23 Thread Marco Di Sabatino Di Diodoro
Thanks,

but i like have the current selected item in the palette. With Apache Wicket 
1.5.8 I use AjaxFormComponentUpdatingBehavior to see which item was selected.
Now, when I click on an item into palette the onUpdate method is never invoked.

Marco


On Oct 23, 2012, at 5:31 PM, Sven Meier wrote:

 selectedItems = (ListFoo)palette.getDefaultModelObject()
 
 or
 
 palette = new Palette(palette, model, choices, ...);
 selectedItems = model.getObject();
 
 Sven
 
 On 10/23/2012 05:01 PM, Marco Di Sabatino Di Diodoro wrote:
 Hi all,
 
 With Apache Wicket 6.1.
 How can I get hold of a palette's selected item?
 
 Marco
 --
 
 Dott. Marco Di Sabatino Di Diodoro
 Tel. +39 3939065570
 
 Tirasa S.r.l.
 Viale D'Annunzio 267 - 65127 Pescara
 Tel +39 0859116307 / FAX +39 085973
 http://www.tirasa.net
 
 Apache Syncope PPMC Member
 http://people.apache.org/~mdisabatino
 
 
 
 
 
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 

--

Dott. Marco Di Sabatino Di Diodoro
Tel. +39 3939065570

Tirasa S.r.l.
Viale D'Annunzio 267 - 65127 Pescara
Tel +39 0859116307 / FAX +39 085973
http://www.tirasa.net

Apache Syncope PPMC Member
http://people.apache.org/~mdisabatino






Re: Migration from 1.5.8 to 6.1

2012-10-22 Thread Marco Di Sabatino Di Diodoro
Hi,

I implemented following your suggestions. Currently, the list item is deleted 
if I press ok or cancel in the dialog.

item.add(new AjaxDecoratedCheckbox(toRemove, new 
ModelBoolean(Boolean.FALSE)) {
private static final long serialVersionUID = 
7170946748485726506L;

@Override
protected void onUpdate(final AjaxRequestTarget target) {
--
entityTO.getDerivedAttributes().remove(attributeTO);
target.add(attributesContainer);
}

@Override
protected void updateAjaxAttributes(AjaxRequestAttributes 
attributes) {
super.updateAjaxAttributes(attributes);

IAjaxCallListener myAjaxCallListener = new 
AjaxCallListener() {
private static final long serialVersionUID = 
7160235486520935153L;  

@Override
public CharSequence getPrecondition(Component 
component) {
return if (!confirm(' + 
getString(confirmDelete) + ')) + {return false;};
}
};

attributes.getAjaxCallListeners().add(myAjaxCallListener);
}
});

What should I call to handle ok or cancell event?

Marco

On Oct 19, 2012, at 6:10 PM, vineet semwal wrote:

 iajaxcalldecorator is replaced with
 iajaxcalllistener,ajaxcalllistener(dummy implementation)
 is what you can extend for your use ,override
 ajaxcheckbox#updateAjaxAttributes(attributes)
 like below
  @Override
protected void updateAjaxAttributes(AjaxRequestAttributes
 attributes) {
attributes.getAjaxCallListeners().add(new AjaxCallListener(){
@Override
public CharSequence getPrecondition(Component component) {
return if (!confirm(' +
 getString(confirmDelete) + ')) + { return false; }  ;
}
});
}
 
 On Fri, Oct 19, 2012 at 8:47 PM, Marco Di Sabatino Di Diodoro
 marco.disabat...@tirasa.net wrote:
 Hi all,
 
 How can i convert this code into wicket 6.1.
 
   item.add(new AjaxDecoratedCheckbox(toRemove, new 
 ModelBoolean(Boolean.FALSE)) {
 
 @Override
 protected void onUpdate(final AjaxRequestTarget target) {
entityTO.getDerivedAttributes().remove(attributeTO);
target.add(attributesContainer);
}
 
 @Override
  protected IAjaxCallDecorator getAjaxCallDecorator() {
return new 
 AjaxPreprocessingCallDecorator(super.getAjaxCallDecorator()) {
 
 @Override
 public CharSequence preDecorateScript(final CharSequence script) {
 return if (confirm(' + getString(confirmDelete) + ')) + { + 
 script + } 
 + else {this.checked = false;};
}
};
 }
 });
 
 I see the migration doc, but i not found a solution.
 
 Thanks
 M
 
 
 --
 
 Dott. Marco Di Sabatino Di Diodoro
 Tel. +39 3939065570
 
 Tirasa S.r.l.
 Viale D'Annunzio 267 - 65127 Pescara
 Tel +39 0859116307 / FAX +39 085973
 http://www.tirasa.net
 
 Apache Syncope PPMC Member
 http://people.apache.org/~mdisabatino
 
 
 
 
 
 
 
 -- 
 regards,
 
 Vineet Semwal
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 

--

Dott. Marco Di Sabatino Di Diodoro
Tel. +39 3939065570

Tirasa S.r.l.
Viale D'Annunzio 267 - 65127 Pescara
Tel +39 0859116307 / FAX +39 085973
http://www.tirasa.net

Apache Syncope PPMC Member
http://people.apache.org/~mdisabatino






Re: Migration from 1.5.8 to 6.1

2012-10-22 Thread Marco Di Sabatino Di Diodoro
I tested with chrome and firefox. 
The method onUpdate is invoked always and the item is removed.


On Oct 22, 2012, at 12:34 PM, vineet semwal wrote:

 i can't reproduce your problem,on clicking cancel ,the precondition
 should fail ie. return false
 which is what the code is doing,what browser are you using? i tested
 it on chrome/firefox
 
 On Mon, Oct 22, 2012 at 3:33 PM, Marco Di Sabatino Di Diodoro
 marco.disabat...@tirasa.net wrote:
 Hi,
 
 I implemented following your suggestions. Currently, the list item is 
 deleted if I press ok or cancel in the dialog.
 
item.add(new AjaxDecoratedCheckbox(toRemove, new 
 ModelBoolean(Boolean.FALSE)) {
private static final long serialVersionUID = 
 7170946748485726506L;
 
@Override
protected void onUpdate(final AjaxRequestTarget target) {
--
 entityTO.getDerivedAttributes().remove(attributeTO);
target.add(attributesContainer);
}
 
@Override
protected void updateAjaxAttributes(AjaxRequestAttributes 
 attributes) {
super.updateAjaxAttributes(attributes);
 
IAjaxCallListener myAjaxCallListener = new 
 AjaxCallListener() {
private static final long serialVersionUID = 
 7160235486520935153L;
 
@Override
public CharSequence getPrecondition(Component 
 component) {
return if (!confirm(' + 
 getString(confirmDelete) + ')) + {return false;};
}
};

 attributes.getAjaxCallListeners().add(myAjaxCallListener);
}
});
 
 What should I call to handle ok or cancell event?
 
 Marco
 
 On Oct 19, 2012, at 6:10 PM, vineet semwal wrote:
 
 iajaxcalldecorator is replaced with
 iajaxcalllistener,ajaxcalllistener(dummy implementation)
 is what you can extend for your use ,override
 ajaxcheckbox#updateAjaxAttributes(attributes)
 like below
 @Override
   protected void updateAjaxAttributes(AjaxRequestAttributes
 attributes) {
   attributes.getAjaxCallListeners().add(new AjaxCallListener(){
   @Override
   public CharSequence getPrecondition(Component component) {
   return if (!confirm(' +
 getString(confirmDelete) + ')) + { return false; }  ;
   }
   });
   }
 
 On Fri, Oct 19, 2012 at 8:47 PM, Marco Di Sabatino Di Diodoro
 marco.disabat...@tirasa.net wrote:
 Hi all,
 
 How can i convert this code into wicket 6.1.
 
  item.add(new AjaxDecoratedCheckbox(toRemove, new 
 ModelBoolean(Boolean.FALSE)) {
 
@Override
protected void onUpdate(final AjaxRequestTarget target) {
   entityTO.getDerivedAttributes().remove(attributeTO);
   target.add(attributesContainer);
   }
 
@Override
 protected IAjaxCallDecorator getAjaxCallDecorator() {
   return new 
 AjaxPreprocessingCallDecorator(super.getAjaxCallDecorator()) {
 
@Override
public CharSequence preDecorateScript(final CharSequence script) {
return if (confirm(' + getString(confirmDelete) + ')) + { + 
 script + } 
+ else {this.checked = false;};
   }
   };
}
 });
 
 I see the migration doc, but i not found a solution.
 
 Thanks
 M
 
 
 --
 
 Dott. Marco Di Sabatino Di Diodoro
 Tel. +39 3939065570
 
 Tirasa S.r.l.
 Viale D'Annunzio 267 - 65127 Pescara
 Tel +39 0859116307 / FAX +39 085973
 http://www.tirasa.net
 
 Apache Syncope PPMC Member
 http://people.apache.org/~mdisabatino
 
 
 
 
 
 
 
 --
 regards,
 
 Vineet Semwal
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 --
 
 Dott. Marco Di Sabatino Di Diodoro
 Tel. +39 3939065570
 
 Tirasa S.r.l.
 Viale D'Annunzio 267 - 65127 Pescara
 Tel +39 0859116307 / FAX +39 085973
 http://www.tirasa.net
 
 Apache Syncope PPMC Member
 http://people.apache.org/~mdisabatino
 
 
 
 
 
 
 
 -- 
 regards,
 
 Vineet Semwal
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 

--

Dott. Marco Di Sabatino Di Diodoro
Tel. +39 3939065570

Tirasa S.r.l.
Viale D'Annunzio 267 - 65127 Pescara
Tel +39 0859116307 / FAX +39 085973
http://www.tirasa.net

Apache Syncope PPMC Member
http://people.apache.org/~mdisabatino






Re: Migration from 1.5.8 to 6.1

2012-10-22 Thread Marco Di Sabatino Di Diodoro
Thanks for your help.
The problem was into AjaxDecoratedCheckBox. 

M

On Oct 22, 2012, at 3:57 PM, vineet semwal wrote:

 i can't reproduce your problem and i can't guess too,
 attach a quickstart that demonstrates your problem ..
 
 On Mon, Oct 22, 2012 at 4:12 PM, Marco Di Sabatino Di Diodoro
 marco.disabat...@tirasa.net wrote:
 I tested with chrome and firefox.
 The method onUpdate is invoked always and the item is removed.
 
 
 On Oct 22, 2012, at 12:34 PM, vineet semwal wrote:
 
 i can't reproduce your problem,on clicking cancel ,the precondition
 should fail ie. return false
 which is what the code is doing,what browser are you using? i tested
 it on chrome/firefox
 
 On Mon, Oct 22, 2012 at 3:33 PM, Marco Di Sabatino Di Diodoro
 marco.disabat...@tirasa.net wrote:
 Hi,
 
 I implemented following your suggestions. Currently, the list item is 
 deleted if I press ok or cancel in the dialog.
 
   item.add(new AjaxDecoratedCheckbox(toRemove, new 
 ModelBoolean(Boolean.FALSE)) {
   private static final long serialVersionUID = 
 7170946748485726506L;
 
   @Override
   protected void onUpdate(final AjaxRequestTarget target) {
   --
 entityTO.getDerivedAttributes().remove(attributeTO);
   target.add(attributesContainer);
   }
 
   @Override
   protected void 
 updateAjaxAttributes(AjaxRequestAttributes attributes) {
   super.updateAjaxAttributes(attributes);
 
   IAjaxCallListener myAjaxCallListener = new 
 AjaxCallListener() {
   private static final long serialVersionUID = 
 7160235486520935153L;
 
   @Override
   public CharSequence getPrecondition(Component 
 component) {
   return if (!confirm(' + 
 getString(confirmDelete) + ')) + {return false;};
   }
   };
   
 attributes.getAjaxCallListeners().add(myAjaxCallListener);
   }
   });
 
 What should I call to handle ok or cancell event?
 
 Marco
 
 On Oct 19, 2012, at 6:10 PM, vineet semwal wrote:
 
 iajaxcalldecorator is replaced with
 iajaxcalllistener,ajaxcalllistener(dummy implementation)
 is what you can extend for your use ,override
 ajaxcheckbox#updateAjaxAttributes(attributes)
 like below
 @Override
  protected void updateAjaxAttributes(AjaxRequestAttributes
 attributes) {
  attributes.getAjaxCallListeners().add(new AjaxCallListener(){
  @Override
  public CharSequence getPrecondition(Component component) 
 {
  return if (!confirm(' +
 getString(confirmDelete) + ')) + { return false; }  ;
  }
  });
  }
 
 On Fri, Oct 19, 2012 at 8:47 PM, Marco Di Sabatino Di Diodoro
 marco.disabat...@tirasa.net wrote:
 Hi all,
 
 How can i convert this code into wicket 6.1.
 
 item.add(new AjaxDecoratedCheckbox(toRemove, new 
 ModelBoolean(Boolean.FALSE)) {
 
   @Override
   protected void onUpdate(final AjaxRequestTarget target) {
  entityTO.getDerivedAttributes().remove(attributeTO);
  target.add(attributesContainer);
  }
 
   @Override
protected IAjaxCallDecorator getAjaxCallDecorator() {
  return new 
 AjaxPreprocessingCallDecorator(super.getAjaxCallDecorator()) {
 
   @Override
   public CharSequence preDecorateScript(final CharSequence script) {
   return if (confirm(' + getString(confirmDelete) + ')) + { 
 + script + } 
   + else {this.checked = false;};
  }
  };
   }
 });
 
 I see the migration doc, but i not found a solution.
 
 Thanks
 M
 
 
 --
 
 Dott. Marco Di Sabatino Di Diodoro
 Tel. +39 3939065570
 
 Tirasa S.r.l.
 Viale D'Annunzio 267 - 65127 Pescara
 Tel +39 0859116307 / FAX +39 085973
 http://www.tirasa.net
 
 Apache Syncope PPMC Member
 http://people.apache.org/~mdisabatino
 
 
 
 
 
 
 
 --
 regards,
 
 Vineet Semwal
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 --
 
 Dott. Marco Di Sabatino Di Diodoro
 Tel. +39 3939065570
 
 Tirasa S.r.l.
 Viale D'Annunzio 267 - 65127 Pescara
 Tel +39 0859116307 / FAX +39 085973
 http://www.tirasa.net
 
 Apache Syncope PPMC Member
 http://people.apache.org/~mdisabatino
 
 
 
 
 
 
 
 --
 regards,
 
 Vineet Semwal
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 --
 
 Dott. Marco Di Sabatino Di Diodoro
 Tel. +39 3939065570
 
 Tirasa S.r.l.
 Viale D'Annunzio 267 - 65127 Pescara
 Tel +39 0859116307 / FAX +39 085973
 http://www.tirasa.net
 
 Apache Syncope

Migration from 1.5.8 to 6.1

2012-10-19 Thread Marco Di Sabatino Di Diodoro
Hi all,  

How can i convert this code into wicket 6.1. 

   item.add(new AjaxDecoratedCheckbox(toRemove, new 
ModelBoolean(Boolean.FALSE)) {

 @Override
 protected void onUpdate(final AjaxRequestTarget target) {
entityTO.getDerivedAttributes().remove(attributeTO);
target.add(attributesContainer);
}

 @Override
  protected IAjaxCallDecorator getAjaxCallDecorator() {
return new AjaxPreprocessingCallDecorator(super.getAjaxCallDecorator()) 
{

 @Override
 public CharSequence preDecorateScript(final CharSequence script) {
 return if (confirm(' + getString(confirmDelete) + ')) + { + 
script + } 
 + else {this.checked = false;};
}
};
 }
 });

I see the migration doc, but i not found a solution.

Thanks
M


--

Dott. Marco Di Sabatino Di Diodoro
Tel. +39 3939065570

Tirasa S.r.l.
Viale D'Annunzio 267 - 65127 Pescara
Tel +39 0859116307 / FAX +39 085973
http://www.tirasa.net

Apache Syncope PPMC Member
http://people.apache.org/~mdisabatino






AjaxLink not work

2012-10-08 Thread Marco Di Sabatino Di Diodoro
Hi

I'm upgrading Apache Syncope console from Wicket 1.5.8 to wicket 6.x. All 
AjaxLinks from the console not work. 

final AjaxLink createLink = new IndicatingAjaxLink(createLink) {

private static final long serialVersionUID = -7978723352517770644L;

@Override
public void onClick(final AjaxRequestTarget target) {
editModalWin.setPageCreator(new ModalWindow.PageCreator() {

private static final long serialVersionUID = 
-7834632442532690940L;
  
@Override
public Page createPage() {
return new 
EditUserModalPage(Users.this.getPageReference(), editModalWin, new UserTO());
}
});

editModalWin.show(target);
}
};

What am I forgetting?

Regards
Marco
--

Dott. Marco Di Sabatino Di Diodoro
Tel. +39 3939065570

Tirasa S.r.l.
Viale D'Annunzio 267 - 65127 Pescara
Tel +39 0859116307 / FAX +39 085973
http://www.tirasa.net

Apache Syncope PPMC Member
http://people.apache.org/~mdisabatino






Re: AjaxLink not work

2012-10-08 Thread Marco Di Sabatino Di Diodoro

On Oct 8, 2012, at 4:31 PM, Martin Grigorov wrote:

 Hi,
 
 The code looks OK.
 What exactly doesn't work ?

When I click on the link does nothing. All Links into the console not work.
Here you can find source code from console ( 
http://svn.apache.org/viewvc/incubator/syncope/trunk/console/ )

 
 On Mon, Oct 8, 2012 at 5:06 PM, Marco Di Sabatino Di Diodoro
 marco.disabat...@tirasa.net wrote:
 Hi
 
 I'm upgrading Apache Syncope console from Wicket 1.5.8 to wicket 6.x. All 
 AjaxLinks from the console not work.
 
final AjaxLink createLink = new IndicatingAjaxLink(createLink) {
 
private static final long serialVersionUID = 
 -7978723352517770644L;
 
@Override
public void onClick(final AjaxRequestTarget target) {
editModalWin.setPageCreator(new ModalWindow.PageCreator() {
 
private static final long serialVersionUID = 
 -7834632442532690940L;
 
@Override
public Page createPage() {
return new 
 EditUserModalPage(Users.this.getPageReference(), editModalWin, new UserTO());
}
});
 
editModalWin.show(target);
}
};
 
 What am I forgetting?
 
 Regards
 Marco
 --
 
 Dott. Marco Di Sabatino Di Diodoro
 Tel. +39 3939065570
 
 Tirasa S.r.l.
 Viale D'Annunzio 267 - 65127 Pescara
 Tel +39 0859116307 / FAX +39 085973
 http://www.tirasa.net
 
 Apache Syncope PPMC Member
 http://people.apache.org/~mdisabatino
 
 
 
 
 
 
 
 -- 
 Martin Grigorov
 jWeekend
 Training, Consulting, Development
 http://jWeekend.com
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 

--

Dott. Marco Di Sabatino Di Diodoro
Tel. +39 3939065570

Tirasa S.r.l.
Viale D'Annunzio 267 - 65127 Pescara
Tel +39 0859116307 / FAX +39 085973
http://www.tirasa.net

Apache Syncope PPMC Member
http://people.apache.org/~mdisabatino






Re: AjaxLink not work

2012-10-08 Thread Marco Di Sabatino Di Diodoro
Martin,

In the Page Source 
Wicket.Ajax.get({u: 'someUrl', c: 'theLinkId', e:'click'}); 
is not present.

Do I Have to include something?

M


On Oct 8, 2012, at 4:48 PM, Martin Grigorov wrote:

 Hi,
 
 I have no time to debug the whole app.
 Check for JavaScript errors.
 
 Also check the produced HTML. Find the a tag for the link, get its
 'id' and search for Wicket.Ajax.get({u: 'someUrl', c: 'theLinkId', e:
 'click'});
 Check with Firebug/Dev tools that and Ajax call is fired when you click.
 
 On Mon, Oct 8, 2012 at 5:40 PM, Marco Di Sabatino Di Diodoro
 marco.disabat...@tirasa.net wrote:
 
 On Oct 8, 2012, at 4:31 PM, Martin Grigorov wrote:
 
 Hi,
 
 The code looks OK.
 What exactly doesn't work ?
 
 When I click on the link does nothing. All Links into the console not work.
 Here you can find source code from console ( 
 http://svn.apache.org/viewvc/incubator/syncope/trunk/console/ )
 
 
 On Mon, Oct 8, 2012 at 5:06 PM, Marco Di Sabatino Di Diodoro
 marco.disabat...@tirasa.net wrote:
 Hi
 
 I'm upgrading Apache Syncope console from Wicket 1.5.8 to wicket 6.x. All 
 AjaxLinks from the console not work.
 
   final AjaxLink createLink = new IndicatingAjaxLink(createLink) {
 
   private static final long serialVersionUID = 
 -7978723352517770644L;
 
   @Override
   public void onClick(final AjaxRequestTarget target) {
   editModalWin.setPageCreator(new ModalWindow.PageCreator() {
 
   private static final long serialVersionUID = 
 -7834632442532690940L;
 
   @Override
   public Page createPage() {
   return new 
 EditUserModalPage(Users.this.getPageReference(), editModalWin, new 
 UserTO());
   }
   });
 
   editModalWin.show(target);
   }
   };
 
 What am I forgetting?
 
 Regards
 Marco
 --
 
 Dott. Marco Di Sabatino Di Diodoro
 Tel. +39 3939065570
 
 Tirasa S.r.l.
 Viale D'Annunzio 267 - 65127 Pescara
 Tel +39 0859116307 / FAX +39 085973
 http://www.tirasa.net
 
 Apache Syncope PPMC Member
 http://people.apache.org/~mdisabatino
 
 
 
 
 
 
 
 --
 Martin Grigorov
 jWeekend
 Training, Consulting, Development
 http://jWeekend.com
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 --
 
 Dott. Marco Di Sabatino Di Diodoro
 Tel. +39 3939065570
 
 Tirasa S.r.l.
 Viale D'Annunzio 267 - 65127 Pescara
 Tel +39 0859116307 / FAX +39 085973
 http://www.tirasa.net
 
 Apache Syncope PPMC Member
 http://people.apache.org/~mdisabatino
 
 
 
 
 
 
 
 -- 
 Martin Grigorov
 jWeekend
 Training, Consulting, Development
 http://jWeekend.com
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 

--

Dott. Marco Di Sabatino Di Diodoro
Tel. +39 3939065570

Tirasa S.r.l.
Viale D'Annunzio 267 - 65127 Pescara
Tel +39 0859116307 / FAX +39 085973
http://www.tirasa.net

Apache Syncope PPMC Member
http://people.apache.org/~mdisabatino






Migration 1.5 - 6 CancelEventIfNoAjaxDecorator

2012-10-02 Thread Marco Di Sabatino Di Diodoro
Hi all,

how can I convert  for Wicket 6.0:

@Override
protected IAjaxCallDecorator getAjaxCallDecorator () {
return new 
CancelEventIfNoAjaxDecorator(AjaxDecoratedCheckbox.this.getAjaxCallDecorator());
}

Regards
M

--

Dott. Marco Di Sabatino Di Diodoro
Tel. +39 3939065570

Tirasa S.r.l.
Viale D'Annunzio 267 - 65127 Pescara
Tel +39 0859116307 / FAX +39 085973
http://www.tirasa.net

Apache Syncope PPMC Member
http://people.apache.org/~mdisabatino






Error ESC key press event

2012-09-05 Thread Marco Di Sabatino Di Diodoro
Hi all,

I configure into Apache Syncope the possibility to close ModalWindow with ESC 
key press event.

public class CloseOnESCBehavior extends AbstractDefaultAjaxBehavior {

private static final long serialVersionUID = 5826308247642534260L;
private ModalWindow modalWindow;

public CloseOnESCBehavior(ModalWindow modalWindow) {
this.modalWindow = modalWindow;
}

private static final String PRE_JS = $(document).ready(function() {\n
+ $(document).bind('keyup', function(evt) {\n
+ if (evt.keyCode == 27){\n;

private static final String POST_JS = \n evt.preventDefault();\n
+ evt.stopImmediatePropagation();\n
+ }\n
+   });\n
+ });;

@Override
protected void respond(final AjaxRequestTarget target) {
modalWindow.close(target);
}

@Override
protected String findIndicatorId() {
return null;
}

@Override
public void renderHead(final Component component, final IHeaderResponse 
response) {
response.renderJavaScript(new 
StringBuilder(PRE_JS).append(getCallbackScript())
.append(POST_JS).toString(),
closeModalOnEsc);
}

In the modal page:

add(new CloseOnESCBehavior(window));

It work correctly with Chrome and Safari. With Firefox, if I press the ESC key 
twice quickly before the window closes the console return an error:

ERROR: Wicket.Ajax.Call.failure: Error while parsing response: Could not find 
root ajax-response element

Regards
Marco


--

Dott. Marco Di Sabatino Di Diodoro
Tel. +39 3939065570

Tirasa S.r.l.
Viale D'Annunzio 267 - 65127 Pescara
Tel +39 0859116307 / FAX +39 085973
http://www.tirasa.net

Apache Syncope PPMC Member
http://people.apache.org/~mdisabatino






Re: Error ESC key press event

2012-09-05 Thread Marco Di Sabatino Di Diodoro
Hi Martin,

On Sep 5, 2012, at 12:20 PM, Martin Grigorov wrote:

 Hi Marco,
 
 I see a quite simple solution with Wicket 6 for this. I think you just
 start with your project (or even this is just a prototype?) so you
 better use the latest and greatest :-)

We can not upgrade to Wicket 6 in this moment.

 
 What I mean is to use the new AjaxChannel.Type.Active. The active type
 prevents a second Ajax call in the same channel while there is a still
 running Ajax call in this channel.
 
 The code is as simple as:
 
 @Override
 protected void updateAjaxAttributes(AjaxRequestAttributes attrs) {
   super.updateAjaxAttributes(attrs);
 
   attrs.setAjaxChannel(new AjaxChannel(modalClose, Type.Active));
 }
 
 For more about the goodies in Wicket 6 read:
 http://wicketinaction.com/2012/07/wicket-6-javascript-improvements/
 
 In Wicket 1.5 you will have to add some custom JavaScript to prevent
 the second request. You can unbind the event, or add a flag for
 example.

I tried to use unbind() and flag but always return me the same error. How can I 
prevent the second request?

Thanks
Marco

 
 On Wed, Sep 5, 2012 at 12:04 PM, Marco Di Sabatino Di Diodoro
 marco.disabat...@tirasa.net wrote:
 Hi all,
 
 I configure into Apache Syncope the possibility to close ModalWindow with 
 ESC key press event.
 
 public class CloseOnESCBehavior extends AbstractDefaultAjaxBehavior {
 
private static final long serialVersionUID = 5826308247642534260L;
private ModalWindow modalWindow;
 
public CloseOnESCBehavior(ModalWindow modalWindow) {
this.modalWindow = modalWindow;
}
 
private static final String PRE_JS = $(document).ready(function() {\n
+ $(document).bind('keyup', function(evt) {\n
+ if (evt.keyCode == 27){\n;
 
private static final String POST_JS = \n evt.preventDefault();\n
+ evt.stopImmediatePropagation();\n
+ }\n
+   });\n
+ });;
 
@Override
protected void respond(final AjaxRequestTarget target) {
modalWindow.close(target);
}
 
@Override
protected String findIndicatorId() {
return null;
}
 
@Override
public void renderHead(final Component component, final IHeaderResponse 
 response) {
response.renderJavaScript(new 
 StringBuilder(PRE_JS).append(getCallbackScript())
.append(POST_JS).toString(),
closeModalOnEsc);
}
 
 In the modal page:
 
 add(new CloseOnESCBehavior(window));
 
 It work correctly with Chrome and Safari. With Firefox, if I press the ESC 
 key twice quickly before the window closes the console return an error:
 
 ERROR: Wicket.Ajax.Call.failure: Error while parsing response: Could not 
 find root ajax-response element
 
 Regards
 Marco
 
 
 --
 
 Dott. Marco Di Sabatino Di Diodoro
 Tel. +39 3939065570
 
 Tirasa S.r.l.
 Viale D'Annunzio 267 - 65127 Pescara
 Tel +39 0859116307 / FAX +39 085973
 http://www.tirasa.net
 
 Apache Syncope PPMC Member
 http://people.apache.org/~mdisabatino
 
 
 
 
 
 
 
 -- 
 Martin Grigorov
 jWeekend
 Training, Consulting, Development
 http://jWeekend.com
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 

--

Dott. Marco Di Sabatino Di Diodoro
Tel. +39 3939065570

Tirasa S.r.l.
Viale D'Annunzio 267 - 65127 Pescara
Tel +39 0859116307 / FAX +39 085973
http://www.tirasa.net

Apache Syncope PPMC Member
http://people.apache.org/~mdisabatino






Re: Error ESC key press event

2012-09-05 Thread Marco Di Sabatino Di Diodoro

On Sep 5, 2012, at 3:49 PM, Martin Grigorov wrote:

 Hi,
 
 You already wrap the call to wicketAjaxXXX() method in if statement.
 Just raise a flag that you entered in this code and set it back to
 false in the success/failure handler.

Do you mean this?

private static final String PRE_JS = 
var flag = false;
+ $(window).ready(function() {\n
+ $(window).bind('keyup', function(evt) {\n
+ if (!flag  evt.keyCode == 27){\n
+ flag = true;;
   ...
   ...

always the same error.

Regards
Marco

 
 On Wed, Sep 5, 2012 at 3:40 PM, Marco Di Sabatino Di Diodoro
 marco.disabat...@tirasa.net wrote:
 Hi Martin,
 
 On Sep 5, 2012, at 12:20 PM, Martin Grigorov wrote:
 
 Hi Marco,
 
 I see a quite simple solution with Wicket 6 for this. I think you just
 start with your project (or even this is just a prototype?) so you
 better use the latest and greatest :-)
 
 We can not upgrade to Wicket 6 in this moment.
 
 
 What I mean is to use the new AjaxChannel.Type.Active. The active type
 prevents a second Ajax call in the same channel while there is a still
 running Ajax call in this channel.
 
 The code is as simple as:
 
 @Override
 protected void updateAjaxAttributes(AjaxRequestAttributes attrs) {
  super.updateAjaxAttributes(attrs);
 
  attrs.setAjaxChannel(new AjaxChannel(modalClose, Type.Active));
 }
 
 For more about the goodies in Wicket 6 read:
 http://wicketinaction.com/2012/07/wicket-6-javascript-improvements/
 
 In Wicket 1.5 you will have to add some custom JavaScript to prevent
 the second request. You can unbind the event, or add a flag for
 example.
 
 I tried to use unbind() and flag but always return me the same error. How 
 can I prevent the second request?
 
 Thanks
 Marco
 
 
 On Wed, Sep 5, 2012 at 12:04 PM, Marco Di Sabatino Di Diodoro
 marco.disabat...@tirasa.net wrote:
 Hi all,
 
 I configure into Apache Syncope the possibility to close ModalWindow with 
 ESC key press event.
 
 public class CloseOnESCBehavior extends AbstractDefaultAjaxBehavior {
 
   private static final long serialVersionUID = 5826308247642534260L;
   private ModalWindow modalWindow;
 
   public CloseOnESCBehavior(ModalWindow modalWindow) {
   this.modalWindow = modalWindow;
   }
 
   private static final String PRE_JS = $(document).ready(function() {\n
   + $(document).bind('keyup', function(evt) {\n
   + if (evt.keyCode == 27){\n;
 
   private static final String POST_JS = \n evt.preventDefault();\n
   + evt.stopImmediatePropagation();\n
   + }\n
   +   });\n
   + });;
 
   @Override
   protected void respond(final AjaxRequestTarget target) {
   modalWindow.close(target);
   }
 
   @Override
   protected String findIndicatorId() {
   return null;
   }
 
   @Override
   public void renderHead(final Component component, final IHeaderResponse 
 response) {
   response.renderJavaScript(new 
 StringBuilder(PRE_JS).append(getCallbackScript())
   .append(POST_JS).toString(),
   closeModalOnEsc);
   }
 
 In the modal page:
 
 add(new CloseOnESCBehavior(window));
 
 It work correctly with Chrome and Safari. With Firefox, if I press the ESC 
 key twice quickly before the window closes the console return an error:
 
 ERROR: Wicket.Ajax.Call.failure: Error while parsing response: Could not 
 find root ajax-response element
 
 Regards
 Marco
 
 
 --
 
 Dott. Marco Di Sabatino Di Diodoro
 Tel. +39 3939065570
 
 Tirasa S.r.l.
 Viale D'Annunzio 267 - 65127 Pescara
 Tel +39 0859116307 / FAX +39 085973
 http://www.tirasa.net
 
 Apache Syncope PPMC Member
 http://people.apache.org/~mdisabatino
 
 
 
 
 
 
 
 --
 Martin Grigorov
 jWeekend
 Training, Consulting, Development
 http://jWeekend.com
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 --
 
 Dott. Marco Di Sabatino Di Diodoro
 Tel. +39 3939065570
 
 Tirasa S.r.l.
 Viale D'Annunzio 267 - 65127 Pescara
 Tel +39 0859116307 / FAX +39 085973
 http://www.tirasa.net
 
 Apache Syncope PPMC Member
 http://people.apache.org/~mdisabatino
 
 
 
 
 
 
 
 -- 
 Martin Grigorov
 jWeekend
 Training, Consulting, Development
 http://jWeekend.com
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 

--

Dott. Marco Di Sabatino Di Diodoro
Tel. +39 3939065570

Tirasa S.r.l.
Viale D'Annunzio 267 - 65127 Pescara
Tel +39 0859116307 / FAX +39 085973
http://www.tirasa.net

Apache Syncope PPMC Member
http://people.apache.org/~mdisabatino






Re: Modal Window set focus

2012-08-21 Thread Marco Di Sabatino Di Diodoro

On Aug 20, 2012, at 12:00 PM, Martin Grigorov wrote:

 Only form elements can be focused in HTML by default.
 To make a normal div focusable you need to add 'tabindex' attribute to it.

I set the focus to the ModalWindow by adding the following attribute:

body onload=window.focus()
...
...
/body

It work. Thanks for your help.

 
 Experiment with Firebug/DevTools first. Find the JS that can focus
 your modal window and then just add it in your Java code.
 
 On Mon, Aug 20, 2012 at 12:54 PM, Marco Di Sabatino Di Diodoro
 marco.disabat...@tirasa.net wrote:
 
 I add target.appendJavaScript(document.getElementById(' + 
 editModalWin.getMarkupId() + ').focus(););
 
 But not work...
 
 Here you can found my code:
 
   final AjaxLink createLink = new IndicatingAjaxLink(createLink) {
 
private static final long serialVersionUID = 
 -7978723352517770644L;
 
@Override
public void onClick(final AjaxRequestTarget target) {
editModalWin.setPageCreator(new ModalWindow.PageCreator() {
 
private static final long serialVersionUID = 
 -7834632442532690940L;
 
@Override
public Page createPage() {
return new 
 EditUserModalPage(Users.this.getPageReference(), editModalWin, new UserTO());
}
});
target.appendJavaScript(document.getElementById(' + 
 editModalWin.getMarkupId() + ').focus(););
editModalWin.show(target);
}
};
 
 
 
 On Aug 20, 2012, at 10:49 AM, Martin Grigorov wrote:
 
 Hi,
 
 You open it with modal.show(target), right ?
 Since you have the 'target' you can use it to execute an arbitrary
 JavaScript after opening the modal: target.append(someJsToFocus).
 
 The JS should look like: document.getElementById(
 +modal.getMarkupId()+ ).focus();
 
 On Mon, Aug 20, 2012 at 11:44 AM, Marco Di Sabatino Di Diodoro
 marco.disabat...@tirasa.net wrote:
 Hi all,
 
 I want to set the focus to a ModalWindow when it is opened. This allows me 
 to close the ModalWIndow with the esc key without having to click on it 
 before.
 
 suggestions?
 
 Thanks
 M
 
 --
 
 Dott. Marco Di Sabatino Di Diodoro
 Tel. +39 3939065570
 
 Tirasa S.r.l.
 Viale D'Annunzio 267 - 65127 Pescara
 Tel +39 0859116307 / FAX +39 085973
 http://www.tirasa.net
 
 Apache Syncope PPMC Member
 http://people.apache.org/~mdisabatino
 
 
 
 
 
 
 
 --
 Martin Grigorov
 jWeekend
 Training, Consulting, Development
 http://jWeekend.com
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 --
 
 Dott. Marco Di Sabatino Di Diodoro
 Tel. +39 3939065570
 
 Tirasa S.r.l.
 Viale D'Annunzio 267 - 65127 Pescara
 Tel +39 0859116307 / FAX +39 085973
 http://www.tirasa.net
 
 Apache Syncope PPMC Member
 http://people.apache.org/~mdisabatino
 
 
 
 
 
 
 
 -- 
 Martin Grigorov
 jWeekend
 Training, Consulting, Development
 http://jWeekend.com
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 

--

Dott. Marco Di Sabatino Di Diodoro
Tel. +39 3939065570

Tirasa S.r.l.
Viale D'Annunzio 267 - 65127 Pescara
Tel +39 0859116307 / FAX +39 085973
http://www.tirasa.net

Apache Syncope PPMC Member
http://people.apache.org/~mdisabatino






Modal Window set focus

2012-08-20 Thread Marco Di Sabatino Di Diodoro
Hi all,

I want to set the focus to a ModalWindow when it is opened. This allows me to 
close the ModalWIndow with the esc key without having to click on it before.

suggestions?

Thanks
M

--

Dott. Marco Di Sabatino Di Diodoro
Tel. +39 3939065570

Tirasa S.r.l.
Viale D'Annunzio 267 - 65127 Pescara
Tel +39 0859116307 / FAX +39 085973
http://www.tirasa.net

Apache Syncope PPMC Member
http://people.apache.org/~mdisabatino






Re: Modal Window set focus

2012-08-20 Thread Marco Di Sabatino Di Diodoro

I add target.appendJavaScript(document.getElementById(' + 
editModalWin.getMarkupId() + ').focus(););  

But not work...

Here you can found my code:

   final AjaxLink createLink = new IndicatingAjaxLink(createLink) {

private static final long serialVersionUID = -7978723352517770644L;

@Override
public void onClick(final AjaxRequestTarget target) {
editModalWin.setPageCreator(new ModalWindow.PageCreator() {

private static final long serialVersionUID = 
-7834632442532690940L;

@Override
public Page createPage() {
return new 
EditUserModalPage(Users.this.getPageReference(), editModalWin, new UserTO());
}
});
target.appendJavaScript(document.getElementById(' + 
editModalWin.getMarkupId() + ').focus(););
editModalWin.show(target);
}
};



On Aug 20, 2012, at 10:49 AM, Martin Grigorov wrote:

 Hi,
 
 You open it with modal.show(target), right ?
 Since you have the 'target' you can use it to execute an arbitrary
 JavaScript after opening the modal: target.append(someJsToFocus).
 
 The JS should look like: document.getElementById(
 +modal.getMarkupId()+ ).focus();
 
 On Mon, Aug 20, 2012 at 11:44 AM, Marco Di Sabatino Di Diodoro
 marco.disabat...@tirasa.net wrote:
 Hi all,
 
 I want to set the focus to a ModalWindow when it is opened. This allows me 
 to close the ModalWIndow with the esc key without having to click on it 
 before.
 
 suggestions?
 
 Thanks
 M
 
 --
 
 Dott. Marco Di Sabatino Di Diodoro
 Tel. +39 3939065570
 
 Tirasa S.r.l.
 Viale D'Annunzio 267 - 65127 Pescara
 Tel +39 0859116307 / FAX +39 085973
 http://www.tirasa.net
 
 Apache Syncope PPMC Member
 http://people.apache.org/~mdisabatino
 
 
 
 
 
 
 
 -- 
 Martin Grigorov
 jWeekend
 Training, Consulting, Development
 http://jWeekend.com
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 

--

Dott. Marco Di Sabatino Di Diodoro
Tel. +39 3939065570

Tirasa S.r.l.
Viale D'Annunzio 267 - 65127 Pescara
Tel +39 0859116307 / FAX +39 085973
http://www.tirasa.net

Apache Syncope PPMC Member
http://people.apache.org/~mdisabatino






Close ModalWindow on keypress (ESC)

2012-08-17 Thread Marco Di Sabatino Di Diodoro
Hi, 

I need close the ModalWindows of my application when I press ESC on the 
keyboard.

Suggestions?

Regards
M

--

Dott. Marco Di Sabatino Di Diodoro
Tel. +39 3939065570

Tirasa S.r.l.
Viale D'Annunzio 267 - 65127 Pescara
Tel +39 0859116307 / FAX +39 085973
http://www.tirasa.net

Apache Syncope PPMC Member
http://people.apache.org/~mdisabatino






Re: Close ModalWindow on keypress (ESC)

2012-08-17 Thread Marco Di Sabatino Di Diodoro
Hi, 

thanks for the help.
I integrate your code in my application, but the Modal Window closes only when 
I clicked on it with the mouse first.

How can I set the focus when the ModalWindow opens?

M

On Aug 17, 2012, at 12:31 PM, Cedric Gatay wrote:

 Hi,
 I actually use this in my project :
 
 
/**
 * Behavior allowing to close the window on esc, requires jQuery
 * Slighlty modified from
 http://stackoverflow.com/questions/5042426/wicket-close-modalwindow-on-keypress
 */
private class CloseOnESCBehavior extends AbstractDefaultAjaxBehavior {
 
@NonNls
private static final String PRE_JS = $(document).ready(function()
 {\n +
   $(document).bind('keyup',
 function(evt) {\n +
 if (evt.keyCode == 27)
 {\n;
@NonNls
private static final String POST_JS = \n evt.preventDefault();\n +
  }\n +
});\n +
  });;
 
/**
 * {@inheritDoc}
 */
@Override
protected void respond(AjaxRequestTarget target) {
close(target);
}
 
/**
 * {@inheritDoc}
 *
 * @return always null to hide the indicator (it does not flicker)
 */
@Override
protected String findIndicatorId() {
return null;
}
 
/**
 * {@inheritDoc}
 */
@Override
public void renderHead(Component component, IHeaderResponse
 response) {
response.renderJavaScript(new
 StringBuilder(PRE_JS).append(getCallbackScript())
  .append(POST_JS).toString(),
 closeModalOnEsc);
}
}
 
 You'll need to adapt it if you're not using JQuery in your project. All you
 have to do is add this behavior on your modal window.
 
 Regards,
 __
 Cedric Gatay
 http://www.bloggure.info | http://cedric.gatay.fr |
 @Cedric_Gatayhttp://twitter.com/Cedric_Gatay
 
 
 On Fri, Aug 17, 2012 at 12:05 PM, Marco Di Sabatino Di Diodoro 
 marco.disabat...@tirasa.net wrote:
 
 Hi,
 
 I need close the ModalWindows of my application when I press ESC on the
 keyboard.
 
 Suggestions?
 
 Regards
 M
 
 --
 
 Dott. Marco Di Sabatino Di Diodoro
 Tel. +39 3939065570
 
 Tirasa S.r.l.
 Viale D'Annunzio 267 - 65127 Pescara
 Tel +39 0859116307 / FAX +39 085973
 http://www.tirasa.net
 
 Apache Syncope PPMC Member
 http://people.apache.org/~mdisabatino
 
 
 
 
 

--

Dott. Marco Di Sabatino Di Diodoro
Tel. +39 3939065570

Tirasa S.r.l.
Viale D'Annunzio 267 - 65127 Pescara
Tel +39 0859116307 / FAX +39 085973
http://www.tirasa.net

Apache Syncope PPMC Member
http://people.apache.org/~mdisabatino