You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Josh Chappelle <jc...@4redi.com> on 2010/02/26 22:08:48 UTC

Print friendly panel

Hi,

 

Does anyone know of a suggested method to render a printer friendly panel to
a separate browser window so that user's can print? The only thing I have
found is the following article and it looks a little clunky.

 

http://cwiki.apache.org/WICKET/rendering-panel-to-a-string.html

 

Basically I just need to be able to place a link that when clicked will pop
up a new browser window with only the contents to the target panel. That way
users can print that panel from there.

 

Thanks,

 

Josh

 

 


RE: Print friendly panel

Posted by Josh Chappelle <jc...@4redi.com>.
Thanks Michael,

I actually got the popup to work by just putting target="_blank" in the
anchor tag. I didn't think about doing it your way.

My main problem is rendering the component into a string as well as to the
browser.

Thanks for your help!

Josh

-----Original Message-----
From: Michael O'Cleirigh [mailto:michael.ocleirigh@rivulet.ca] 
Sent: Friday, February 26, 2010 3:25 PM
To: users@wicket.apache.org
Subject: Re: Print friendly panel

Hi Josh,

I'd create a PrinterFriendlyPage and then use a customized Link from the 
NotPrinterFriendlyPage to have it open in a new window.

Link has this public method where you can setup the PopupSettings class 
that seems to provide the configuration hooks for how the popup should 
work when displayed.

public final Link<T> setPopupSettings(final PopupSettings popupSettings)
     {
         this.popupSettings = popupSettings;
         return this;
     }

Regards,

Mike

> Hi,
>
>
>
> Does anyone know of a suggested method to render a printer friendly panel
to
> a separate browser window so that user's can print? The only thing I have
> found is the following article and it looks a little clunky.
>
>
>
> http://cwiki.apache.org/WICKET/rendering-panel-to-a-string.html
>
>
>
> Basically I just need to be able to place a link that when clicked will
pop
> up a new browser window with only the contents to the target panel. That
way
> users can print that panel from there.
>
>
>
> Thanks,
>
>
>
> Josh
>
>
>
>
>
>
>    


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


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


Re: Print friendly panel

Posted by Michael O'Cleirigh <mi...@rivulet.ca>.
Hi Josh,

I'd create a PrinterFriendlyPage and then use a customized Link from the 
NotPrinterFriendlyPage to have it open in a new window.

Link has this public method where you can setup the PopupSettings class 
that seems to provide the configuration hooks for how the popup should 
work when displayed.

public final Link<T> setPopupSettings(final PopupSettings popupSettings)
     {
         this.popupSettings = popupSettings;
         return this;
     }

Regards,

Mike

> Hi,
>
>
>
> Does anyone know of a suggested method to render a printer friendly panel to
> a separate browser window so that user's can print? The only thing I have
> found is the following article and it looks a little clunky.
>
>
>
> http://cwiki.apache.org/WICKET/rendering-panel-to-a-string.html
>
>
>
> Basically I just need to be able to place a link that when clicked will pop
> up a new browser window with only the contents to the target panel. That way
> users can print that panel from there.
>
>
>
> Thanks,
>
>
>
> Josh
>
>
>
>
>
>
>    


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


Make Wicket component ID HTML element ID?

Posted by David Chang <da...@yahoo.com>.
I have many Wicket components that are unique on pages. I would like to make their wicket ID HTML element ID instead of typing HTML id attribute. How can I do this?

Thanks!


      

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


Re: Better way to find a parent compoent in page hiearchy?

Posted by David Chang <da...@yahoo.com>.
Major, thanks for the info. You are right. I did not look down further along the wicket class hierarchy. 

Thanks!


--- On Sun, 2/28/10, Major Péter <ma...@sch.bme.hu> wrote:

> From: Major Péter <ma...@sch.bme.hu>
> Subject: Re: Better way to find a parent compoent in page hiearchy?
> To: users@wicket.apache.org
> Date: Sunday, February 28, 2010, 7:50 PM
> and the WebPage isn't a
> MarkupContainer or what??
> 
> 2010-02-28 23:54 keltezéssel, David Chang írta:
> > Thanks for your input. This is interesting. Somehow I
> got confused. 
> > 
> > Shouldn't this method be natural part of a Component?
> As you know, each component has child components, which is
> why a Wicket page has a hiearchy of components. 
> > 
> > Let's take MarkcupContainer for the moment. Using this
> class means I have to add another element in the markup
> page, which seems complicate thhings a bit and does not seem
> elegant.
> > 
> > Did I miss something?
> > 
> > Regards.
> > 
> > 
> > --- On Sun, 2/28/10, Major Péter <ma...@sch.bme.hu>
> wrote:
> > 
> >> From: Major Péter <ma...@sch.bme.hu>
> >> Subject: Re: Better way to find a parent compoent
> in page hiearchy?
> >> To: users@wicket.apache.org
> >> Date: Sunday, February 28, 2010, 4:20 PM
> >> Maybe, this will be good for you:
> >> http://wicketstuff.org/wicket13doc/org/apache/wicket/MarkupContainer.html#get(java.lang.String)
> >>
> >> Regards,
> >> Peter
> >>
> >> 2010-02-28 22:12 keltezéssel, David Chang írta:
> >>> igor, thanks for prompt help! 
> >>>
> >>> I can use
> Component#findParent(SomeClass.class) to
> >> find the first page. How can I further find the
> component by
> >> this Wicket ID? I need to overwrite its display
> value.
> >>>
> >>> Thanks again.
> >>>
> >>> --- On Sun, 2/28/10, Igor Vaynberg <ig...@gmail.com>
> >> wrote:
> >>>
> >>>> From: Igor Vaynberg <ig...@gmail.com>
> >>>> Subject: Re: Better way to find a parent
> compoent
> >> in page hiearchy?
> >>>> To: users@wicket.apache.org
> >>>> Date: Sunday, February 28, 2010, 4:04 PM
> >>>> Component#findParent(SomeClass.class)
> >>>> may be useful
> >>>>
> >>>> -igor
> >>>>
> >>>> On Sun, Feb 28, 2010 at 1:00 PM, David
> Chang
> >> <da...@yahoo.com>
> >>>> wrote:
> >>>>> I have two pages. The first page is
> extended
> >> by the
> >>>> second page. On the second page, I want to
> access
> >> a
> >>>> component on the first page. One way to do
> this is
> >> to make
> >>>> the component a member variable of the
> first page.
> >> I feel
> >>>> this way may have two drawbacks:
> >>>>>
> >>>>> 1. A member variable uses more
> resources
> >> (memory,
> >>>> clustring, etc.)
> >>>>> 2. Not all pages extending the first
> page may
> >> need to
> >>>> access this component, which make it seem
> >> unnecessary for
> >>>> such pages.
> >>>>>
> >>>>> Is there any more elegant way?
> >>>>>
> >>>>> I just started Wicket programming for
> a
> >> personal
> >>>> project. Thanks for any input!
> >>>>>
> >>>>> Regards, David
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
> 
> 


      

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


Re: Better way to find a parent compoent in page hiearchy?

Posted by Major Péter <ma...@sch.bme.hu>.
and the WebPage isn't a MarkupContainer or what??

2010-02-28 23:54 keltezéssel, David Chang írta:
> Thanks for your input. This is interesting. Somehow I got confused. 
> 
> Shouldn't this method be natural part of a Component? As you know, each component has child components, which is why a Wicket page has a hiearchy of components. 
> 
> Let's take MarkcupContainer for the moment. Using this class means I have to add another element in the markup page, which seems complicate thhings a bit and does not seem elegant.
> 
> Did I miss something?
> 
> Regards.
> 
> 
> --- On Sun, 2/28/10, Major Péter <ma...@sch.bme.hu> wrote:
> 
>> From: Major Péter <ma...@sch.bme.hu>
>> Subject: Re: Better way to find a parent compoent in page hiearchy?
>> To: users@wicket.apache.org
>> Date: Sunday, February 28, 2010, 4:20 PM
>> Maybe, this will be good for you:
>> http://wicketstuff.org/wicket13doc/org/apache/wicket/MarkupContainer.html#get(java.lang.String)
>>
>> Regards,
>> Peter
>>
>> 2010-02-28 22:12 keltezéssel, David Chang írta:
>>> igor, thanks for prompt help! 
>>>
>>> I can use Component#findParent(SomeClass.class) to
>> find the first page. How can I further find the component by
>> this Wicket ID? I need to overwrite its display value.
>>>
>>> Thanks again.
>>>
>>> --- On Sun, 2/28/10, Igor Vaynberg <ig...@gmail.com>
>> wrote:
>>>
>>>> From: Igor Vaynberg <ig...@gmail.com>
>>>> Subject: Re: Better way to find a parent compoent
>> in page hiearchy?
>>>> To: users@wicket.apache.org
>>>> Date: Sunday, February 28, 2010, 4:04 PM
>>>> Component#findParent(SomeClass.class)
>>>> may be useful
>>>>
>>>> -igor
>>>>
>>>> On Sun, Feb 28, 2010 at 1:00 PM, David Chang
>> <da...@yahoo.com>
>>>> wrote:
>>>>> I have two pages. The first page is extended
>> by the
>>>> second page. On the second page, I want to access
>> a
>>>> component on the first page. One way to do this is
>> to make
>>>> the component a member variable of the first page.
>> I feel
>>>> this way may have two drawbacks:
>>>>>
>>>>> 1. A member variable uses more resources
>> (memory,
>>>> clustring, etc.)
>>>>> 2. Not all pages extending the first page may
>> need to
>>>> access this component, which make it seem
>> unnecessary for
>>>> such pages.
>>>>>
>>>>> Is there any more elegant way?
>>>>>
>>>>> I just started Wicket programming for a
>> personal
>>>> project. Thanks for any input!
>>>>>
>>>>> Regards, David

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


Re: Better way to find a parent compoent in page hiearchy?

Posted by David Chang <da...@yahoo.com>.
Thanks for your input. This is interesting. Somehow I got confused. 

Shouldn't this method be natural part of a Component? As you know, each component has child components, which is why a Wicket page has a hiearchy of components. 

Let's take MarkcupContainer for the moment. Using this class means I have to add another element in the markup page, which seems complicate thhings a bit and does not seem elegant.

Did I miss something?

Regards.


--- On Sun, 2/28/10, Major Péter <ma...@sch.bme.hu> wrote:

> From: Major Péter <ma...@sch.bme.hu>
> Subject: Re: Better way to find a parent compoent in page hiearchy?
> To: users@wicket.apache.org
> Date: Sunday, February 28, 2010, 4:20 PM
> Maybe, this will be good for you:
> http://wicketstuff.org/wicket13doc/org/apache/wicket/MarkupContainer.html#get(java.lang.String)
> 
> Regards,
> Peter
> 
> 2010-02-28 22:12 keltezéssel, David Chang írta:
> > igor, thanks for prompt help! 
> > 
> > I can use Component#findParent(SomeClass.class) to
> find the first page. How can I further find the component by
> this Wicket ID? I need to overwrite its display value.
> > 
> > Thanks again.
> > 
> > --- On Sun, 2/28/10, Igor Vaynberg <ig...@gmail.com>
> wrote:
> > 
> >> From: Igor Vaynberg <ig...@gmail.com>
> >> Subject: Re: Better way to find a parent compoent
> in page hiearchy?
> >> To: users@wicket.apache.org
> >> Date: Sunday, February 28, 2010, 4:04 PM
> >> Component#findParent(SomeClass.class)
> >> may be useful
> >>
> >> -igor
> >>
> >> On Sun, Feb 28, 2010 at 1:00 PM, David Chang
> <da...@yahoo.com>
> >> wrote:
> >>> I have two pages. The first page is extended
> by the
> >> second page. On the second page, I want to access
> a
> >> component on the first page. One way to do this is
> to make
> >> the component a member variable of the first page.
> I feel
> >> this way may have two drawbacks:
> >>>
> >>> 1. A member variable uses more resources
> (memory,
> >> clustring, etc.)
> >>> 2. Not all pages extending the first page may
> need to
> >> access this component, which make it seem
> unnecessary for
> >> such pages.
> >>>
> >>> Is there any more elegant way?
> >>>
> >>> I just started Wicket programming for a
> personal
> >> project. Thanks for any input!
> >>>
> >>> Regards, David
> >>>
> >>>
> >>>
> >>>
> >>>
> >>
> ---------------------------------------------------------------------
> >>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> >>> For additional commands, e-mail: users-help@wicket.apache.org
> >>>
> >>>
> >>
> >>
> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> >> For additional commands, e-mail: users-help@wicket.apache.org
> >>
> >>
> > 
> > 
> >       
> > 
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> > For additional commands, e-mail: users-help@wicket.apache.org
> > 
> > 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
> 
> 


      

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


Re: Better way to find a parent compoent in page hiearchy?

Posted by Major Péter <ma...@sch.bme.hu>.
Maybe, this will be good for you:
http://wicketstuff.org/wicket13doc/org/apache/wicket/MarkupContainer.html#get(java.lang.String)

Regards,
Peter

2010-02-28 22:12 keltezéssel, David Chang írta:
> igor, thanks for prompt help! 
> 
> I can use Component#findParent(SomeClass.class) to find the first page. How can I further find the component by this Wicket ID? I need to overwrite its display value.
> 
> Thanks again.
> 
> --- On Sun, 2/28/10, Igor Vaynberg <ig...@gmail.com> wrote:
> 
>> From: Igor Vaynberg <ig...@gmail.com>
>> Subject: Re: Better way to find a parent compoent in page hiearchy?
>> To: users@wicket.apache.org
>> Date: Sunday, February 28, 2010, 4:04 PM
>> Component#findParent(SomeClass.class)
>> may be useful
>>
>> -igor
>>
>> On Sun, Feb 28, 2010 at 1:00 PM, David Chang <da...@yahoo.com>
>> wrote:
>>> I have two pages. The first page is extended by the
>> second page. On the second page, I want to access a
>> component on the first page. One way to do this is to make
>> the component a member variable of the first page. I feel
>> this way may have two drawbacks:
>>>
>>> 1. A member variable uses more resources (memory,
>> clustring, etc.)
>>> 2. Not all pages extending the first page may need to
>> access this component, which make it seem unnecessary for
>> such pages.
>>>
>>> Is there any more elegant way?
>>>
>>> I just started Wicket programming for a personal
>> project. Thanks for any input!
>>>
>>> Regards, David
>>>
>>>
>>>
>>>
>>>
>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
> 
> 
>       
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
> 
> 

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


Re: Better way to find a parent compoent in page hiearchy?

Posted by David Chang <da...@yahoo.com>.
igor, thanks for prompt help! 

I can use Component#findParent(SomeClass.class) to find the first page. How can I further find the component by this Wicket ID? I need to overwrite its display value.

Thanks again.

--- On Sun, 2/28/10, Igor Vaynberg <ig...@gmail.com> wrote:

> From: Igor Vaynberg <ig...@gmail.com>
> Subject: Re: Better way to find a parent compoent in page hiearchy?
> To: users@wicket.apache.org
> Date: Sunday, February 28, 2010, 4:04 PM
> Component#findParent(SomeClass.class)
> may be useful
> 
> -igor
> 
> On Sun, Feb 28, 2010 at 1:00 PM, David Chang <da...@yahoo.com>
> wrote:
> > I have two pages. The first page is extended by the
> second page. On the second page, I want to access a
> component on the first page. One way to do this is to make
> the component a member variable of the first page. I feel
> this way may have two drawbacks:
> >
> > 1. A member variable uses more resources (memory,
> clustring, etc.)
> > 2. Not all pages extending the first page may need to
> access this component, which make it seem unnecessary for
> such pages.
> >
> > Is there any more elegant way?
> >
> > I just started Wicket programming for a personal
> project. Thanks for any input!
> >
> > Regards, David
> >
> >
> >
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> > For additional commands, e-mail: users-help@wicket.apache.org
> >
> >
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
> 
> 


      

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


Re: Better way to find a parent compoent in page hiearchy?

Posted by Igor Vaynberg <ig...@gmail.com>.
Component#findParent(SomeClass.class) may be useful

-igor

On Sun, Feb 28, 2010 at 1:00 PM, David Chang <da...@yahoo.com> wrote:
> I have two pages. The first page is extended by the second page. On the second page, I want to access a component on the first page. One way to do this is to make the component a member variable of the first page. I feel this way may have two drawbacks:
>
> 1. A member variable uses more resources (memory, clustring, etc.)
> 2. Not all pages extending the first page may need to access this component, which make it seem unnecessary for such pages.
>
> Is there any more elegant way?
>
> I just started Wicket programming for a personal project. Thanks for any input!
>
> Regards, David
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

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


Better way to find a parent compoent in page hiearchy?

Posted by David Chang <da...@yahoo.com>.
I have two pages. The first page is extended by the second page. On the second page, I want to access a component on the first page. One way to do this is to make the component a member variable of the first page. I feel this way may have two drawbacks:

1. A member variable uses more resources (memory, clustring, etc.)
2. Not all pages extending the first page may need to access this component, which make it seem unnecessary for such pages.

Is there any more elegant way?

I just started Wicket programming for a personal project. Thanks for any input!

Regards, David


      

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


Re: Print friendly panel (pdf)

Posted by Martin Makundi <ma...@koodaripalvelut.com>.
Hi!

Ok.

Here is some bits and parts, hopefully useful:

	/**
	 * Convert HTML to PDF
	 * @param in HTML
	 * @param out PDF
	 */
	public static void html2pdf(InputStream in, OutputStream out) {
	  try {
	    StringWriter sw = new StringWriter();
	    Tidy tidier = new Tidy();
	    {
	      tidier.setInputEncoding(ENCODING);
	      tidier.setQuiet(true);
        tidier.setXHTML(true);
        tidier.setTidyMark(false);
	      tidier.parse(in, sw);
	    }
	    {
	      ITextRenderer renderer = new ITextRenderer();
//	      String s = sw.getBuffer().toString();
//	      System.out.println(s);
	      renderer.setDocumentFromString(sw.getBuffer().toString());
	      renderer.layout();
	      renderer.createPDF(out);
	    }
	  } catch (Exception e) {
	    throw new RuntimeException(e);
	  }
	}


/**
   * Renders given page
   * @param pageClass to render
   * @param pageParameters to render with
   * @param clean
   * @return String of HTML produced
   */
  public static String renderPageToString(
      final Class<? extends Page> pageClass,
      final PageParameters pageParameters, boolean clean) {
    String webPageAsString;
    {
      WebApplication webApplication = WebApplication.get();
      ServletContext servletContext = webApplication.getServletContext();
      MockHttpSession servletSession = new MockHttpSession(servletContext);
      servletSession.setTemporary(true);

      MockHttpServletRequest servletRequest = new MockHttpServletRequest(
          webApplication, servletSession, servletContext);
      MockHttpServletResponse servletResponse = new MockHttpServletResponse(
          servletRequest);
      servletRequest.initialize();
      servletResponse.initialize();

      WebRequest webRequest = new ServletWebRequest(servletRequest);

      BufferedWebResponse webResponse = new
BufferedWebResponse(servletResponse);
      webResponse.setAjax(true);

      WebRequestCycle htmlRequestCycle =
        new WebRequestCycle(webApplication, webRequest, webResponse);

      BookmarkablePageRequestTarget htmlTarget =
        new BookmarkablePageRequestTarget(pageClass, pageParameters);

      htmlRequestCycle.setRequestTarget(htmlTarget);

      try {
        htmlRequestCycle.getProcessor().respond(htmlRequestCycle);

        if (htmlRequestCycle.wasHandled() == false) {
          htmlRequestCycle.setRequestTarget(new WebErrorCodeResponseTarget(
              HttpServletResponse.SC_NOT_FOUND));
        }
        htmlRequestCycle.detach();
      } finally {
        htmlRequestCycle.getResponse().close();
      }

      webPageAsString = webResponse.toString();
    }

    webPageAsString = Utils.replaceAll(webPageAsString,
WebPageConstants.SRC_URL_PATTERN, "file:///" +
WebApplication.get().getServletContext().getRealPath("/") + "/");

    if (clean) {
      return escapeHighEnd(webPageAsString.replaceAll("<wicket.*?>", "")
          .replaceAll("</wicket.*?>", "").replaceAll("\\swicketpath=\".*?\"",
              ""));
    }

    return escapeHighEnd(webPageAsString);
  }

**
Martin

2010/2/28 Alex Rass <ar...@itbsllc.com>:
> That's what google is doing to print (through a conversion on the back end).
> So if you contribute it, I am sure SOMEONE would want it :)
>
> - Alex
>
>
> -----Original Message-----
> From: Martin Makundi [mailto:martin.makundi@koodaripalvelut.com]
> Sent: Sunday, February 28, 2010 12:22 PM
> To: users@wicket.apache.org
> Subject: Re: Print friendly panel
>
> Hi!
>
> Anybody interested in pdf print script via wicket?
>
> **
> Martin
>
> 2010/2/28 nino martinez wael <ni...@gmail.com>:
>> Yeah I agree this is the way it should be done. Works like a charm! And
> then
>> just have a simple js like this:
>>
>> <script language="Javascript1.2">
>>  <!--
>>  function printpage() {
>>  window.print();
>>  }
>>  //-->
>> </script>
>>
>> on or link button or whatever..
>>
>>
>>
>> 2010/2/28 Riyad Kalla <rk...@gmail.com>
>>
>>> This is what I've done in the past as well, allows your user to just
>>> "print"
>>> the page they are staring at and have the browser do the right thing in
>>> using an alternative style sheet for rendering the page -- this includes
>>> using a lot of display:none to trim down the parts of the page that you
>>> don't want printing. This way all you need on your page is a "Print" link
>>> that invokes the Print dialog, no other popups ontop of popups.
>>>
>>> Some info:
>>>
> http://www.scottklarr.com/topic/15/css-create-a-style-sheet-for-print-only/
>>>
>>> <
>>>
> http://www.scottklarr.com/topic/15/css-create-a-style-sheet-for-print-only/
>>> >
>>> http://webdesign.about.com/cs/css/a/aa042103a.htm
>>>
>>> On Sat, Feb 27, 2010 at 4:54 PM, Alex Rass <ar...@itbsllc.com> wrote:
>>>
>>> > Josh,
>>> >
>>> > This doesn't answer your question directly (about a popup).
>>> > But a MUCH simpler way is to make your page printer friendly by
> supplying
>>> > an
>>> > alternative CSS for printing format (google on that). Makes life much
>>> > easier.
>>> >
>>> > When you tell your page which css to use, you can say "use this CSS for
>>> > printing only". All transparent to the user.
>>> >
>>> > - Alex
>>> >
>>> >
>>> > -----Original Message-----
>>> > From: Josh Chappelle [mailto:jchappelle@4redi.com]
>>> > Sent: Friday, February 26, 2010 4:09 PM
>>> > To: users@wicket.apache.org
>>> > Subject: Print friendly panel
>>> >
>>> > Hi,
>>> >
>>> >
>>> >
>>> > Does anyone know of a suggested method to render a printer friendly
> panel
>>> > to
>>> > a separate browser window so that user's can print? The only thing I
> have
>>> > found is the following article and it looks a little clunky.
>>> >
>>> >
>>> >
>>> > http://cwiki.apache.org/WICKET/rendering-panel-to-a-string.html
>>> >
>>> >
>>> >
>>> > Basically I just need to be able to place a link that when clicked will
>>> pop
>>> > up a new browser window with only the contents to the target panel.
> That
>>> > way
>>> > users can print that panel from there.
>>> >
>>> >
>>> >
>>> > Thanks,
>>> >
>>> >
>>> >
>>> > Josh
>>> >
>>> >
>>> >
>>> >
>>> >
>>> >
>>> >
>>> > ---------------------------------------------------------------------
>>> > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>> > For additional commands, e-mail: users-help@wicket.apache.org
>>> >
>>> >
>>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

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


RE: Print friendly panel (pdf)

Posted by Alex Rass <ar...@itbsllc.com>.
That's what google is doing to print (through a conversion on the back end).
So if you contribute it, I am sure SOMEONE would want it :)

- Alex


-----Original Message-----
From: Martin Makundi [mailto:martin.makundi@koodaripalvelut.com] 
Sent: Sunday, February 28, 2010 12:22 PM
To: users@wicket.apache.org
Subject: Re: Print friendly panel

Hi!

Anybody interested in pdf print script via wicket?

**
Martin

2010/2/28 nino martinez wael <ni...@gmail.com>:
> Yeah I agree this is the way it should be done. Works like a charm! And
then
> just have a simple js like this:
>
> <script language="Javascript1.2">
>  <!--
>  function printpage() {
>  window.print();
>  }
>  //-->
> </script>
>
> on or link button or whatever..
>
>
>
> 2010/2/28 Riyad Kalla <rk...@gmail.com>
>
>> This is what I've done in the past as well, allows your user to just
>> "print"
>> the page they are staring at and have the browser do the right thing in
>> using an alternative style sheet for rendering the page -- this includes
>> using a lot of display:none to trim down the parts of the page that you
>> don't want printing. This way all you need on your page is a "Print" link
>> that invokes the Print dialog, no other popups ontop of popups.
>>
>> Some info:
>>
http://www.scottklarr.com/topic/15/css-create-a-style-sheet-for-print-only/
>>
>> <
>>
http://www.scottklarr.com/topic/15/css-create-a-style-sheet-for-print-only/
>> >
>> http://webdesign.about.com/cs/css/a/aa042103a.htm
>>
>> On Sat, Feb 27, 2010 at 4:54 PM, Alex Rass <ar...@itbsllc.com> wrote:
>>
>> > Josh,
>> >
>> > This doesn't answer your question directly (about a popup).
>> > But a MUCH simpler way is to make your page printer friendly by
supplying
>> > an
>> > alternative CSS for printing format (google on that). Makes life much
>> > easier.
>> >
>> > When you tell your page which css to use, you can say "use this CSS for
>> > printing only". All transparent to the user.
>> >
>> > - Alex
>> >
>> >
>> > -----Original Message-----
>> > From: Josh Chappelle [mailto:jchappelle@4redi.com]
>> > Sent: Friday, February 26, 2010 4:09 PM
>> > To: users@wicket.apache.org
>> > Subject: Print friendly panel
>> >
>> > Hi,
>> >
>> >
>> >
>> > Does anyone know of a suggested method to render a printer friendly
panel
>> > to
>> > a separate browser window so that user's can print? The only thing I
have
>> > found is the following article and it looks a little clunky.
>> >
>> >
>> >
>> > http://cwiki.apache.org/WICKET/rendering-panel-to-a-string.html
>> >
>> >
>> >
>> > Basically I just need to be able to place a link that when clicked will
>> pop
>> > up a new browser window with only the contents to the target panel.
That
>> > way
>> > users can print that panel from there.
>> >
>> >
>> >
>> > Thanks,
>> >
>> >
>> >
>> > Josh
>> >
>> >
>> >
>> >
>> >
>> >
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> > For additional commands, e-mail: users-help@wicket.apache.org
>> >
>> >
>>
>

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



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


Re: Print friendly panel

Posted by Martin Makundi <ma...@koodaripalvelut.com>.
Hi!

Anybody interested in pdf print script via wicket?

**
Martin

2010/2/28 nino martinez wael <ni...@gmail.com>:
> Yeah I agree this is the way it should be done. Works like a charm! And then
> just have a simple js like this:
>
> <script language="Javascript1.2">
>  <!--
>  function printpage() {
>  window.print();
>  }
>  //-->
> </script>
>
> on or link button or whatever..
>
>
>
> 2010/2/28 Riyad Kalla <rk...@gmail.com>
>
>> This is what I've done in the past as well, allows your user to just
>> "print"
>> the page they are staring at and have the browser do the right thing in
>> using an alternative style sheet for rendering the page -- this includes
>> using a lot of display:none to trim down the parts of the page that you
>> don't want printing. This way all you need on your page is a "Print" link
>> that invokes the Print dialog, no other popups ontop of popups.
>>
>> Some info:
>> http://www.scottklarr.com/topic/15/css-create-a-style-sheet-for-print-only/
>>
>> <
>> http://www.scottklarr.com/topic/15/css-create-a-style-sheet-for-print-only/
>> >
>> http://webdesign.about.com/cs/css/a/aa042103a.htm
>>
>> On Sat, Feb 27, 2010 at 4:54 PM, Alex Rass <ar...@itbsllc.com> wrote:
>>
>> > Josh,
>> >
>> > This doesn't answer your question directly (about a popup).
>> > But a MUCH simpler way is to make your page printer friendly by supplying
>> > an
>> > alternative CSS for printing format (google on that). Makes life much
>> > easier.
>> >
>> > When you tell your page which css to use, you can say "use this CSS for
>> > printing only". All transparent to the user.
>> >
>> > - Alex
>> >
>> >
>> > -----Original Message-----
>> > From: Josh Chappelle [mailto:jchappelle@4redi.com]
>> > Sent: Friday, February 26, 2010 4:09 PM
>> > To: users@wicket.apache.org
>> > Subject: Print friendly panel
>> >
>> > Hi,
>> >
>> >
>> >
>> > Does anyone know of a suggested method to render a printer friendly panel
>> > to
>> > a separate browser window so that user's can print? The only thing I have
>> > found is the following article and it looks a little clunky.
>> >
>> >
>> >
>> > http://cwiki.apache.org/WICKET/rendering-panel-to-a-string.html
>> >
>> >
>> >
>> > Basically I just need to be able to place a link that when clicked will
>> pop
>> > up a new browser window with only the contents to the target panel. That
>> > way
>> > users can print that panel from there.
>> >
>> >
>> >
>> > Thanks,
>> >
>> >
>> >
>> > Josh
>> >
>> >
>> >
>> >
>> >
>> >
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> > For additional commands, e-mail: users-help@wicket.apache.org
>> >
>> >
>>
>

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


Re: Print friendly panel

Posted by nino martinez wael <ni...@gmail.com>.
Yeah I agree this is the way it should be done. Works like a charm! And then
just have a simple js like this:

<script language="Javascript1.2">
  <!--
  function printpage() {
  window.print();
  }
  //-->
</script>

on or link button or whatever..



2010/2/28 Riyad Kalla <rk...@gmail.com>

> This is what I've done in the past as well, allows your user to just
> "print"
> the page they are staring at and have the browser do the right thing in
> using an alternative style sheet for rendering the page -- this includes
> using a lot of display:none to trim down the parts of the page that you
> don't want printing. This way all you need on your page is a "Print" link
> that invokes the Print dialog, no other popups ontop of popups.
>
> Some info:
> http://www.scottklarr.com/topic/15/css-create-a-style-sheet-for-print-only/
>
> <
> http://www.scottklarr.com/topic/15/css-create-a-style-sheet-for-print-only/
> >
> http://webdesign.about.com/cs/css/a/aa042103a.htm
>
> On Sat, Feb 27, 2010 at 4:54 PM, Alex Rass <ar...@itbsllc.com> wrote:
>
> > Josh,
> >
> > This doesn't answer your question directly (about a popup).
> > But a MUCH simpler way is to make your page printer friendly by supplying
> > an
> > alternative CSS for printing format (google on that). Makes life much
> > easier.
> >
> > When you tell your page which css to use, you can say "use this CSS for
> > printing only". All transparent to the user.
> >
> > - Alex
> >
> >
> > -----Original Message-----
> > From: Josh Chappelle [mailto:jchappelle@4redi.com]
> > Sent: Friday, February 26, 2010 4:09 PM
> > To: users@wicket.apache.org
> > Subject: Print friendly panel
> >
> > Hi,
> >
> >
> >
> > Does anyone know of a suggested method to render a printer friendly panel
> > to
> > a separate browser window so that user's can print? The only thing I have
> > found is the following article and it looks a little clunky.
> >
> >
> >
> > http://cwiki.apache.org/WICKET/rendering-panel-to-a-string.html
> >
> >
> >
> > Basically I just need to be able to place a link that when clicked will
> pop
> > up a new browser window with only the contents to the target panel. That
> > way
> > users can print that panel from there.
> >
> >
> >
> > Thanks,
> >
> >
> >
> > Josh
> >
> >
> >
> >
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> > For additional commands, e-mail: users-help@wicket.apache.org
> >
> >
>

RE: Print friendly panel

Posted by Josh Chappelle <jc...@4redi.com>.
Awesome! Thanks a lot guys. That will be easy to do.

Josh 

-----Original Message-----
From: Riyad Kalla [mailto:rkalla@gmail.com] 
Sent: Saturday, February 27, 2010 6:06 PM
To: users@wicket.apache.org
Subject: Re: Print friendly panel

This is what I've done in the past as well, allows your user to just "print"
the page they are staring at and have the browser do the right thing in
using an alternative style sheet for rendering the page -- this includes
using a lot of display:none to trim down the parts of the page that you
don't want printing. This way all you need on your page is a "Print" link
that invokes the Print dialog, no other popups ontop of popups.

Some info:
http://www.scottklarr.com/topic/15/css-create-a-style-sheet-for-print-only/

<http://www.scottklarr.com/topic/15/css-create-a-style-sheet-for-print-only/
>
http://webdesign.about.com/cs/css/a/aa042103a.htm

On Sat, Feb 27, 2010 at 4:54 PM, Alex Rass <ar...@itbsllc.com> wrote:

> Josh,
>
> This doesn't answer your question directly (about a popup).
> But a MUCH simpler way is to make your page printer friendly by supplying
> an
> alternative CSS for printing format (google on that). Makes life much
> easier.
>
> When you tell your page which css to use, you can say "use this CSS for
> printing only". All transparent to the user.
>
> - Alex
>
>
> -----Original Message-----
> From: Josh Chappelle [mailto:jchappelle@4redi.com]
> Sent: Friday, February 26, 2010 4:09 PM
> To: users@wicket.apache.org
> Subject: Print friendly panel
>
> Hi,
>
>
>
> Does anyone know of a suggested method to render a printer friendly panel
> to
> a separate browser window so that user's can print? The only thing I have
> found is the following article and it looks a little clunky.
>
>
>
> http://cwiki.apache.org/WICKET/rendering-panel-to-a-string.html
>
>
>
> Basically I just need to be able to place a link that when clicked will
pop
> up a new browser window with only the contents to the target panel. That
> way
> users can print that panel from there.
>
>
>
> Thanks,
>
>
>
> Josh
>
>
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>


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


Re: Print friendly panel

Posted by Riyad Kalla <rk...@gmail.com>.
This is what I've done in the past as well, allows your user to just "print"
the page they are staring at and have the browser do the right thing in
using an alternative style sheet for rendering the page -- this includes
using a lot of display:none to trim down the parts of the page that you
don't want printing. This way all you need on your page is a "Print" link
that invokes the Print dialog, no other popups ontop of popups.

Some info:
http://www.scottklarr.com/topic/15/css-create-a-style-sheet-for-print-only/

<http://www.scottklarr.com/topic/15/css-create-a-style-sheet-for-print-only/>
http://webdesign.about.com/cs/css/a/aa042103a.htm

On Sat, Feb 27, 2010 at 4:54 PM, Alex Rass <ar...@itbsllc.com> wrote:

> Josh,
>
> This doesn't answer your question directly (about a popup).
> But a MUCH simpler way is to make your page printer friendly by supplying
> an
> alternative CSS for printing format (google on that). Makes life much
> easier.
>
> When you tell your page which css to use, you can say "use this CSS for
> printing only". All transparent to the user.
>
> - Alex
>
>
> -----Original Message-----
> From: Josh Chappelle [mailto:jchappelle@4redi.com]
> Sent: Friday, February 26, 2010 4:09 PM
> To: users@wicket.apache.org
> Subject: Print friendly panel
>
> Hi,
>
>
>
> Does anyone know of a suggested method to render a printer friendly panel
> to
> a separate browser window so that user's can print? The only thing I have
> found is the following article and it looks a little clunky.
>
>
>
> http://cwiki.apache.org/WICKET/rendering-panel-to-a-string.html
>
>
>
> Basically I just need to be able to place a link that when clicked will pop
> up a new browser window with only the contents to the target panel. That
> way
> users can print that panel from there.
>
>
>
> Thanks,
>
>
>
> Josh
>
>
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

RE: Print friendly panel

Posted by Alex Rass <ar...@itbsllc.com>.
Josh, 

This doesn't answer your question directly (about a popup).
But a MUCH simpler way is to make your page printer friendly by supplying an
alternative CSS for printing format (google on that). Makes life much
easier.

When you tell your page which css to use, you can say "use this CSS for
printing only". All transparent to the user.

- Alex


-----Original Message-----
From: Josh Chappelle [mailto:jchappelle@4redi.com] 
Sent: Friday, February 26, 2010 4:09 PM
To: users@wicket.apache.org
Subject: Print friendly panel

Hi,

 

Does anyone know of a suggested method to render a printer friendly panel to
a separate browser window so that user's can print? The only thing I have
found is the following article and it looks a little clunky.

 

http://cwiki.apache.org/WICKET/rendering-panel-to-a-string.html

 

Basically I just need to be able to place a link that when clicked will pop
up a new browser window with only the contents to the target panel. That way
users can print that panel from there.

 

Thanks,

 

Josh

 

 



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