Re: E-commerce site built on Wicket

2011-07-20 Thread Arjun Dhar
Looks pretty nice. 

Did you guys use any CMS (say wicket based like BRIX) .. or simply coded it
straight up?

-
Software documentation is like sex: when it is good, it is very, very good; and 
when it is bad, it is still better than nothing!
--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/E-commerce-site-built-on-Wicket-tp3682832p3682897.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



E-commerce site built on Wicket

2011-07-20 Thread Jeffrey Schneller
Wanted to let the user-group know about another successful site built
with Wicket which was launched about 1.5 years ago. I am just getting
around to letting the usergroup know about it, sorry for the delay.  The
url for the site is: http://www.stoneside.com.  

 

The site is a consumer e-commerce site.  We have utilized JQuery to help
with the UI functionality.  We use straight JQuery and do not wrap it
with wiQuery.  The site does utilize a few other open source projects
such as:

Hibernate

Drools [rules engine for performing all pricing and configuration rules]

Spring

Daisy [CMS repository]

 

The site is currently under a redesign and A/B testing so you may see
one of two versions of the site.  I am unable to provide traffic numbers
at this time.

 

Thanks to everyone on the user-group for their answers to questions over
the past few years.  In particular and in no order: Igor, Jeremy, and
Martin.

 

Let me know what you think and if you have questions.

 

 

 

 

 

 

 



Re: Styling form components onError

2011-07-20 Thread Igor Vaynberg
On Wed, Jul 20, 2011 at 9:11 PM, Dan Retzlaff  wrote:
> Hey it's the man himself. :)
>
> We already use the automatic AJAX feedback recipe (thanks for that), but I'm
> not sure how that solves the problem at hand. I only add the temporary
> behaviors in myIComponentOnBeforeRenderListener, and that only gets called
> if the component's *already* been added to the ART. If the behavior weren't
> temporary then your suggestion makes sense, assuming we're okay with
> visiting the entire page for every AJAX request. But once we've paid that
> cost, why not just add the temporary behavior during visitation?
>
> I suppose I don't mind scouring the component graph for invalid
> FormComponents if and only if !Session.getFeedbackMessages().isEmpty(). Do
> you agree with this approach, or am I missing your point?

scouring the component graph is cheap. look for all
formcomponentlabels and update them. you have to do this even if there
are no errors because the formcomponent might have been invalid in the
previous submit and now is valid.

-igor

>
> Regards,
> Dan
>
> On Wed, Jul 20, 2011 at 8:15 PM, Igor Vaynberg wrote:
>
>> no worries, the cookbook has your back!
>>
>> look in this recipe: Providing Ajax feedback automatically
>>
>> have your temporary behavior implement a tagging interface. then in
>> the ajax request target listener look for all components that have a
>> behavior with this tagging interface, and if they do add it to the
>> target.
>>
>> -igor
>>
>>
>> On Wed, Jul 20, 2011 at 8:01 PM, Dan Retzlaff  wrote:
>> > Hey all,
>> >
>> > I want a low-interference approach to adding CSS class attributes to form
>> > components and their labels when they have associated errors. Igor's *
>> > Cookbook* suggests a behavior, but leaves the automation as something
>> done
>> > during page construction. We have too many AJAX modals and panel updates
>> for
>> > this to cover everything. Therefore I wrote
>> > an IComponentOnBeforeRenderListener that adds temporary behaviors to
>> > FormComponents and FormComponentLabels which has me pretty close to
>> nirvana.
>> > However, the problem remains of getting the form components (or at least
>> the
>> > form) added to AjaxRequestTargets. It seems like I want an
>> application-level
>> > form submit listener, but I'm not sure how to approach that.
>> >
>> > Any suggestions or criticisms? This would be awesome for us to get
>> working.
>> >
>> > Dan
>> >
>>
>> -
>> 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



Re: Pre Publish Wicket Pages

2011-07-20 Thread Igor Vaynberg
this is what most of our unit tests do, so look there. they render a
page and compare the output against a template. what you want to do is
store the output.

-igor


On Wed, Jul 20, 2011 at 8:31 PM, Arjun Dhar  wrote:
> Hi,
>
> Is there some way for me to Hack the Wicket parser to pre-publish Wicket
> based pages before they are even rendered?
>
> Context:
> ==
>  I have a system where I'm using velocity to generate pages that do not
> change over a period of time. Futhermore their content can be cached using
> EhCache (More interesting as based on events one may update thee cache also,
> so for semi dynamic content also its great). This is really performant and
> great for other reasons.
>
> ..However since i love wicket and templating using inheritance in Wicket
> etc., I want to pre-publish my core wicket pages also (which render
> dynamically on screen on request).
>
> I'm perhaps confusing/mixing the purpose of a Templating engine with Wicket.
> But who cares :) , ... I think it would be cool to pre-publish certain
> Wicket pages also.
>
> How would that be possible?
> There would be no Request, no Session. So some hacking of the parser would
> be required.
>
>
> -
> Software documentation is like sex: when it is good, it is very, very good; 
> and when it is bad, it is still better than nothing!
> --
> View this message in context: 
> http://apache-wicket.1842946.n4.nabble.com/Pre-Publish-Wicket-Pages-tp3682723p3682723.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



Re: Styling form components onError

2011-07-20 Thread Dan Retzlaff
Hey it's the man himself. :)

We already use the automatic AJAX feedback recipe (thanks for that), but I'm
not sure how that solves the problem at hand. I only add the temporary
behaviors in myIComponentOnBeforeRenderListener, and that only gets called
if the component's *already* been added to the ART. If the behavior weren't
temporary then your suggestion makes sense, assuming we're okay with
visiting the entire page for every AJAX request. But once we've paid that
cost, why not just add the temporary behavior during visitation?

I suppose I don't mind scouring the component graph for invalid
FormComponents if and only if !Session.getFeedbackMessages().isEmpty(). Do
you agree with this approach, or am I missing your point?

Regards,
Dan

On Wed, Jul 20, 2011 at 8:15 PM, Igor Vaynberg wrote:

> no worries, the cookbook has your back!
>
> look in this recipe: Providing Ajax feedback automatically
>
> have your temporary behavior implement a tagging interface. then in
> the ajax request target listener look for all components that have a
> behavior with this tagging interface, and if they do add it to the
> target.
>
> -igor
>
>
> On Wed, Jul 20, 2011 at 8:01 PM, Dan Retzlaff  wrote:
> > Hey all,
> >
> > I want a low-interference approach to adding CSS class attributes to form
> > components and their labels when they have associated errors. Igor's *
> > Cookbook* suggests a behavior, but leaves the automation as something
> done
> > during page construction. We have too many AJAX modals and panel updates
> for
> > this to cover everything. Therefore I wrote
> > an IComponentOnBeforeRenderListener that adds temporary behaviors to
> > FormComponents and FormComponentLabels which has me pretty close to
> nirvana.
> > However, the problem remains of getting the form components (or at least
> the
> > form) added to AjaxRequestTargets. It seems like I want an
> application-level
> > form submit listener, but I'm not sure how to approach that.
> >
> > Any suggestions or criticisms? This would be awesome for us to get
> working.
> >
> > Dan
> >
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Pre Publish Wicket Pages

2011-07-20 Thread Arjun Dhar
Hi,

Is there some way for me to Hack the Wicket parser to pre-publish Wicket
based pages before they are even rendered?

Context:
==
 I have a system where I'm using velocity to generate pages that do not
change over a period of time. Futhermore their content can be cached using
EhCache (More interesting as based on events one may update thee cache also,
so for semi dynamic content also its great). This is really performant and
great for other reasons.

..However since i love wicket and templating using inheritance in Wicket
etc., I want to pre-publish my core wicket pages also (which render
dynamically on screen on request). 

I'm perhaps confusing/mixing the purpose of a Templating engine with Wicket.
But who cares :) , ... I think it would be cool to pre-publish certain
Wicket pages also.

How would that be possible? 
There would be no Request, no Session. So some hacking of the parser would
be required. 


-
Software documentation is like sex: when it is good, it is very, very good; and 
when it is bad, it is still better than nothing!
--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Pre-Publish-Wicket-Pages-tp3682723p3682723.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: Styling form components onError

2011-07-20 Thread Igor Vaynberg
no worries, the cookbook has your back!

look in this recipe: Providing Ajax feedback automatically

have your temporary behavior implement a tagging interface. then in
the ajax request target listener look for all components that have a
behavior with this tagging interface, and if they do add it to the
target.

-igor


On Wed, Jul 20, 2011 at 8:01 PM, Dan Retzlaff  wrote:
> Hey all,
>
> I want a low-interference approach to adding CSS class attributes to form
> components and their labels when they have associated errors. Igor's *
> Cookbook* suggests a behavior, but leaves the automation as something done
> during page construction. We have too many AJAX modals and panel updates for
> this to cover everything. Therefore I wrote
> an IComponentOnBeforeRenderListener that adds temporary behaviors to
> FormComponents and FormComponentLabels which has me pretty close to nirvana.
> However, the problem remains of getting the form components (or at least the
> form) added to AjaxRequestTargets. It seems like I want an application-level
> form submit listener, but I'm not sure how to approach that.
>
> Any suggestions or criticisms? This would be awesome for us to get working.
>
> Dan
>

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



Styling form components onError

2011-07-20 Thread Dan Retzlaff
Hey all,

I want a low-interference approach to adding CSS class attributes to form
components and their labels when they have associated errors. Igor's *
Cookbook* suggests a behavior, but leaves the automation as something done
during page construction. We have too many AJAX modals and panel updates for
this to cover everything. Therefore I wrote
an IComponentOnBeforeRenderListener that adds temporary behaviors to
FormComponents and FormComponentLabels which has me pretty close to nirvana.
However, the problem remains of getting the form components (or at least the
form) added to AjaxRequestTargets. It seems like I want an application-level
form submit listener, but I'm not sure how to approach that.

Any suggestions or criticisms? This would be awesome for us to get working.

Dan


Re: hibernate and jasper reports

2011-07-20 Thread hariharansrc
Is it possible or not that only i am asking because both will be processed
independently

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/hibernate-and-jasper-reports-tp3680767p3682655.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: Bigger sites running on wicket?

2011-07-20 Thread Eugene Dina
The only parts of our live site that are running wicket are some of the blog
pages at http://blog.bodybuilding.com.  Most everything else is still a WIP
and not yet ready for public consumption.  Also, you probably won't find any
references to wicket resources in the code since we use a CDN for all static
assets.  If people are interested we can provide more details on the size
and scope of some of our wicket projects.

Regards,
Eugene


On Wed, Jul 20, 2011 at 3:24 PM, jcgarciam  wrote:

> The only trace that i think could be easily spot (once DEPLOYMENT mode is
> on)  are the inclusion of resources such as css/javascript
>
> On Wed, Jul 20, 2011 at 6:08 PM, richard emberson [via Apache Wicket] <
> ml-node+3682047-48131163-65...@n4.nabble.com> wrote:
>
> > I looked at the Page source for about 10 pages and could not
> > tell that they were generated using Wicket.
> > Are there some telltale indicators that might indicate
> > Wicket usage?
> > Yea, inside knowledge is one indicator, but I mean some
> > other indicator. Something about the HTML or such?
> >
> > Thanks
> >
> > Richard
> >
> > On 07/20/2011 12:57 PM, dryajov wrote:
> >
> > > Well, bodybuilding.com is beginning to use wicket extensively, there
> are
> >
> > > several parts of the website ported to wicket (store excluded) already
> > and a
> > > major revamp is being worked on as we speak - all in wicket. That is by
> > far
> > > the biggest site that uses wicket AFAIK.
> > >
> > > --
> > > View this message in context:
> >
> http://apache-wicket.1842946.n4.nabble.com/Bigger-sites-running-on-wicket-tp2197500p3681916.html
> > > Sent from the Users forum mailing list archive at Nabble.com.
> > >
> > > -
> > > To unsubscribe, e-mail: [hidden email]<
> http://user/SendEmail.jtp?type=node&node=3682047&i=0>
> > > For additional commands, e-mail: [hidden email]<
> http://user/SendEmail.jtp?type=node&node=3682047&i=1>
> > >
> > >
> >
> > --
> > Quis custodiet ipsos custodes
> >
> > -
> > To unsubscribe, e-mail: [hidden email]<
> http://user/SendEmail.jtp?type=node&node=3682047&i=2>
> > For additional commands, e-mail: [hidden email]<
> http://user/SendEmail.jtp?type=node&node=3682047&i=3>
> >
> >
> >
> > --
> >  If you reply to this email, your message will be added to the discussion
> > below:
> >
> >
> http://apache-wicket.1842946.n4.nabble.com/Bigger-sites-running-on-wicket-tp2197500p3682047.html
> >  To start a new topic under Apache Wicket, email
> > ml-node+1842946-398011874-65...@n4.nabble.com
> > To unsubscribe from Apache Wicket, click here<
> http://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=1842946&code=amNnYXJjaWFtQGdtYWlsLmNvbXwxODQyOTQ2fDEyNTYxMzc3ODY=
> >.
> >
> >
>
>
>
> --
>
> JC
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Bigger-sites-running-on-wicket-tp2197500p3682086.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: Bigger sites running on wicket?

2011-07-20 Thread jcgarciam
The only trace that i think could be easily spot (once DEPLOYMENT mode is
on)  are the inclusion of resources such as css/javascript

On Wed, Jul 20, 2011 at 6:08 PM, richard emberson [via Apache Wicket] <
ml-node+3682047-48131163-65...@n4.nabble.com> wrote:

> I looked at the Page source for about 10 pages and could not
> tell that they were generated using Wicket.
> Are there some telltale indicators that might indicate
> Wicket usage?
> Yea, inside knowledge is one indicator, but I mean some
> other indicator. Something about the HTML or such?
>
> Thanks
>
> Richard
>
> On 07/20/2011 12:57 PM, dryajov wrote:
>
> > Well, bodybuilding.com is beginning to use wicket extensively, there are
>
> > several parts of the website ported to wicket (store excluded) already
> and a
> > major revamp is being worked on as we speak - all in wicket. That is by
> far
> > the biggest site that uses wicket AFAIK.
> >
> > --
> > View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Bigger-sites-running-on-wicket-tp2197500p3681916.html
> > Sent from the Users forum mailing list archive at Nabble.com.
> >
> > -
> > To unsubscribe, e-mail: [hidden 
> > email]
> > For additional commands, e-mail: [hidden 
> > email]
> >
> >
>
> --
> Quis custodiet ipsos custodes
>
> -
> To unsubscribe, e-mail: [hidden 
> email]
> For additional commands, e-mail: [hidden 
> email]
>
>
>
> --
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://apache-wicket.1842946.n4.nabble.com/Bigger-sites-running-on-wicket-tp2197500p3682047.html
>  To start a new topic under Apache Wicket, email
> ml-node+1842946-398011874-65...@n4.nabble.com
> To unsubscribe from Apache Wicket, click 
> here.
>
>



-- 

JC


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Bigger-sites-running-on-wicket-tp2197500p3682086.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: Bigger sites running on wicket?

2011-07-20 Thread richard emberson

I looked at the Page source for about 10 pages and could not
tell that they were generated using Wicket.
Are there some telltale indicators that might indicate
Wicket usage?
Yea, inside knowledge is one indicator, but I mean some
other indicator. Something about the HTML or such?

Thanks

Richard

On 07/20/2011 12:57 PM, dryajov wrote:

Well, bodybuilding.com is beginning to use wicket extensively, there are
several parts of the website ported to wicket (store excluded) already and a
major revamp is being worked on as we speak - all in wicket. That is by far
the biggest site that uses wicket AFAIK.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Bigger-sites-running-on-wicket-tp2197500p3681916.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




--
Quis custodiet ipsos custodes

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



Re: Bigger sites running on wicket?

2011-07-20 Thread Igor Vaynberg
needs www.

-igor

On Wed, Jul 20, 2011 at 12:57 PM, dryajov  wrote:
> Well, bodybuilding.com is beginning to use wicket extensively, there are
> several parts of the website ported to wicket (store excluded) already and a
> major revamp is being worked on as we speak - all in wicket. That is by far
> the biggest site that uses wicket AFAIK.
>
> --
> View this message in context: 
> http://apache-wicket.1842946.n4.nabble.com/Bigger-sites-running-on-wicket-tp2197500p3681916.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



Re: Bigger sites running on wicket?

2011-07-20 Thread dryajov
Well, bodybuilding.com is beginning to use wicket extensively, there are
several parts of the website ported to wicket (store excluded) already and a
major revamp is being worked on as we speak - all in wicket. That is by far
the biggest site that uses wicket AFAIK.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Bigger-sites-running-on-wicket-tp2197500p3681916.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: property model question

2011-07-20 Thread Per Newgro

Am 20.07.2011 19:38, schrieb wmike1...@gmail.com:

In the wicket example of Form Input (
http://wicketstuff.org/wicket14/forminput/
http://wicketstuff.org/wicket14/forminput/ ), I'm looking at the source and
can't make out what's happening with this line:

 // display the multiply result
 Label multiplyLabel = new Label("multiplyLabel", new
PropertyModel(
 getDefaultModel(), "multiply"));

I understand what this accomplishes, but I don't understand how. We're
passing this property model the default model of what exactly? I don't get
what it means to pass a property model a sublass of IModel to base itself
off of.

Thanks,
mike

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/property-model-question-tp3681616p3681616.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


The property model is set formerly to the parent container (form or 
panel) by constructor injection.

new Form("id", defaultModel);
or
new Panel("id", defaultModel);

If you check the hierachy of parent classes you can see the 
getDefaultModel mthod implementation.


Cheers
Per

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



Re: property model question

2011-07-20 Thread Igor Vaynberg
this is called model chaining. where models know that their model
object is another model and can properly handle it.

in this particular example

imodel d=getdefaultmodel()
imodel p=new propertymodel(d, "multiply")

p.getobject() then does this

object target=mytarget; (in this case d)
while (target instanceof imodel) { target=imodel.getobject(); }
getproperty(target, property);

so in execution p.getobject() resolves to this: d.getobject().getmultiply();

makes sense?

-igor



On Wed, Jul 20, 2011 at 10:38 AM, wmike1...@gmail.com
 wrote:
> In the wicket example of Form Input (
> http://wicketstuff.org/wicket14/forminput/
> http://wicketstuff.org/wicket14/forminput/ ), I'm looking at the source and
> can't make out what's happening with this line:
>
>            // display the multiply result
>            Label multiplyLabel = new Label("multiplyLabel", new
> PropertyModel(
>                getDefaultModel(), "multiply"));
>
> I understand what this accomplishes, but I don't understand how. We're
> passing this property model the default model of what exactly? I don't get
> what it means to pass a property model a sublass of IModel to base itself
> off of.
>
> Thanks,
> mike
>
> --
> View this message in context: 
> http://apache-wicket.1842946.n4.nabble.com/property-model-question-tp3681616p3681616.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



Re: Page De-Serialization and memory

2011-07-20 Thread richard emberson



On 07/20/2011 10:03 AM, Martin Grigorov wrote:

Hi Richard,

With the serialization optimizations you optimize only the second and
third level stores, i.e. the runtime memory is still the almost same.
You'll gain only if you have bigger second level cache which is used
when the user uses browser back button. And I think this is no so
often.

Just a thought and maybe a little off topic,
What if, when a Page is first generated, when it is first
loaded given its class, prior to use, the Page is serialized and
the bytes are put into a cache Map from class name to bytes.
Then, subsequent times the page is request (same session or
different session), it is found in the cache and simply
de-serialized.
Would it work?
Would it be better (choose some criteria)?
Thanks



About Scala vs. Java consciousness: I guess you read this thread -
http://groups.google.com/group/scala-user/browse_thread/thread/ea4d4dda2352a523#
Here and in the previous thread on this topic the functional guys
suggest solutions which I think are not that easy to read and as
proven the speed is far from the imperative solution. Oderski explains
it well in his response.

Ha. Yea, I have been following that discussion.
I tend to write OO-Scala and not FP-Scala.
Partly because that is the way my mind works but also
because if FP was so great, Lisp would have ended the discussion
(or may Haskell would have) and all enterprise applications would
be written in Lisp - but, of course, if you search the IBM/Oracle/SAP
sites you don't find any Lisp enterprise applications for sale
(ok, having said this, someone will find one, I admit defeat, etc.).
Also, its a lot easier to understand, debug and log OO vs FP code
(but, again, that is just my enterprise application development
background speaking).



About the questions - the simple answer is that a Component can have
just one parent, so it is not possible to reuse it neither in the same
page nor in different page. The same is true about its collection of
children. This is the current state.

Well, I guess the immutable Component would have to have a mutable
parent reference.

Thanks
Richard
--
Quis custodiet ipsos custodes

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



Re: hibernate and jasper reports

2011-07-20 Thread Attila Király
Choose one from guice and spring and live happily ever after? Why are you
using both of them?

Attila

2011/7/20 hariharansrc 

> i am having two maven projects, wicket hibernate integration using guice
> and
> wicket jasper reports integration using spring. Both project working
> independently well. Can we integrate both the projects into a single
> project. If so how? if not why? If any other solution available without
> integrating both the projects it will be more appreciated!!!
>
>
>   Is there any solution available without integrating it but using
> it as individual components
>
> Since each of my project will produce a war file can i integrate it using
> ear file will it work???
>
> Note: I will  use jasper reports and hibernate  independently so i am
> wondering why Dependency Injection will cause problem in integrating it.
>
>
> Thanks in advance,
> please provide your valuable answer
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/hibernate-and-jasper-reports-tp3680767p3680767.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
>
>


property model question

2011-07-20 Thread wmike1...@gmail.com
In the wicket example of Form Input (
http://wicketstuff.org/wicket14/forminput/
http://wicketstuff.org/wicket14/forminput/ ), I'm looking at the source and
can't make out what's happening with this line:

// display the multiply result
Label multiplyLabel = new Label("multiplyLabel", new
PropertyModel(
getDefaultModel(), "multiply"));

I understand what this accomplishes, but I don't understand how. We're
passing this property model the default model of what exactly? I don't get
what it means to pass a property model a sublass of IModel to base itself
off of.

Thanks,
mike

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/property-model-question-tp3681616p3681616.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: Page De-Serialization and memory

2011-07-20 Thread richard emberson




lol, so scala has a built in isOneOf, of course it wins there...this
is of course a non-example. im not sure why some of our code is so
bloated, its been there for years. i cleaned this one up to, here is
the "concise" version:

private boolean isOneOf(final char ch, final char[] charray) {
for (char c : charray) if (c==ch) return true;
return false;
}
what does the scala code for exists() look like? :)


Good re-write.
The Scala exists code pretty much looks like a generic version
of the isOneOf code.
The FP folks would point out that the difference is that there
are a bunch of such canned methods on all collection objects
and they are designed to be chained together.

--
Quis custodiet ipsos custodes

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



Re: Page De-Serialization and memory

2011-07-20 Thread Igor Vaynberg
On Wed, Jul 20, 2011 at 10:19 AM, richard emberson
 wrote:
> Thanks Igor.
>
>> it is not allowed, see page#componentRendered()
> Thanks.
>
>> sharing component instances between pages
> I am going to have to think about all of this.
> Maybe making mutable and immutable version of things
> or, maybe, an Immutable trait (interface) that signals
> intent (but, of course, would not enforce it).
>
>> that is a bad example
>
> Maybe here's a better example (actually, a rather extreme example):
>
> org/apache/wicket/util/upload/ParameterParser.java
>
>  private def isOneOf(ch: Char, charray: Array[Char]): Boolean =
>    charray exists { _ == ch }
>
>  private boolean isOneOf(final char ch, final char[] charray)
>  {
>    boolean result = false;
>    for (char character : charray)
>    {
>      if (ch == character)
>      {
>        result = true;
>        break;
>      }
>
>    }
>    return result;
>  }

lol, so scala has a built in isOneOf, of course it wins there...this
is of course a non-example. im not sure why some of our code is so
bloated, its been there for years. i cleaned this one up to, here is
the "concise" version:

private boolean isOneOf(final char ch, final char[] charray) {
   for (char c : charray) if (c==ch) return true;
   return false;
}

what does the scala code for exists() look like? :)

-igor


>
> I am not trying to (re-)start any wars here.
> I do not think its all due to formatting.
> Currently, for 1.5-RC5.1 loc:
> Java Wicket:  154556
> Scala Wicket: 118617
> and its not really possible to use some of the more-terse
> aspects of Scala because that would require a rather larger
> porting/re-writing effort.
>
>
> Richard
>
> On 07/20/2011 09:44 AM, Igor Vaynberg wrote:
>>
>> On Wed, Jul 20, 2011 at 9:00 AM, richard emberson
>>   wrote:
>>>
>>> I have many examples of such Java bloat. Consider the getKey method
>>> in the org/apache/wicket/util/value/ValueMap.java class:
>>>
>>> Java version:
>>>
>>>  public String getKey(final String key)
>>>  {
>>>    for (Object keyValue : keySet())
>>>    {
>>>      if (keyValue instanceof String)
>>>      {
>>>        String keyString = (String)keyValue;
>>>        if (key.equalsIgnoreCase(keyString))
>>>        {
>>>          return keyString;
>>>        }
>>>      }
>>>    }
>>>    return null;
>>>  }
>>>
>>> Scala version:
>>>
>>>  def getKey(key: String): Option[String] =
>>>    keySet find { s =>  key.equalsIgnoreCase(s) }
>>
>> that is a bad example. that method was there since the times valuemaps
>> supported non-string keys, thats what all the noise was about. your
>> code doesnt support non string keys, and i just cleaned it up ours so
>> it doesnt have to worry about it either. thanks for pointing it out :)
>>
>> here it is in its concise form :
>> public String getKey(String key) {
>>        for (String other : keySet()) if (other.equalsIgnoreCase(key))
>> return other;
>>        return null;
>> }
>>
>> it all depends on formatting
>>>
>>> The Scala version reads like a sentence: "For the keys find
>>> the key which equals, ignoring case, the key parameter."
>>> The Java code is just so sad in comparison.
>>
>> not in my concise version, though, is it? however, the concise version
>> is harder for some people to read, so we use very generous formatting
>> rules when it comes to spacing and curly braces.
>>
>>> I did have 2 questions buried in my previous email.
>>> Both having to do with serialization of an object when
>>> it appears as 2nd (3rd, etc.) time during the serialization
>>> process.
>>
>> serialization handles multiple references to the same instance. so if
>> you have the same instance showing up more then once in the
>> serialization graph it is only written out once. this is how circular
>> references are handled as well.
>>
>>> So, first, is it possible, likely, allowed, excluded, etc. that
>>> the same Component can appear more than once in the same
>>> Page tree? Would it make sense or even be possible for the
>>> same Form object to appear more than once in the same Page tree?
>>> Not two copies of a Form, but the single instance in two places
>>> on a Page?
>>> If it should never happen, is there code in Wicket that ensures
>>> that it does not happen?
>>
>> it is not allowed, see page#componentRendered()
>>
>>> Secondly, for a Component that is immutable in a given Page,
>>> could it appear, be reused, in the "same" Page in different
>>> Sessions (different clients)? Other areas of such Pages would
>>> be different, hold different data, but could the immutable part
>>> be same object? As an example, a read-only Label object, could
>>> it be used in the same place in the same Page "type" but in
>>> different Sessions? Is there any mechanism in Wicket currently
>>> that could identify such possible reuse?
>>
>> sharing component instances between pages is a bad idea, sharing them
>> between sessions is even worse. code is constantly refactored, what is
>> immutable now will most likely not be immutable later. i would 

Re: Page De-Serialization and memory

2011-07-20 Thread richard emberson

Thanks Igor.

> it is not allowed, see page#componentRendered()
Thanks.

> sharing component instances between pages
I am going to have to think about all of this.
Maybe making mutable and immutable version of things
or, maybe, an Immutable trait (interface) that signals
intent (but, of course, would not enforce it).

> that is a bad example

Maybe here's a better example (actually, a rather extreme example):

org/apache/wicket/util/upload/ParameterParser.java

  private def isOneOf(ch: Char, charray: Array[Char]): Boolean =
charray exists { _ == ch }

  private boolean isOneOf(final char ch, final char[] charray)
  {
boolean result = false;
for (char character : charray)
{
  if (ch == character)
  {
result = true;
break;
  }

}
return result;
  }

I am not trying to (re-)start any wars here.
I do not think its all due to formatting.
Currently, for 1.5-RC5.1 loc:
Java Wicket:  154556
Scala Wicket: 118617
and its not really possible to use some of the more-terse
aspects of Scala because that would require a rather larger
porting/re-writing effort.


Richard

On 07/20/2011 09:44 AM, Igor Vaynberg wrote:

On Wed, Jul 20, 2011 at 9:00 AM, richard emberson
  wrote:

I have many examples of such Java bloat. Consider the getKey method
in the org/apache/wicket/util/value/ValueMap.java class:

Java version:

  public String getKey(final String key)
  {
for (Object keyValue : keySet())
{
  if (keyValue instanceof String)
  {
String keyString = (String)keyValue;
if (key.equalsIgnoreCase(keyString))
{
  return keyString;
}
  }
}
return null;
  }

Scala version:

  def getKey(key: String): Option[String] =
keySet find { s =>  key.equalsIgnoreCase(s) }


that is a bad example. that method was there since the times valuemaps
supported non-string keys, thats what all the noise was about. your
code doesnt support non string keys, and i just cleaned it up ours so
it doesnt have to worry about it either. thanks for pointing it out :)

here it is in its concise form :
public String getKey(String key) {
for (String other : keySet()) if (other.equalsIgnoreCase(key)) return 
other;
return null;
}

it all depends on formatting


The Scala version reads like a sentence: "For the keys find
the key which equals, ignoring case, the key parameter."
The Java code is just so sad in comparison.


not in my concise version, though, is it? however, the concise version
is harder for some people to read, so we use very generous formatting
rules when it comes to spacing and curly braces.


I did have 2 questions buried in my previous email.
Both having to do with serialization of an object when
it appears as 2nd (3rd, etc.) time during the serialization
process.


serialization handles multiple references to the same instance. so if
you have the same instance showing up more then once in the
serialization graph it is only written out once. this is how circular
references are handled as well.


So, first, is it possible, likely, allowed, excluded, etc. that
the same Component can appear more than once in the same
Page tree? Would it make sense or even be possible for the
same Form object to appear more than once in the same Page tree?
Not two copies of a Form, but the single instance in two places
on a Page?
If it should never happen, is there code in Wicket that ensures
that it does not happen?


it is not allowed, see page#componentRendered()


Secondly, for a Component that is immutable in a given Page,
could it appear, be reused, in the "same" Page in different
Sessions (different clients)? Other areas of such Pages would
be different, hold different data, but could the immutable part
be same object? As an example, a read-only Label object, could
it be used in the same place in the same Page "type" but in
different Sessions? Is there any mechanism in Wicket currently
that could identify such possible reuse?


sharing component instances between pages is a bad idea, sharing them
between sessions is even worse. code is constantly refactored, what is
immutable now will most likely not be immutable later. i would hate
coding wicket if every time i made a change to someone else's
component i would have to check if i just made something immutable
mutable and possibly cause a security leak.

-igor



After memory comes performance and thats a much harder nut to
crack. To track down bugs in the Scala port I had to put
detailed logging into both the Java and Scala versions.
What was most surprising was the amount a code that
had to be execute, multiple times, just to render the
simplest Page in a unit test - tens of pages of logging
output. I do not understand all that is truly happening
within Wicket to render a Page yet, but its on my todo list.
And, maybe, there is no issue.

Richard
Thanks.


On 07/20/2011 03:04 AM, Martin Grigorov wrote:


Hi Richard,

1. Scala traits are something useful which I hope to 

Re: Page De-Serialization and memory

2011-07-20 Thread Martin Grigorov
Hi Richard,

With the serialization optimizations you optimize only the second and
third level stores, i.e. the runtime memory is still the almost same.
You'll gain only if you have bigger second level cache which is used
when the user uses browser back button. And I think this is no so
often.

About Scala vs. Java consciousness: I guess you read this thread -
http://groups.google.com/group/scala-user/browse_thread/thread/ea4d4dda2352a523#
Here and in the previous thread on this topic the functional guys
suggest solutions which I think are not that easy to read and as
proven the speed is far from the imperative solution. Oderski explains
it well in his response.

About the questions - the simple answer is that a Component can have
just one parent, so it is not possible to reuse it neither in the same
page nor in different page. The same is true about its collection of
children. This is the current state.

On Wed, Jul 20, 2011 at 7:44 PM, Igor Vaynberg  wrote:
> On Wed, Jul 20, 2011 at 9:00 AM, richard emberson
>  wrote:
>> I have many examples of such Java bloat. Consider the getKey method
>> in the org/apache/wicket/util/value/ValueMap.java class:
>>
>> Java version:
>>
>>  public String getKey(final String key)
>>  {
>>    for (Object keyValue : keySet())
>>    {
>>      if (keyValue instanceof String)
>>      {
>>        String keyString = (String)keyValue;
>>        if (key.equalsIgnoreCase(keyString))
>>        {
>>          return keyString;
>>        }
>>      }
>>    }
>>    return null;
>>  }
>>
>> Scala version:
>>
>>  def getKey(key: String): Option[String] =
>>    keySet find { s => key.equalsIgnoreCase(s) }
>
> that is a bad example. that method was there since the times valuemaps
> supported non-string keys, thats what all the noise was about. your
> code doesnt support non string keys, and i just cleaned it up ours so
> it doesnt have to worry about it either. thanks for pointing it out :)
>
> here it is in its concise form :
> public String getKey(String key) {
>        for (String other : keySet()) if (other.equalsIgnoreCase(key)) return 
> other;
>        return null;
> }
>
> it all depends on formatting
>>
>> The Scala version reads like a sentence: "For the keys find
>> the key which equals, ignoring case, the key parameter."
>> The Java code is just so sad in comparison.
>
> not in my concise version, though, is it? however, the concise version
> is harder for some people to read, so we use very generous formatting
> rules when it comes to spacing and curly braces.
>
>> I did have 2 questions buried in my previous email.
>> Both having to do with serialization of an object when
>> it appears as 2nd (3rd, etc.) time during the serialization
>> process.
>
> serialization handles multiple references to the same instance. so if
> you have the same instance showing up more then once in the
> serialization graph it is only written out once. this is how circular
> references are handled as well.
>
>> So, first, is it possible, likely, allowed, excluded, etc. that
>> the same Component can appear more than once in the same
>> Page tree? Would it make sense or even be possible for the
>> same Form object to appear more than once in the same Page tree?
>> Not two copies of a Form, but the single instance in two places
>> on a Page?
>> If it should never happen, is there code in Wicket that ensures
>> that it does not happen?
>
> it is not allowed, see page#componentRendered()
>
>> Secondly, for a Component that is immutable in a given Page,
>> could it appear, be reused, in the "same" Page in different
>> Sessions (different clients)? Other areas of such Pages would
>> be different, hold different data, but could the immutable part
>> be same object? As an example, a read-only Label object, could
>> it be used in the same place in the same Page "type" but in
>> different Sessions? Is there any mechanism in Wicket currently
>> that could identify such possible reuse?
>
> sharing component instances between pages is a bad idea, sharing them
> between sessions is even worse. code is constantly refactored, what is
> immutable now will most likely not be immutable later. i would hate
> coding wicket if every time i made a change to someone else's
> component i would have to check if i just made something immutable
> mutable and possibly cause a security leak.
>
> -igor
>
>
>> After memory comes performance and thats a much harder nut to
>> crack. To track down bugs in the Scala port I had to put
>> detailed logging into both the Java and Scala versions.
>> What was most surprising was the amount a code that
>> had to be execute, multiple times, just to render the
>> simplest Page in a unit test - tens of pages of logging
>> output. I do not understand all that is truly happening
>> within Wicket to render a Page yet, but its on my todo list.
>> And, maybe, there is no issue.
>>
>> Richard
>> Thanks.
>>
>>
>> On 07/20/2011 03:04 AM, Martin Grigorov wrote:
>>>
>>> Hi Richard,
>>>
>>> 1. Scala traits ar

Display pdf in frame issues

2011-07-20 Thread Rahvin
Hello,

Not sure if this a wicket specific problem but the example i used to do this
I got from here:
https://cwiki.apache.org/WICKET/displaying-content-eg-pdf-excel-word-in-an-iframe.html
https://cwiki.apache.org/WICKET/displaying-content-eg-pdf-excel-word-in-an-iframe.html
 

The example works great, except for with IE8.

To my component I have added the line:
add(new StringHeaderContributor(""));

I have checked the source of the rendered page and found:





The issue I get in IE8 is that the iFrame is a dark grey and entire page
goes all wonky (for lack of a better term)

Has anyone had/solved this?

Thanks


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Display-pdf-in-frame-issues-tp3681441p3681441.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: Page De-Serialization and memory

2011-07-20 Thread Igor Vaynberg
On Wed, Jul 20, 2011 at 9:00 AM, richard emberson
 wrote:
> I have many examples of such Java bloat. Consider the getKey method
> in the org/apache/wicket/util/value/ValueMap.java class:
>
> Java version:
>
>  public String getKey(final String key)
>  {
>    for (Object keyValue : keySet())
>    {
>      if (keyValue instanceof String)
>      {
>        String keyString = (String)keyValue;
>        if (key.equalsIgnoreCase(keyString))
>        {
>          return keyString;
>        }
>      }
>    }
>    return null;
>  }
>
> Scala version:
>
>  def getKey(key: String): Option[String] =
>    keySet find { s => key.equalsIgnoreCase(s) }

that is a bad example. that method was there since the times valuemaps
supported non-string keys, thats what all the noise was about. your
code doesnt support non string keys, and i just cleaned it up ours so
it doesnt have to worry about it either. thanks for pointing it out :)

here it is in its concise form :
public String getKey(String key) {
for (String other : keySet()) if (other.equalsIgnoreCase(key)) return 
other;
return null;
}

it all depends on formatting
>
> The Scala version reads like a sentence: "For the keys find
> the key which equals, ignoring case, the key parameter."
> The Java code is just so sad in comparison.

not in my concise version, though, is it? however, the concise version
is harder for some people to read, so we use very generous formatting
rules when it comes to spacing and curly braces.

> I did have 2 questions buried in my previous email.
> Both having to do with serialization of an object when
> it appears as 2nd (3rd, etc.) time during the serialization
> process.

serialization handles multiple references to the same instance. so if
you have the same instance showing up more then once in the
serialization graph it is only written out once. this is how circular
references are handled as well.

> So, first, is it possible, likely, allowed, excluded, etc. that
> the same Component can appear more than once in the same
> Page tree? Would it make sense or even be possible for the
> same Form object to appear more than once in the same Page tree?
> Not two copies of a Form, but the single instance in two places
> on a Page?
> If it should never happen, is there code in Wicket that ensures
> that it does not happen?

it is not allowed, see page#componentRendered()

> Secondly, for a Component that is immutable in a given Page,
> could it appear, be reused, in the "same" Page in different
> Sessions (different clients)? Other areas of such Pages would
> be different, hold different data, but could the immutable part
> be same object? As an example, a read-only Label object, could
> it be used in the same place in the same Page "type" but in
> different Sessions? Is there any mechanism in Wicket currently
> that could identify such possible reuse?

sharing component instances between pages is a bad idea, sharing them
between sessions is even worse. code is constantly refactored, what is
immutable now will most likely not be immutable later. i would hate
coding wicket if every time i made a change to someone else's
component i would have to check if i just made something immutable
mutable and possibly cause a security leak.

-igor


> After memory comes performance and thats a much harder nut to
> crack. To track down bugs in the Scala port I had to put
> detailed logging into both the Java and Scala versions.
> What was most surprising was the amount a code that
> had to be execute, multiple times, just to render the
> simplest Page in a unit test - tens of pages of logging
> output. I do not understand all that is truly happening
> within Wicket to render a Page yet, but its on my todo list.
> And, maybe, there is no issue.
>
> Richard
> Thanks.
>
>
> On 07/20/2011 03:04 AM, Martin Grigorov wrote:
>>
>> Hi Richard,
>>
>> 1. Scala traits are something useful which I hope to have someday in Java
>> too.
>> They can help in make some code reusable when it is not possible to
>> have common base class. At the end a trait is a partial base class...
>>
>> 2. I'm not sure what problem you are after with this optimization in
>> the serialized version of the object (its bytes).
>> Your quest will not improve the runtime memory consumption because the
>> trait's properties are mixed with the class instance properties. You
>> may have problems with PermGen though because Scala produces classes
>> for every "with Foo" (and for every Function/closure).
>> You are trying to improve the size (and speed?) of the produced bytes
>> after serialization. While this will reduce the size of the page
>> caches (for two of them - second (application scope) and third
>> (disk)). First level (http session) contains page instances (not
>> serialized). Check https://cwiki.apache.org/confluence/x/qIaoAQ for
>> more information.
>>
>> RAM and especially HDD are cheap today, so I think the benefit of your
>> optimization will not be big. As a proof I can say

Re: Page De-Serialization and memory

2011-07-20 Thread richard emberson

Martin,

I understand that some on the Wicket mailing list do not
believe that memory usage should be a big concern while others
are very concerned about it. One simply has to look at the
data storage code in the Component class and its complexity
to see a reflection of that concern.

For me, memory is memory and if one can save memory, support,
say, 15 thousand client per server rather than 10 thousand,
then, as a library builder, that is something to do.
But, again, some will say to just buy more RAM ... but no matter
how much RAM one buys, the framework that uses less memory
per client will still use less memory per client.

Maybe the Java community will back-port some of the capabilities
found in Scala into Java.
[Yea, most such 'advanced' Scala features pre-date either Scala or
Java but, in Scala, they are a part of the language's "feel".]
IMO, why bother about Java. But, again, having
written so much Scala code now, going back to Java is, well,
just painful; so much template/boiler-plate code is required by
Java.
I have many examples of such Java bloat. Consider the getKey method
in the org/apache/wicket/util/value/ValueMap.java class:

Java version:

  public String getKey(final String key)
  {
for (Object keyValue : keySet())
{
  if (keyValue instanceof String)
  {
String keyString = (String)keyValue;
if (key.equalsIgnoreCase(keyString))
{
  return keyString;
}
  }
}
return null;
  }

Scala version:

  def getKey(key: String): Option[String] =
keySet find { s => key.equalsIgnoreCase(s) }


The Scala version reads like a sentence: "For the keys find
the key which equals, ignoring case, the key parameter."
The Java code is just so sad in comparison.

At any rate, I am looking into Component memory usage and how,
in particular, Scala traits can help.
[Certainly, Java 8, 9, maybe 10 might add traits with a new key word,
but why wait, why bother.]
I am more than willing to pay a memory price on a per-class
basis rather than on a per-instance basis; so, make the PermGen
bigger - really, not a problem, with thousands of clients each
with multiple component tree, traits is a clear win.

While trying to estimate Scala trait usage per-component memory
saving, I looked into Wicket's Page serialization. I believed that
the new page management code would allow one to plugin a different
serializer, hence I wrote what I think is a far faster/compact
serializer which is targeted to Scala Wicket - but, its not been tested
(other than low-level unit tests) yet, so, who knows.



I did have 2 questions buried in my previous email.
Both having to do with serialization of an object when
it appears as 2nd (3rd, etc.) time during the serialization
process.

So, first, is it possible, likely, allowed, excluded, etc. that
the same Component can appear more than once in the same
Page tree? Would it make sense or even be possible for the
same Form object to appear more than once in the same Page tree?
Not two copies of a Form, but the single instance in two places
on a Page?
If it should never happen, is there code in Wicket that ensures
that it does not happen?

Secondly, for a Component that is immutable in a given Page,
could it appear, be reused, in the "same" Page in different
Sessions (different clients)? Other areas of such Pages would
be different, hold different data, but could the immutable part
be same object? As an example, a read-only Label object, could
it be used in the same place in the same Page "type" but in
different Sessions? Is there any mechanism in Wicket currently
that could identify such possible reuse?



After memory comes performance and thats a much harder nut to
crack. To track down bugs in the Scala port I had to put
detailed logging into both the Java and Scala versions.
What was most surprising was the amount a code that
had to be execute, multiple times, just to render the
simplest Page in a unit test - tens of pages of logging
output. I do not understand all that is truly happening
within Wicket to render a Page yet, but its on my todo list.
And, maybe, there is no issue.

Richard
Thanks.


On 07/20/2011 03:04 AM, Martin Grigorov wrote:

Hi Richard,

1. Scala traits are something useful which I hope to have someday in Java too.
They can help in make some code reusable when it is not possible to
have common base class. At the end a trait is a partial base class...

2. I'm not sure what problem you are after with this optimization in
the serialized version of the object (its bytes).
Your quest will not improve the runtime memory consumption because the
trait's properties are mixed with the class instance properties. You
may have problems with PermGen though because Scala produces classes
for every "with Foo" (and for every Function/closure).
You are trying to improve the size (and speed?) of the produced bytes
after serialization. While this will reduce the size of the page
caches (for two of them - second (application s

Re: Textfield to keep the value after being refreshed

2011-07-20 Thread hariharansrc
You can use the keyword static to make the textfield's value remain after
refresh or if you use any persistent frameworks the object state will be
available until you destroy it.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Textfield-to-keep-the-value-after-being-refreshed-tp3681007p3681290.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: Textfield to keep the value after being refreshed

2011-07-20 Thread Andrea Del Bene

Hi,

which AJAX component are you using? is likely that your field's form is 
not submitted,  hence field's model is not updated

Hi,

I refresh the page using target.addComponent(fieldName);
The value that was entered in the text field is cleared. How can I get it to
keep the value?

Thanks
Anna




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



Re: Textfield to keep the value after being refreshed

2011-07-20 Thread Anna Simbirtsev
I can't, because target.addComponent is called in the
AjaxFormComponentUpdatingBehavior on one of the field. But I already found a
solution. I added AjaxFormComponentUpdatingBehavior to the text field, so
that the value is kept on the server.
Thanks

On Wed, Jul 20, 2011 at 10:51 AM, Pedro Santos  wrote:

> Hi Anna, use an submit component like AjaxLink or AjaxButton to
> interact with server. Even if you skip the default form processing by
> set submitComponent.setDefaultFormProcessing(false) the input in the
> fieldName will be kept.
>
> On Wed, Jul 20, 2011 at 11:37 AM, Anna Simbirtsev 
> wrote:
> > Hi,
> >
> > I refresh the page using target.addComponent(fieldName);
> > The value that was entered in the text field is cleared. How can I get it
> to
> > keep the value?
> >
> > Thanks
> > Anna
> >
>
>
>
> --
> Pedro Henrique Oliveira dos Santos
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


-- 
Anna Simbirtsev
(416) 729-7331


Re: Textfield to keep the value after being refreshed

2011-07-20 Thread Pedro Santos
Hi Anna, use an submit component like AjaxLink or AjaxButton to
interact with server. Even if you skip the default form processing by
set submitComponent.setDefaultFormProcessing(false) the input in the
fieldName will be kept.

On Wed, Jul 20, 2011 at 11:37 AM, Anna Simbirtsev  wrote:
> Hi,
>
> I refresh the page using target.addComponent(fieldName);
> The value that was entered in the text field is cleared. How can I get it to
> keep the value?
>
> Thanks
> Anna
>



-- 
Pedro Henrique Oliveira dos Santos

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



Textfield to keep the value after being refreshed

2011-07-20 Thread Anna Simbirtsev
Hi,

I refresh the page using target.addComponent(fieldName);
The value that was entered in the text field is cleared. How can I get it to
keep the value?

Thanks
Anna


using saml2 for authentication

2011-07-20 Thread fachhoch
my application uses wicket authentication which it turn uses spring  acegi
security, now we along with our partner decided to use single sign on for
which saml2  is proposed,  I have to implement saml2 in my wicket
application we will the service provider and our partners will be identity
provider, did anybody used saml2 with wicket?







--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/using-saml2-for-authentication-tp3680988p3680988.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: AjaxLink onclick being called twice

2011-07-20 Thread wic...@geofflancaster.com
Clint,

The behavior I'm seeing is that I click the link once but see the onClick
method triggered twice.

Modal window has a "shown" variable to detect if a modal window is already
being displayed. It looks like the first time onClick fires and calls the
modal's show() method it sets shown to true. Immediately after, onClick is
triggered again. Modal window returns nothing if shown is true which makes
the second onClick's results empty, and is being passed back to the page.
The modal is never actually shown as a result of this empty 
that the browser receives.

Thanks

Original Message:
-
From: Clint Checketts checke...@gmail.com
Date: Tue, 19 Jul 2011 21:12:35 -0500
To: users@wicket.apache.org, wic...@geofflancaster.com
Subject: Re: AjaxLink onclick being called twice


So you click the link and the modal displays, you dismiss the modal, click
the link again and nothing happens?

Is the behavior consistent across browsers?

-Clint

On Tue, Jul 19, 2011 at 4:18 PM, wic...@geofflancaster.com <
wic...@geofflancaster.com> wrote:

> Has anyone had any problems using an AjaxLink where the onclick method is
> being called twice?
>
> I'm trying to use an AjaxLink to load a ModalWindow but the second time
> it's being called, the ModalWindow thinks that the window has already
> loaded so it returns nothing.
>
> 
> mail2web.com – What can On Demand Business Solutions do for you?
> http://link.mail2web.com/Business/SharePoint
>
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>



mail2web.com – What can On Demand Business Solutions do for you?
http://link.mail2web.com/Business/SharePoint



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



Re: AjaxLink onclick being called twice

2011-07-20 Thread wic...@geofflancaster.com
Clint,

The behavior I'm seeing is that I click the link once but see the onClick
method triggered twice.

Modal window has a "shown" variable to detect if a modal window is already
being displayed. It looks like the first time onClick fires and calls the
modal's show() method it sets shown to true. Immediately after, onClick is
triggered again. Modal window returns nothing if shown is true which makes
the second onClick's results empty, and is being passed back to the page.
The modal is never actually shown as a result of this empty 
that the browser receives.

Thanks

Original Message:
-
From: Clint Checketts checke...@gmail.com
Date: Tue, 19 Jul 2011 21:12:35 -0500
To: users@wicket.apache.org, wic...@geofflancaster.com
Subject: Re: AjaxLink onclick being called twice


So you click the link and the modal displays, you dismiss the modal, click
the link again and nothing happens?

Is the behavior consistent across browsers?

-Clint

On Tue, Jul 19, 2011 at 4:18 PM, wic...@geofflancaster.com <
wic...@geofflancaster.com> wrote:

> Has anyone had any problems using an AjaxLink where the onclick method is
> being called twice?
>
> I'm trying to use an AjaxLink to load a ModalWindow but the second time
> it's being called, the ModalWindow thinks that the window has already
> loaded so it returns nothing.
>
> 
> mail2web.com – What can On Demand Business Solutions do for you?
> http://link.mail2web.com/Business/SharePoint
>
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>



mail2web.com - Microsoft® Exchange solutions from a leading provider -
http://link.mail2web.com/Business/Exchange



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



Re: AjaxLink onclick being called twice

2011-07-20 Thread wic...@geofflancaster.com
Clint,

The behavior I'm seeing is that I click the link once but see the onClick
method triggered twice.

Modal window has a "shown" variable to detect if a modal window is already
being displayed. It looks like the first time onClick fires and calls the
modal's show() method it sets shown to true. Immediately after, onClick is
triggered again. Modal window returns nothing if shown is true which makes
the second onClick's results empty, and is being passed back to the page.
The modal is never actually shown as a result of this empty 
that the browser receives.

Thanks

Original Message:
-
From: Clint Checketts checke...@gmail.com
Date: Tue, 19 Jul 2011 21:12:35 -0500
To: users@wicket.apache.org, wic...@geofflancaster.com
Subject: Re: AjaxLink onclick being called twice


So you click the link and the modal displays, you dismiss the modal, click
the link again and nothing happens?

Is the behavior consistent across browsers?

-Clint

On Tue, Jul 19, 2011 at 4:18 PM, wic...@geofflancaster.com <
wic...@geofflancaster.com> wrote:

> Has anyone had any problems using an AjaxLink where the onclick method is
> being called twice?
>
> I'm trying to use an AjaxLink to load a ModalWindow but the second time
> it's being called, the ModalWindow thinks that the window has already
> loaded so it returns nothing.
>
> 
> mail2web.com – What can On Demand Business Solutions do for you?
> http://link.mail2web.com/Business/SharePoint
>
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>



mail2web.com - Microsoft® Exchange solutions from a leading provider -
http://link.mail2web.com/Business/Exchange



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



Re: AjaxLink onclick being called twice

2011-07-20 Thread wic...@geofflancaster.com
Clint,

The behavior I'm seeing is that I click the link once but see the onClick
method triggered twice.

Modal window has a "shown" variable to detect if a modal window is already
being displayed. It looks like the first time onClick fires and calls the
modal's show() method it sets shown to true. Immediately after, onClick is
triggered again. Modal window returns nothing if shown is true which makes
the second onClick's results empty, and is being passed back to the page.
The modal is never actually shown as a result of this empty 
that the browser receives.

Thanks

Original Message:
-
From: Clint Checketts checke...@gmail.com
Date: Tue, 19 Jul 2011 21:12:35 -0500
To: users@wicket.apache.org, wic...@geofflancaster.com
Subject: Re: AjaxLink onclick being called twice


So you click the link and the modal displays, you dismiss the modal, click
the link again and nothing happens?

Is the behavior consistent across browsers?

-Clint

On Tue, Jul 19, 2011 at 4:18 PM, wic...@geofflancaster.com <
wic...@geofflancaster.com> wrote:

> Has anyone had any problems using an AjaxLink where the onclick method is
> being called twice?
>
> I'm trying to use an AjaxLink to load a ModalWindow but the second time
> it's being called, the ModalWindow thinks that the window has already
> loaded so it returns nothing.
>
> 
> mail2web.com – What can On Demand Business Solutions do for you?
> http://link.mail2web.com/Business/SharePoint
>
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>



mail2web.com – Enhanced email for the mobile individual based on Microsoft®
Exchange - http://link.mail2web.com/Personal/EnhancedEmail



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



Re: AjaxLink onclick being called twice

2011-07-20 Thread wic...@geofflancaster.com
Clint,

The behavior I'm seeing is that I click the link once but see the onClick
method triggered twice.

Modal window has a "shown" variable to detect if a modal window is already
being displayed. It looks like the first time onClick fires and calls the
modal's show() method it sets shown to true. Immediately after, onClick is
triggered again. Modal window returns nothing if shown is true which makes
the second onClick's results empty, and is being passed back to the page.
The modal is never actually shown as a result of this empty 
that the browser receives.

Thanks

Original Message:
-
From: Clint Checketts checke...@gmail.com
Date: Tue, 19 Jul 2011 21:12:35 -0500
To: users@wicket.apache.org, wic...@geofflancaster.com
Subject: Re: AjaxLink onclick being called twice


So you click the link and the modal displays, you dismiss the modal, click
the link again and nothing happens?

Is the behavior consistent across browsers?

-Clint

On Tue, Jul 19, 2011 at 4:18 PM, wic...@geofflancaster.com <
wic...@geofflancaster.com> wrote:

> Has anyone had any problems using an AjaxLink where the onclick method is
> being called twice?
>
> I'm trying to use an AjaxLink to load a ModalWindow but the second time
> it's being called, the ModalWindow thinks that the window has already
> loaded so it returns nothing.
>
> 
> mail2web.com – What can On Demand Business Solutions do for you?
> http://link.mail2web.com/Business/SharePoint
>
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>



mail2web LIVE – Free email based on Microsoft® Exchange technology -
http://link.mail2web.com/LIVE



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



hibernate and jasper reports

2011-07-20 Thread hariharansrc
i am having two maven projects, wicket hibernate integration using guice and
wicket jasper reports integration using spring. Both project working
independently well. Can we integrate both the projects into a single
project. If so how? if not why? If any other solution available without
integrating both the projects it will be more appreciated!!!


   Is there any solution available without integrating it but using
it as individual components

Since each of my project will produce a war file can i integrate it using
ear file will it work???

Note: I will  use jasper reports and hibernate  independently so i am
wondering why Dependency Injection will cause problem in integrating it.


Thanks in advance,
please provide your valuable answer 

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/hibernate-and-jasper-reports-tp3680767p3680767.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: onclick ajax event stops working when adding onmouseover

2011-07-20 Thread rebecca
Hello again

Do you have an idea why this 2 ajax events don't work together?

thanks
Rebecca

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/onclick-ajax-event-stops-working-when-adding-onmouseover-tp3674638p3680546.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: Page De-Serialization and memory

2011-07-20 Thread Martin Grigorov
Hi Richard,

1. Scala traits are something useful which I hope to have someday in Java too.
They can help in make some code reusable when it is not possible to
have common base class. At the end a trait is a partial base class...

2. I'm not sure what problem you are after with this optimization in
the serialized version of the object (its bytes).
Your quest will not improve the runtime memory consumption because the
trait's properties are mixed with the class instance properties. You
may have problems with PermGen though because Scala produces classes
for every "with Foo" (and for every Function/closure).
You are trying to improve the size (and speed?) of the produced bytes
after serialization. While this will reduce the size of the page
caches (for two of them - second (application scope) and third
(disk)). First level (http session) contains page instances (not
serialized). Check https://cwiki.apache.org/confluence/x/qIaoAQ for
more information.

RAM and especially HDD are cheap today, so I think the benefit of your
optimization will not be big. As a proof I can say that there are no
complains in the mailing lists that Wicket produces too big files for
the third level cache. The general complain is that http session
footprint is bigger than action-based web frameworks but I think this
is because using custom o.a.w.Session is so comfortable that people
start putting a lot of state there. The next reason is first-level
cache but even this is easy to "solve" - just implement custom
IPageManager or override the default one to not use http session as
first level cache.

Recently we reworked a bit the code related to page serialization and
now it is possible to use any library specialized in object
serialization (see https://github.com/eishay/jvm-serializers/wiki).
The schema based ones (like Apache Avro, Thrift, Protobuf, ...) will
be harder to use but not impossible.
The schemaless ones (Java Serialization, Kryo, XStream, ...) are
easier to use with Wicket. You may check Kryo based serializer at
https://github.com/wicketstuff/core/tree/master/jdk-1.6-parent/serializer-kryo
. It is faster than Java Serialization and produces less bytes.

On Wed, Jul 20, 2011 at 2:43 AM, richard emberson
 wrote:
> Martin,
>
> The reason I was interested in Wicket memory usage was because
> of the potential use of Scala traits, rather than the two possible
> Java approaches, might be compelling when it comes to memory usage.
>
> First, the two Java approaches: proxy/wrapper object or bundle everything
> into the base class.
>
> The proxy/wrapper approach lets one have a single implementation
> that can be share by multiple classes. The down side is that
> proxy/wrapper object requires an additional reference in the
> class using it and hence additional memory usage.
>
> The bundle everything into the base class approach violates
> OOP 101 dictum about having small objects focused on their
> own particular behavior thus avoiding bloat.
> (Not executable Java/Scala code below.)
>
> interface Parent {
>  getParent
>  setParent
> }
> // Potentially shared implementation
> class ParentProxy implements Parent {
>  parent
>  getParent = parent
>  setParent(parent) = this.parent = parent
> }
>
> // Issue: Has additional instance variable: parentProxy
> class CompWithProxy with Parent {
>  parentProxy = new ParentProxy
>  getParent = parentProxy.getParent
>  setParent(parent) = parentProxy.setParent(parent)
> }
>
> // Issue: Does not share implementation
> class CompAllInOne with Parent {
>  parent
>  getParent = parent
>  setParent(parent) = this.parent = parent
> }
>
> Wicket has taken the "bundle everything into base class" in order
> to lessen memory usage - a certainly reasonable Java approach
> to the problem.
>
> With Scala one can do the following:
>
> // Shared implementation
> trait ParentTrait {
>  parent
>  getParent = parent
>  setParent(parent) = this.parent = parent
> }
>
> // Uses implementation
> class Comp with ParentTrait
>
> The implementation, ParentTrait, can be used by any
> number of classes.
> In addition, one can add to a base class any number of
> such implementation traits sharing multiple implementations
> across multiple classes.
>
> So, can using such approach result in smaller (less in-memory)
> object in Scala than in Java?
>
> The ParentTrait does not really save very much. I assume
> that its only the Page class and sub-classes that do not have
> parent components in Wicket, so the savings per Page component
> tree is very small indeed. But, there are other behaviors that
> can be converted to traits, for example, Models.
> Many of the instance variables in the Java Models which
> take memory can be converted to methods return values which only
> add to the size of the class, not to every instance of the class.
> Also, with Model traits that use Component self-types, one can
> do away with IComponentAssignedModel wrapping and such.
>
> So, how to demonstrate such memory differences. I created
> stripp

Re: wicket as template engine

2011-07-20 Thread Martin Grigorov
Also see the approach at
https://github.com/wicketstuff/core/tree/master/jdk-1.5-parent/wicket-poi-parent
This project shows how to export DataTable content in Excel.
You can do some similar just export to PDF.

On Wed, Jul 20, 2011 at 1:14 AM, Jeremy Thomerson
 wrote:
> Search the mailing list archives for things like emailing pages. There have
> been a lot of discussions about the topic that will help you.
> On 2011 7 19 10:32, "Leszek Gawron"  wrote:
>> I know I could use freemarker, velocity or any other tool. But these
>> tools require me to create a full blown template model up front as
>> wicket allows for a bunch of models chained togeter pulling data from
>> different sources when they are needed.
>>
>> I have a set of load of panels that create a single Page. The customer
>> wants me to export page contents to pdf so I thought I could:
>>
>> 1. create a "print" skin for the panels
>> 2. render the panels/page using "print" skin to the external html file.
>> 3. use some html to pdf rendering tool (like flying saucer)
>> 4. serve pdf as with content-disposition: attachment
>>
>> Everything is easy apart from 1). Can you advise?
>>
>> lg
>> --
>> Leszek Gawron http://lgawron.posterous.com
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
>



-- 
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