Re: getCallbackFunctionBody - Wicket.Ajax.ajax?

2013-07-22 Thread Martin Grigorov
Hi,

On Fri, Jul 19, 2013 at 5:10 PM, Bertrand Guay-Paquet 
ber...@step.polymtl.ca wrote:

 Hi,

 I use the javascript generated by getCallbackFunction just fine. Here's an
 actual function used as an onclick callback:

 function (event) {
 var attrs = {u:./103?1-1.**IBehaviorListener.0-,i:**veil};


If there is no event (attribute 'e') in the attributes then 'domready' is
assumed.
I.e. Wicket.Ajax.ajax() will call Wicket.Ajax.Call.ajax() as soon as the
component is available in the DOM. If there is no component (attribute 'c')
then the window object is used.


 var params = {'tourAction': 1};
 attrs.ep = params;
 Wicket.Ajax.ajax(attrs);
 }

 The java code that generated it is :
 // Collect the extra parameters
 CallbackParameter[] parameters = new CallbackParameter[2];
 parameters[0] = CallbackParameter.context(**event);
 parameters[1] = CallbackParameter.resolved(**tourAction, 1);

 // Generate callback function
 CharSequence callbackFunction = getCallbackFunction(**parameters);

 This definitely does an ajax call. I haven't looked closely at the
 Wicket.Ajax.ajax() code, but it works fine.

 Bertrand


 On 19/07/2013 9:58 AM, Frank van Lankvelt wrote:

 hi all,

 in the process of upgrading to wicket 6, I have to do some wicket ajax
 calls from custom javascript callbacks.  The AbstractDefaultAjaxBehavior
 seems to provide a bunch of tools to help me out.  But I cannot make sense
 of the javadoc ( implementation) of #getCallbackFunction:

   * Generates a javascript function that can take parameters and performs
 an
 AJAX call which
   * includes these parameters. The generated code looks like this:
   *
   * pre
   * function(param1, param2) {
   *var attrs = attrsJson;
   *var params = {'param1': param1, 'param2': param2};
   *attrs.ep = jQuery.extend(attrs.ep, params);
   *Wicket.Ajax.ajax(attrs);
   * }
   * /pre

 But AFAIK the last line of the generated function Wicket.Ajax.ajax(attrs)
 does not do an ajax call.
 It just uses jQuery to register event listeners.

 So have I missed something, or is this a bug?

 thanks, Frank



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




Re: TinyMCE Twitter Bootstrap Toggle

2013-07-22 Thread Andrea Del Bene
Hi,

you can have a look at InPlaceEditComponent which is used in the example
page InlineTinyMCEPage (see code at
https://github.com/wicketstuff/core/blob/master/jdk-1.6-parent/tinymce-parent/tinymce-examples/src/main/java/wicket/contrib/examples/tinymce/InlineTinyMCEPage.java)
 Hello,

 I have a bootstrap toggle button which the user can use to open and close
 TinyMCE editor. When the page is rendered I would like the TinyMCE editor
 to be closed and when user clicks on the toggle button - open.

 Note that twitter bootstrap button needs to know
 TinyMCE#getAjaxRegionMarkupId(area) in order to use it in
 toggle-target='xxx' attribute to toggle it.

 Is there a way to configure TinyMceBehavior to render hidden by default?
 Any other ideas on how I can get this solved?

 Thanks,

 Alec



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



Re: getCallbackFunctionBody - Wicket.Ajax.ajax?

2013-07-22 Thread Frank van Lankvelt
On Mon, Jul 22, 2013 at 9:13 AM, Martin Grigorov mgrigo...@apache.orgwrote:

 Hi,

 On Fri, Jul 19, 2013 at 5:10 PM, Bertrand Guay-Paquet 
 ber...@step.polymtl.ca wrote:

  Hi,
 
  I use the javascript generated by getCallbackFunction just fine. Here's
 an
  actual function used as an onclick callback:
 
  function (event) {
  var attrs = {u:./103?1-1.**IBehaviorListener.0-,i:**veil};
 

 If there is no event (attribute 'e') in the attributes then 'domready' is
 assumed.
 I.e. Wicket.Ajax.ajax() will call Wicket.Ajax.Call.ajax() as soon as the
 component is available in the DOM. If there is no component (attribute 'c')
 then the window object is used.


thanks for explaining.  This should allow me to simplify things here and
there.

cheers, Frank



  var params = {'tourAction': 1};
  attrs.ep = params;
  Wicket.Ajax.ajax(attrs);
  }
 
  The java code that generated it is :
  // Collect the extra parameters
  CallbackParameter[] parameters = new CallbackParameter[2];
  parameters[0] = CallbackParameter.context(**event);
  parameters[1] = CallbackParameter.resolved(**tourAction, 1);
 
  // Generate callback function
  CharSequence callbackFunction =
 getCallbackFunction(**parameters);
 
  This definitely does an ajax call. I haven't looked closely at the
  Wicket.Ajax.ajax() code, but it works fine.
 
  Bertrand
 
 
  On 19/07/2013 9:58 AM, Frank van Lankvelt wrote:
 
  hi all,
 
  in the process of upgrading to wicket 6, I have to do some wicket ajax
  calls from custom javascript callbacks.  The AbstractDefaultAjaxBehavior
  seems to provide a bunch of tools to help me out.  But I cannot make
 sense
  of the javadoc ( implementation) of #getCallbackFunction:
 
* Generates a javascript function that can take parameters and
 performs
  an
  AJAX call which
* includes these parameters. The generated code looks like this:
*
* pre
* function(param1, param2) {
*var attrs = attrsJson;
*var params = {'param1': param1, 'param2': param2};
*attrs.ep = jQuery.extend(attrs.ep, params);
*Wicket.Ajax.ajax(attrs);
* }
* /pre
 
  But AFAIK the last line of the generated function
 Wicket.Ajax.ajax(attrs)
  does not do an ajax call.
  It just uses jQuery to register event listeners.
 
  So have I missed something, or is this a bug?
 
  thanks, Frank
 
 
 
  --**--**-
  To unsubscribe, e-mail: users-unsubscribe@wicket.**apache.org
 users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 




-- 
Amsterdam - Oosteinde 11, 1017 WT Amsterdam
Boston - 1 Broadway, Cambridge, MA 02142

US +1 877 414 4776 (toll free)
Europe +31(0)20 522 4466
www.onehippo.com


Re: Wicket Atmosphere - Encoding and MultiTab issues

2013-07-22 Thread Martin Grigorov
Hi,


On Thu, Jul 18, 2013 at 4:22 PM, fliptaboada fliptabo...@gmail.com wrote:

 Hi,

 I'm using wicket atmosphere on multiple pages to push some messages, like
 when a report is ready.

 The first problem is that the html updated by the wicket-atmosphere
 response
 arrives with broken enconding.
 Everything is fine until the respose reaches the jquery.atmosphere
 javascript.

 Already tried to do this on the javascript resources, but without success:
 @Override
 public JavaScriptPackageResource getResource()
 {
 JavaScriptPackageResource resource = super.getResource();
 resource.setTextEncoding(UTF-8);
 return resource;
 }


 The second one is that when the user keep opening tabs, after 6 tabs, pages
 got locked and wait until you close another tab.
 Is there a parameter or something about this?


 Both problems are reproducibles at
 http://www.wicket-library.com/wicket-examples-6.0.x/atmosphere/
 For the first just try to send a message with รก


Please file a ticket about this.


 For the second, keep opening tabs with this address, the sixth tab don't
 finish and the seventh still waiting.


The browsers have a limit of max opened connections to a domain.
For Firefox and Chrome it is 6 connections.
For IE 7/8 (not sure about the newer versions) it is 2.



 Thanks,
 Felipe Taboada.




 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/Wicket-Atmosphere-Encoding-and-MultiTab-issues-tp4660342.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




Re: Adding checkbox column to DefaultDataTable

2013-07-22 Thread Sven Meier

What does CheckboxColumn look like?

Sven

On 07/19/2013 07:28 PM, BrianWilliams wrote:

This works just fine to add checkboxes to a ListView:
 final CheckGroupPerson group = new CheckGroupPerson(group,
new ArrayListPerson());
 Form? form = new Form(form) {
 @Override
 protected void onSubmit() {
 info(selected person(s):  +
group.getDefaultModelObjectAsString());
 }
 };

 add(form);
 form.add(group);
 group.add(new CheckGroupSelector(groupselector));
 ListViewPerson listView = new ListViewPerson(persons,
getModel()) {
 /**
  * @see
  *
org.apache.wicket.markup.html.list.ListView#populateItem(org.apache.wicket.markup.html.list.ListItem)
  */
 @Override
 protected void populateItem(ListItemPerson item) {
 item.add(new CheckPerson(checkbox,
item.getModel()));
 item.add(new Label(name, new
PropertyModelString(item.getDefaultModel(), name)));
 }
 };

 listView.setReuseItems(true);
 group.add(listView);

However, similar code to add a checkbox column to a DefaultDataTable fails.

 final CheckGroupPerson group = new CheckGroupPerson(group,
new ArrayListPerson());
 Form? form = new Form(form2) {
 @Override
 protected void onSubmit() {
 info(selected person(s):  +
group.getDefaultModelObjectAsString());
 }
 };

 List columns = new ArrayList();
 columns.add(new CheckboxColumn(id));

 columns.add(new PsPropertyColumn(Name, name) {

 @Override
 public void populateItem(Item cellItem, String componentId,
IModel rowModel)
 {
 super.populateItem(cellItem, componentId, rowModel);
 }
 });
 final DataProvider dataProvider = new DataProvider(getModel());

 add(form);
 form.add(group);
 group.add(new CheckGroupSelector(groupselector));
 DefaultDataTable table = new DefaultDataTable(dataTable,
columns, dataProvider, 5) {
 };

 group.add(table);

The checkboxes appear, but selecting on actually selects the column rather
than the individual item.  This causes multiple problems, such as
getDefaultModelObjectAsString() returns the column and the
CheckGroupSelector, thinking the column is selected and the same column is
used for all checkboxes, selects all boxes on post back.  Any advice?





--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Adding-checkbox-column-to-DefaultDataTable-tp4660374.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




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



Sharing Bookmarkable pages.

2013-07-22 Thread Peter Henderson
When a user emails a link to another user sometimes the wrong page is
rendered.

Alice sends
http://starjar.com/Part/123?111
to Bob who is was recently looking at
http://starjar.com/Order/456?111


Instead of seeing the part page he see the order page.
I assume this is because of the page version ?111 parameter.

The pages are mounted.

mountPage(/Order, classOf[OrderPage])
mountPage(/Part, classOf[PartPage])

and each page uses the page parameters to extract the id at index 0


  def decode(parameters: PageParameters): Id = {
try {
  val idValue = parameters.get(0).toInt;
 

Should I be mounting the pages differently to prevent the wicket page
revision version overriding the mount path?




-- 
Peter Henderson


Re: Sharing Bookmarkable pages.

2013-07-22 Thread Sven Meier

Hi,

I cannot reproduces the problem here, which Wicket version are you using?

Note that PageProvider#getStoredPage(int) has a safety check to make 
sure the page classes matches.


Sven

On 07/22/2013 01:38 PM, Peter Henderson wrote:

When a user emails a link to another user sometimes the wrong page is
rendered.

Alice sends
http://starjar.com/Part/123?111
to Bob who is was recently looking at
http://starjar.com/Order/456?111


Instead of seeing the part page he see the order page.
I assume this is because of the page version ?111 parameter.

The pages are mounted.

 mountPage(/Order, classOf[OrderPage])
 mountPage(/Part, classOf[PartPage])

and each page uses the page parameters to extract the id at index 0


   def decode(parameters: PageParameters): Id = {
 try {
   val idValue = parameters.get(0).toInt;
  

Should I be mounting the pages differently to prevent the wicket page
revision version overriding the mount path?







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



Re: Sharing Bookmarkable pages.

2013-07-22 Thread Peter Henderson
Hmm. My initial description is incorrect.

Alice sends  /Order/123?8 to Bob.
Bob was recently looking at /Order/222?8

Bob shows a url of /Order/123?8  but is actually viewing /Order/222

I used 2  browsers (firefox+chromium) to reproduce.
I am using wicket 6.8

Should I be mounting the pages with some form of place holder to indicate I
am using index parameters?



Peter




On 22 July 2013 13:50, Sven Meier s...@meiers.net wrote:

 Hi,

 I cannot reproduces the problem here, which Wicket version are you using?

 Note that PageProvider#getStoredPage(**int) has a safety check to make
 sure the page classes matches.

 Sven


 On 07/22/2013 01:38 PM, Peter Henderson wrote:

 When a user emails a link to another user sometimes the wrong page is
 rendered.

 Alice sends
 http://starjar.com/Part/123?**111 http://starjar.com/Part/123?111
 to Bob who is was recently looking at
 http://starjar.com/Order/456?**111 http://starjar.com/Order/456?111


 Instead of seeing the part page he see the order page.
 I assume this is because of the page version ?111 parameter.

 The pages are mounted.

  mountPage(/Order, classOf[OrderPage])
  mountPage(/Part, classOf[PartPage])

 and each page uses the page parameters to extract the id at index 0


def decode(parameters: PageParameters): Id = {
  try {
val idValue = parameters.get(0).toInt;
   

 Should I be mounting the pages differently to prevent the wicket page
 revision version overriding the mount path?






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




Re: Sharing Bookmarkable pages.

2013-07-22 Thread Sven Meier

Yes, that makes more sense:

The page identifier takes precedence - if page ?8 is available it will 
be shown to the user (given it has the correct type). The actual page 
parameters don't matter.


IMHO this is a bug and you should create a Jira issue.

Sven

On 07/22/2013 03:44 PM, Peter Henderson wrote:

Hmm. My initial description is incorrect.

Alice sends  /Order/123?8 to Bob.
Bob was recently looking at /Order/222?8

Bob shows a url of /Order/123?8  but is actually viewing /Order/222

I used 2  browsers (firefox+chromium) to reproduce.
I am using wicket 6.8

Should I be mounting the pages with some form of place holder to indicate I
am using index parameters?



Peter




On 22 July 2013 13:50, Sven Meier s...@meiers.net wrote:


Hi,

I cannot reproduces the problem here, which Wicket version are you using?

Note that PageProvider#getStoredPage(**int) has a safety check to make
sure the page classes matches.

Sven


On 07/22/2013 01:38 PM, Peter Henderson wrote:


When a user emails a link to another user sometimes the wrong page is
rendered.

Alice sends
http://starjar.com/Part/123?**111 http://starjar.com/Part/123?111
to Bob who is was recently looking at
http://starjar.com/Order/456?**111 http://starjar.com/Order/456?111


Instead of seeing the part page he see the order page.
I assume this is because of the page version ?111 parameter.

The pages are mounted.

  mountPage(/Order, classOf[OrderPage])
  mountPage(/Part, classOf[PartPage])

and each page uses the page parameters to extract the id at index 0


def decode(parameters: PageParameters): Id = {
  try {
val idValue = parameters.get(0).toInt;
   

Should I be mounting the pages differently to prevent the wicket page
revision version overriding the mount path?






--**--**-
To unsubscribe, e-mail: 
users-unsubscribe@wicket.**apache.orgusers-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



Re: Sharing Bookmarkable pages.

2013-07-22 Thread Martin Grigorov
On Mon, Jul 22, 2013 at 4:54 PM, Sven Meier s...@meiers.net wrote:

 Yes, that makes more sense:

 The page identifier takes precedence - if page ?8 is available it will be
 shown to the user (given it has the correct type). The actual page
 parameters don't matter.

 IMHO this is a bug and you should create a Jira issue.


https://issues.apache.org/jira/browse/WICKET-4441



 Sven


 On 07/22/2013 03:44 PM, Peter Henderson wrote:

 Hmm. My initial description is incorrect.

 Alice sends  /Order/123?8 to Bob.
 Bob was recently looking at /Order/222?8

 Bob shows a url of /Order/123?8  but is actually viewing /Order/222

 I used 2  browsers (firefox+chromium) to reproduce.
 I am using wicket 6.8

 Should I be mounting the pages with some form of place holder to indicate
 I
 am using index parameters?



 Peter




 On 22 July 2013 13:50, Sven Meier s...@meiers.net wrote:

  Hi,

 I cannot reproduces the problem here, which Wicket version are you using?

 Note that PageProvider#getStoredPage(int) has a safety check to make
 sure the page classes matches.

 Sven


 On 07/22/2013 01:38 PM, Peter Henderson wrote:

  When a user emails a link to another user sometimes the wrong page is
 rendered.

 Alice sends
 http://starjar.com/Part/123?111 http://starjar.com/Part/123?**111
 http://starjar.com/Part/123?**111 http://starjar.com/Part/123?111
 to Bob who is was recently looking at
 http://starjar.com/Order/456?111http://starjar.com/Order/456?**111
 http://starjar.com/Order/456?**111 http://starjar.com/Order/456?111


 Instead of seeing the part page he see the order page.
 I assume this is because of the page version ?111 parameter.

 The pages are mounted.

   mountPage(/Order, classOf[OrderPage])
   mountPage(/Part, classOf[PartPage])

 and each page uses the page parameters to extract the id at index 0


 def decode(parameters: PageParameters): Id = {
   try {
 val idValue = parameters.get(0).toInt;


 Should I be mounting the pages differently to prevent the wicket page
 revision version overriding the mount path?





  --**
 --**-
 To unsubscribe, e-mail: 
 users-unsubscribe@wicket.**apa**che.orghttp://apache.org
 users-unsubscribe@**wicket.apache.orgusers-unsubscr...@wicket.apache.org
 
 For additional commands, e-mail: users-h...@wicket.apache.org




 --**--**-
 To unsubscribe, e-mail: 
 users-unsubscribe@wicket.**apache.orgusers-unsubscr...@wicket.apache.org

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




Re: Sharing Bookmarkable pages.

2013-07-22 Thread Sven Meier

Thanks Martin!

I'll dig into its history.

Sven

On 07/22/2013 03:59 PM, Martin Grigorov wrote:

On Mon, Jul 22, 2013 at 4:54 PM, Sven Meier s...@meiers.net wrote:


Yes, that makes more sense:

The page identifier takes precedence - if page ?8 is available it will be
shown to the user (given it has the correct type). The actual page
parameters don't matter.

IMHO this is a bug and you should create a Jira issue.


https://issues.apache.org/jira/browse/WICKET-4441



Sven


On 07/22/2013 03:44 PM, Peter Henderson wrote:


Hmm. My initial description is incorrect.

Alice sends  /Order/123?8 to Bob.
Bob was recently looking at /Order/222?8

Bob shows a url of /Order/123?8  but is actually viewing /Order/222

I used 2  browsers (firefox+chromium) to reproduce.
I am using wicket 6.8

Should I be mounting the pages with some form of place holder to indicate
I
am using index parameters?



Peter




On 22 July 2013 13:50, Sven Meier s...@meiers.net wrote:

  Hi,

I cannot reproduces the problem here, which Wicket version are you using?

Note that PageProvider#getStoredPage(int) has a safety check to make
sure the page classes matches.

Sven


On 07/22/2013 01:38 PM, Peter Henderson wrote:

  When a user emails a link to another user sometimes the wrong page is

rendered.

Alice sends
http://starjar.com/Part/123?111 http://starjar.com/Part/123?**111
http://starjar.com/Part/123?**111 http://starjar.com/Part/123?111
to Bob who is was recently looking at
http://starjar.com/Order/456?111http://starjar.com/Order/456?**111
http://starjar.com/Order/456?**111 http://starjar.com/Order/456?111


Instead of seeing the part page he see the order page.
I assume this is because of the page version ?111 parameter.

The pages are mounted.

   mountPage(/Order, classOf[OrderPage])
   mountPage(/Part, classOf[PartPage])

and each page uses the page parameters to extract the id at index 0


 def decode(parameters: PageParameters): Id = {
   try {
 val idValue = parameters.get(0).toInt;


Should I be mounting the pages differently to prevent the wicket page
revision version overriding the mount path?





  --**

--**-
To unsubscribe, e-mail: 
users-unsubscribe@wicket.**apa**che.orghttp://apache.org
users-unsubscribe@**wicket.apache.orgusers-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org




--**--**-
To unsubscribe, e-mail: 
users-unsubscribe@wicket.**apache.orgusers-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



Wicket 1.5 URLs

2013-07-22 Thread Eric Gulatee
Hi fellow Wicketeers,

We are in the process of upgrading a 1.4.X application to 1.5.X

We had 2 different URL 'contexts' within the same Wicket 1.4 Application.

/protected/*
  All pages annotated with security.  [In order to use J2EE security, LTPA,
Kerberos etc]
/*
  All unprotected pages

Moving to Wicket 1.5 I would like to obtain the following URL schemes based
on either an annotation on the class OR extending an interface..
Protected Pages:
/protected/wicket/page?1
Unprotected Pages:
/wicket/page?1

1-  I have explored the mountedmapper but I don't want to specify each 
every class, nor do I want bookmarkable URLs.

2-  I am currentl exploring creating a version of pageinstancemapped
prepending /protected which actually generates nice urls.
However, I am currently getting a page expired.  (I am still trying to dig
through the cause etc)

My question:
Is there a different recommended way to generate these custom URLs in a
generic way much like PageInstanceMapper based on either an annotation on a
class or interface the class would implement OR am I going down the right
path with extending PageInstanceMapper?

Cheers,
Eric Gulatee


Re: Wicket 1.5 URLs

2013-07-22 Thread Eric Gulatee
Some more details,

Using a quickstart, If I replace the pageinstancemapper by a
custompageinstancemapper which does nothing else than extending
pageinstancemapper, I am getting pageexpiredpages.

This matches the kind of behavior I get when I add a second
pageinstancemapper mapping to another context root and seemingly correctly
determine it should be used to match the urls.
ie: /contextroot/wicket/page?33

Is there any reason I can't replicate the pageinstancemapper by my own?
 And if so, why do I get pageexpired problems?

Cheers,
Eric Gulatee






On Mon, Jul 22, 2013 at 11:39 AM, Eric Gulatee eric.gula...@gmail.comwrote:

 Hi fellow Wicketeers,

 We are in the process of upgrading a 1.4.X application to 1.5.X

 We had 2 different URL 'contexts' within the same Wicket 1.4 Application.

 /protected/*
   All pages annotated with security.  [In order to use J2EE security,
 LTPA, Kerberos etc]
 /*
   All unprotected pages

 Moving to Wicket 1.5 I would like to obtain the following URL schemes
 based on either an annotation on the class OR extending an interface..
 Protected Pages:
 /protected/wicket/page?1
 Unprotected Pages:
 /wicket/page?1

 1-  I have explored the mountedmapper but I don't want to specify each 
 every class, nor do I want bookmarkable URLs.

 2-  I am currentl exploring creating a version of pageinstancemapped
 prepending /protected which actually generates nice urls.
 However, I am currently getting a page expired.  (I am still trying to dig
 through the cause etc)

 My question:
 Is there a different recommended way to generate these custom URLs in a
 generic way much like PageInstanceMapper based on either an annotation on a
 class or interface the class would implement OR am I going down the right
 path with extending PageInstanceMapper?

 Cheers,
 Eric Gulatee







Re: TinyMCE Twitter Bootstrap Toggle

2013-07-22 Thread Alec Swan
Andrea, thank you for a good pointer. The thing I am struggling with is
adding class=collapse to the xxx_wrapper_component which seems to be
created by TinyMCE JavaScript after my Wicket code can add
AttributeModifier or even invoke $('# + getAjaxRegionMarkupId() +
').css('class', 'collapse');.

It seems like the class gets set by right after that is erased by TinyMCE.

Any ideas how I can run my code that sets CSS class of mce wrapper div
after tinyMce.init()?

Thanks,

Alec


On Mon, Jul 22, 2013 at 1:30 AM, Andrea Del Bene an.delb...@gmail.comwrote:

 Hi,

 you can have a look at InPlaceEditComponent which is used in the example
 page InlineTinyMCEPage (see code at

 https://github.com/wicketstuff/core/blob/master/jdk-1.6-parent/tinymce-parent/tinymce-examples/src/main/java/wicket/contrib/examples/tinymce/InlineTinyMCEPage.java
 )
  Hello,
 
  I have a bootstrap toggle button which the user can use to open and close
  TinyMCE editor. When the page is rendered I would like the TinyMCE editor
  to be closed and when user clicks on the toggle button - open.
 
  Note that twitter bootstrap button needs to know
  TinyMCE#getAjaxRegionMarkupId(area) in order to use it in
  toggle-target='xxx' attribute to toggle it.
 
  Is there a way to configure TinyMceBehavior to render hidden by default?
  Any other ideas on how I can get this solved?
 
  Thanks,
 
  Alec
 


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




problem with ajax buttons + fields with AjaxFormComponentUpdatingBehavior

2013-07-22 Thread Andrew Geery
I have a form that is submitted with an AjaxButton.  One of the fields in
the form uses an AjaxFormComponentUpdatingBehavior to update the
server-side state when a value in the field changes (i.e., it fires
onchange).  If the user changes the field with
the AjaxFormComponentUpdatingBehavior associated with it and then clicks
the submit button, the behavior updates the field server side, but the ajax
button doesn't submit the form.  The user has to click the submit button a
second time to submit the form.  Is there a way to get the two ajax
behaviors to fire consecutively, rather than forcing the user to click
twice?

Thanks
Andrew