Re: Lazyload does not work with deployment mode

2013-12-27 Thread Martin Grigorov
Hi,
On Dec 21, 2013 3:19 PM, letien tien...@toshiba-tsdv.com wrote:

 I have researched deployment mode, and saw that:

 In deployment mode , we do everything to make the life of the users better.
 This means disabling all the stuff that helps developers .

 1. Disable component hierarchy checks (only the things that prevent Wicket
 from rendering, i.e. fatal errors, are now reported)

 2. Enable caching of resources,

 3. Remove wicket tags and attributes


I think 3) is the problem for you.
Probably you use wicket:container and this cannot be found in deployment
mode because it is not rendered.



 4. Enable minimization of JavaScript.

 Maybe enable minimization of JavaScript cause this problem with lazy
 load?
 Do you get this problem same me? And have any solutions?



 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/Lazyload-does-not-work-with-deployment-mode-tp4663172p4663173.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: wicket-el - is this a safe way to hook into wicket?

2013-12-27 Thread Martin Grigorov
https://issues.apache.org/jira/browse/WICKET-5456
6.13 should be released soon.


Martin Grigorov
Wicket Training and Consulting


On Mon, Dec 23, 2013 at 4:21 PM, Jeremy Thomerson jer...@wickettraining.com
 wrote:

 On Sun, Dec 22, 2013 at 5:30 AM, Steve shadders@gmail.com wrote:

  So what it is the best way to go about requesting a change to
  wicket-core?  I'm happy to fork and create a pull request etc but it
  seems overkill for removing a single word from one class.  Should I
  create a JIRA ticket perhaps?
 

 Create a JIRA that describes why you need it and put a link back to this
 thread in the JIRA. That way it will be around for posterity if the change
 is made.


 --
 Jeremy Thomerson
 http://wickettraining.com



Re: Wicket serving AngularJS app

2013-12-27 Thread Martin Grigorov
Hi,

I see two options:
1) use Wicket Page instead of index.html so Wicket can contribute JS/CSS
resources to the header
2) use AngularJs functionalities to do this.
This approach may lead to page rerendering/reflow (UI flickering) because
Angular can do this after the initial page load

Martin Grigorov
Wicket Training and Consulting


On Tue, Dec 24, 2013 at 12:07 AM, Warren Bell
warr...@clarksnutrition.comwrote:

 I am using Wicket 6 to manage an AngularJS app. Currently I am just
 letting Tomcat serve the AngularJS client i.e. index.html and using Wicket
 for authentication, authorization and REST. But I would like to use Wicket
 to serve up the client so that I can manage css and js resources and set an
 initial cookie. What would be the best way to do this ?

 I was thinking of just making the index.html file a wicket page with no
 components or should I use a WebExternalResourceRequestHandler or something
 similar ?

 Thanks,

 Warren
 --
 This email was Virus checked by Clark's Nutrition's Astaro Security
 Gateway.

 lt;div style='font-size:11.0pt;font-family:quot;Tahomaquot;'gt;The
 information contained in this e-mail is intended only for use of
 the individual or entity named above. This e-mail, and any documents,
 files, previous e-mails or other information attached to it, may contain
 confidential information that is legally privileged. If you are not the
 intended recipient of this e-mail, or the employee or agent responsible
 for delivering it to the intended recipient, you are hereby notified
 that any disclosure, dissemination, distribution, copying or other use
 of this e-mail or any of the information contained in or attached to it
 is strictly prohibited. If you have received this e-mail in error,
 please immediately notify us by return e-mail or by telephone at
 (951)321-1960, and destroy the original e-mail and its attachments
 without reading or saving it in any manner. Thank you.lt;/divgt;

 lt;div align=quot;centerquot;
 style='font-size:12.0pt;font-family:quot;Tahomaquot;,quot;sans-serifquot;'gt;lt;stronggt;Clark’s
 Nutrition is a registered trademark of Clarks Nutritional Centers,
 Inc.lt;/stronggt;lt;/divgt;

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




Get HTML from WebMarkupContainer

2013-12-27 Thread Rafael Barrera Oro
Hello!

I've been googling a while now without success so i thought i might ask
you. I'm trying to get the HTML of a WebMarkupContainer. That is, i have
markup file, i have a Java class and i want to get the HTML code resulting
from the render. I understand this is a tricky thing to do but,
nevertheless, possible.

Has anyone accomplished this?

The only thing i have tried so far (and without success) is adding the
following method on a class that inherits from WebMarkupContainer:

public String getHtml(){
  final Response origResponse = getRequestCycle().getResponse();
try{
final StringResponse stringResponse = new StringResponse();
getRequestCycle().setResponse(stringResponse);
renderAssociatedMarkup(panel, );
return stringResponse.toString();
}catch(Exception e){
 e.getMessage();
}finally{
getRequestCycle().setResponse(origResponse);
}
return ;
}

however, it results in the an exception (page not found for component foo)

Does this ring a bell to anyone? thanks in advance!
Rafael


Re: Get HTML from WebMarkupContainer

2013-12-27 Thread Martin Grigorov
Hi,

Check wicket-examples - mailtemplate example
On Dec 27, 2013 10:48 PM, Rafael Barrera Oro boraf...@gmail.com wrote:

 Hello!

 I've been googling a while now without success so i thought i might ask
 you. I'm trying to get the HTML of a WebMarkupContainer. That is, i have
 markup file, i have a Java class and i want to get the HTML code resulting
 from the render. I understand this is a tricky thing to do but,
 nevertheless, possible.

 Has anyone accomplished this?

 The only thing i have tried so far (and without success) is adding the
 following method on a class that inherits from WebMarkupContainer:

 public String getHtml(){
   final Response origResponse = getRequestCycle().getResponse();
 try{
 final StringResponse stringResponse = new StringResponse();
 getRequestCycle().setResponse(stringResponse);
 renderAssociatedMarkup(panel, );
 return stringResponse.toString();
 }catch(Exception e){
  e.getMessage();
 }finally{
 getRequestCycle().setResponse(origResponse);
 }
 return ;
 }

 however, it results in the an exception (page not found for component
 foo)

 Does this ring a bell to anyone? thanks in advance!
 Rafael



Re: Get HTML from WebMarkupContainer

2013-12-27 Thread Rafael Barrera Oro
Thanks for the response Martin!

This indeed seems to do the trick, however, the problem is that the project
i'm working on is stuck on the 1.3.7 version of Wicket (long before the
ComponentRenderer class is available, if i am not mistaken).

Is there any other way to accomplish this?

Thanks again!
Rafael


2013/12/27 Martin Grigorov mgrigo...@apache.org

 Hi,

 Check wicket-examples - mailtemplate example
 On Dec 27, 2013 10:48 PM, Rafael Barrera Oro boraf...@gmail.com wrote:

  Hello!
 
  I've been googling a while now without success so i thought i might ask
  you. I'm trying to get the HTML of a WebMarkupContainer. That is, i have
  markup file, i have a Java class and i want to get the HTML code
 resulting
  from the render. I understand this is a tricky thing to do but,
  nevertheless, possible.
 
  Has anyone accomplished this?
 
  The only thing i have tried so far (and without success) is adding the
  following method on a class that inherits from WebMarkupContainer:
 
  public String getHtml(){
final Response origResponse = getRequestCycle().getResponse();
  try{
  final StringResponse stringResponse = new StringResponse();
  getRequestCycle().setResponse(stringResponse);
  renderAssociatedMarkup(panel, );
  return stringResponse.toString();
  }catch(Exception e){
   e.getMessage();
  }finally{
  getRequestCycle().setResponse(origResponse);
  }
  return ;
  }
 
  however, it results in the an exception (page not found for component
  foo)
 
  Does this ring a bell to anyone? thanks in advance!
  Rafael
 



Re: Get HTML from WebMarkupContainer

2013-12-27 Thread Martin Grigorov
Copy ComponentRenderer.java and tweak it for 1.3.7...
On Dec 28, 2013 12:03 AM, Rafael Barrera Oro boraf...@gmail.com wrote:

 Thanks for the response Martin!

 This indeed seems to do the trick, however, the problem is that the project
 i'm working on is stuck on the 1.3.7 version of Wicket (long before the
 ComponentRenderer class is available, if i am not mistaken).

 Is there any other way to accomplish this?

 Thanks again!
 Rafael


 2013/12/27 Martin Grigorov mgrigo...@apache.org

  Hi,
 
  Check wicket-examples - mailtemplate example
  On Dec 27, 2013 10:48 PM, Rafael Barrera Oro boraf...@gmail.com
 wrote:
 
   Hello!
  
   I've been googling a while now without success so i thought i might ask
   you. I'm trying to get the HTML of a WebMarkupContainer. That is, i
 have
   markup file, i have a Java class and i want to get the HTML code
  resulting
   from the render. I understand this is a tricky thing to do but,
   nevertheless, possible.
  
   Has anyone accomplished this?
  
   The only thing i have tried so far (and without success) is adding the
   following method on a class that inherits from WebMarkupContainer:
  
   public String getHtml(){
 final Response origResponse = getRequestCycle().getResponse();
   try{
   final StringResponse stringResponse = new StringResponse();
   getRequestCycle().setResponse(stringResponse);
   renderAssociatedMarkup(panel, );
   return stringResponse.toString();
   }catch(Exception e){
e.getMessage();
   }finally{
   getRequestCycle().setResponse(origResponse);
   }
   return ;
   }
  
   however, it results in the an exception (page not found for component
   foo)
  
   Does this ring a bell to anyone? thanks in advance!
   Rafael