Re: Wicket as a templating engine

2012-02-18 Thread pkc
Interesting.  I may try to make a generic wicket:insert=quot;abc.xyzquot;
tag that uses the page's default property model to resolve the abc.xyz.
Will this work?  

Two other cool things I'm looking for:

1) Does wicket:extend support a codeBehind attribute?  Say I have 20
stateless pages and I want them all to extend one BasePage and then use my
wicket:insert tag for the fairly simple dynamic stuff.

2) To avoid tag soup, I don't want things like if statements or loops in
the templates.  However, I would like to have wicket:insert support
property model values that resolve to collections.  So can someone suggest a
way to use repeaters in a generic way?  Something like this:
  wicket:insert=quot;addressListquot; item=quot;addressquot;
wicket:insert=quot;address.firstNamequot;/br/
  /wicket:insert

If I can get this much working, I can wicket for the entire site!

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-as-a-templating-engine-tp4399165p4399701.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: Slow rendering

2012-02-18 Thread Jürgen Lind

Hi,

thank you for your input on how to attack my problem... As it turned out,
the simplest way to see where the time is spent, was to override the
render method of various components. I had used onBeginRender and 
onAfterRender
before, but they seem to be called asymetrically so I was not able to to
properly associate the start and stop events for a particular timer.

To use a profiling tool was not an option since I do not have full access to the
integration testing machine and thus I cannot instrument the server. Secondly, I
wanted to measure the data on a per request basis which is - to my knowledge - 
not
possible with this kind of tools.

Long story short: the time is spent in the rendering phase for the component 
that
represents a tree entry. Due to various requirements, this component is fairly 
complex
and I takes approx. 2.5 to render one of them. Multiply by 5000 and that's it...

No comes the tricky bit: to convince our customer, that opening 5000 tree 
entries
simultaneously is not  really a good idea...

J.

On 17.02.2012 00:28, Pamir Erdem wrote:

I'm so sorry but i could not understand the question. If it is in server
side than you can instrument it with JProfiler or JxInsight.
If it is on client side dynaTrace can help you or even google chrome
javascript can help you to detect the problem

On Thu, Feb 16, 2012 at 10:42 PM, Jürgen Lindjuergen.l...@iteratec.dewrote:


Hi,

as I was saying in the original post, in rare cases the tree degenerates
to a plain
list - i.e a tree with one (hidden) root node and up to 5000 children that
are rendered
at the same time. Please do not ask me, why our customer would want that -
it is how
it is for the time being ;-)

J.


On 16.02.2012 21:13, Igor Vaynberg wrote:


why is your tree rendering all the nodes ahead of time? shouldnt it
render them lazily as they are expanded?

-igor

On Thu, Feb 16, 2012 at 10:50 AM, Jürgen Lindjuergen.l...@iteratec.de
  wrote:


Hi there,

I am currently encountering a problem that I don't know how to attack...
We
have
developed an application that uses the Tree-Component to show
hierarchical
data
to the user. In some cases, the tree degenerates to a plain list that
can be
quite
large. Now, if the list has around 1000 entries, the rendering phase for
the
tree
takes approx. 1 second, which seems to be ok. For 2500 entries, the
rendering time
goes up to around 11 seconds and with 5000 entries, we're looking at
approx.
30
seconds.

Now, I would like to find out, which part of the component tree causes
these
huge
numbers, but I have run out of ideas on how to track down these numbers.
The
last
point I was able to measure was between onBeforeRender and onAfterRender
of
my
subclassed LabelTree component.

Any suggestions on how to instrument my application without building a
custom wicket
package?

Kind Regards,

J.

--
Dr. Jürgen Lind
iteratec GmbHFon: +49 (0)89 614551-44
Inselkammerstrasse 4 Fax: +49 (0)89 614551-10
82008 Unterhaching   Web: www.iteratec.de

Sitz und Registergericht der iteratec GmbH: München HRB 113 519
Geschäftsführer: Klaus Eberhardt, Mark Goerke, Inge Hanschke, Ralf Menzel

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



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




Mit freundlichen Grüßen,

Jürgen Lind

--
Dr. Jürgen Lind
iteratec GmbHFon: +49 (0)89 614551-44
Inselkammerstrasse 4 Fax: +49 (0)89 614551-10
82008 Unterhaching   Web: www.iteratec.de

Sitz und Registergericht der iteratec GmbH: München HRB 113 519
Geschäftsführer: Klaus Eberhardt, Mark Goerke, Inge Hanschke, Ralf Menzel

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








Mit freundlichen Grüßen,

Jürgen Lind

--
Dr. Jürgen Lind
iteratec GmbHFon: +49 (0)89 614551-44
Inselkammerstrasse 4 Fax: +49 (0)89 614551-10
82008 Unterhaching   Web: www.iteratec.de

Sitz und Registergericht der iteratec GmbH: München HRB 113 519
Geschäftsführer: Klaus Eberhardt, Mark Goerke, Inge Hanschke, Ralf Menzel

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



Component specific JavaScript

2012-02-18 Thread Jürgen Lind

Hi,

I was wondering if there is any kind of best practice to add specific javascript
to a component. I often have the case, where a piece of javascript needs to run
when the component is rendered as part of full-page request, and then 
subsequently
as part of a self-triggered Ajax-Request or as part of an Ajax-Request triggered
by another component.

I would like to have one place where I can put the Javascript and be shure, it 
is
run every time...

Cheers,

J.

--
Dr. Jürgen Lind
iteratec GmbHFon: +49 (0)89 614551-44
Inselkammerstrasse 4 Fax: +49 (0)89 614551-10
82008 Unterhaching   Web: www.iteratec.de

Sitz und Registergericht der iteratec GmbH: München HRB 113 519
Geschäftsführer: Klaus Eberhardt, Mark Goerke, Inge Hanschke, Ralf Menzel

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



Re: Component specific JavaScript

2012-02-18 Thread Christoph Leiter

Hello Juergen,

you can register a function that gets called when wicket creates a new 
element in the DOM:


Wicket.Event.subscribe('/dom/node/added', function(element) {
// do stuff
});

You can also use the '/dom/node/removing' channel.

Hope this helps.


Christoph




Jürgen Lind (2012-02-18 16:55):

Hi,

I was wondering if there is any kind of best practice to add specific
javascript
to a component. I often have the case, where a piece of javascript needs
to run
when the component is rendered as part of full-page request, and then
subsequently
as part of a self-triggered Ajax-Request or as part of an Ajax-Request
triggered
by another component.

I would like to have one place where I can put the Javascript and be
shure, it is
run every time...

Cheers,

J.



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



Re: Component specific JavaScript

2012-02-18 Thread Jürgen Lind

Hi Christoph,

thank you for your reply, I did not know that such a method exists (does it for 
1.4
or is this already Wicket 1.5). An secondly: are these handlers fired on a ajax
update of an existing DOM Element or only when it is added?

And where would I put the Javascript that registers the handler? In the 
Markup-Page of
the Component? How do I make sure, the handler is added only once?


J.

On 18.02.2012 17:39, Christoph Leiter wrote:

Hello Juergen,

you can register a function that gets called when wicket creates a new
element in the DOM:

Wicket.Event.subscribe('/dom/node/added', function(element) {
  // do stuff
});

You can also use the '/dom/node/removing' channel.

Hope this helps.


Christoph




Jürgen Lind (2012-02-18 16:55):

Hi,

I was wondering if there is any kind of best practice to add specific
javascript
to a component. I often have the case, where a piece of javascript needs
to run
when the component is rendered as part of full-page request, and then
subsequently
as part of a self-triggered Ajax-Request or as part of an Ajax-Request
triggered
by another component.

I would like to have one place where I can put the Javascript and be
shure, it is
run every time...

Cheers,

J.



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




Mit freundlichen Grüßen,

Jürgen Lind

--
Dr. Jürgen Lind
iteratec GmbHFon: +49 (0)89 614551-44
Inselkammerstrasse 4 Fax: +49 (0)89 614551-10
82008 Unterhaching   Web: www.iteratec.de

Sitz und Registergericht der iteratec GmbH: München HRB 113 519
Geschäftsführer: Klaus Eberhardt, Mark Goerke, Inge Hanschke, Ralf Menzel

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



no input when using a link

2012-02-18 Thread lang
I made a login form. The user can click on the link I forgot my password
In the program I want to read the input email address field. But it is
always empty. When I use the ok button i can read the email field
succesfully. What to do? 

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/no-input-when-using-a-link-tp4400550p4400550.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: no input when using a link

2012-02-18 Thread Chris Colman
What Wicket class did you use for the I forgot my password button. I
think it has to be one of the 'submitting' types for the model to be
updated.

-Original Message-
From: lang [mailto:delan...@telfort.nl]
Sent: Sunday, 19 February 2012 8:48 AM
To: users@wicket.apache.org
Subject: no input when using a link

I made a login form. The user can click on the link I forgot my
password
In the program I want to read the input email address field. But it is
always empty. When I use the ok button i can read the email field
succesfully. What to do?

--
View this message in context: http://apache-
wicket.1842946.n4.nabble.com/no-input-when-using-a-link-
tp4400550p4400550.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



AjaxLink.onClick() Not Triggered

2012-02-18 Thread Richard W. Adams
I have an Ajax link in a drop down menu, created like this:

final MenuChoice item = new MenuChoice(Delete) {
private static final long serialVersionUID = 1L;

@Override protected AbstractLink newLink(final 
String id) {
final AjaxLinkString link = new 
AjaxLinkString(id) {
private static final long 
serialVersionUID = 1L;
@Override public void
onClick(final AjaxRequestTarget 
target) { 
 confirmer.confirm(model.getTrack(), target); 
}
};
return link;
}
};

The generated HTML looks like this:

a href=# id=id28 onclick=var 
wcall=wicketAjaxGet('?wicket:interface=:1:resultForm:track-list:gridViewportContainer:viewPortTable:dataGridBody:rows:2:cells:12:cell:smartMenu:menuItemRepeater:5:menuItem:labelContainer:menuLink:1:IBehaviorListener:0:',function()
 
{ }.bind(this),function() { }.bind(this), function() {return 
Wicket.$('id28') != null;}.bind(this));return !wcall;Delete/a

However, when I click the link, the onClick() handler is not called. The 
Wicket Ajax debug window shows no Ajax activity occurring.

Can anyone see what I'm doing wrong?

**

This email and any attachments may contain information that is confidential 
and/or privileged for the sole use of the intended recipient.  Any use, review, 
disclosure, copying, distribution or reliance by others, and any forwarding of 
this email or its contents, without the express permission of the sender is 
strictly prohibited by law.  If you are not the intended recipient, please 
contact the sender immediately, delete the e-mail and destroy all copies.
**


Re: no input when using a link

2012-02-18 Thread Jeremy Thomerson
Chris is right - use SubmitLink

On Sat, Feb 18, 2012 at 4:52 PM, Chris Colman
chr...@stepaheadsoftware.comwrote:

 What Wicket class did you use for the I forgot my password button. I
 think it has to be one of the 'submitting' types for the model to be
 updated.

 -Original Message-
 From: lang [mailto:delan...@telfort.nl]
 Sent: Sunday, 19 February 2012 8:48 AM
 To: users@wicket.apache.org
 Subject: no input when using a link
 
 I made a login form. The user can click on the link I forgot my
 password
 In the program I want to read the input email address field. But it is
 always empty. When I use the ok button i can read the email field
 succesfully. What to do?
 
 --
 View this message in context: http://apache-
 wicket.1842946.n4.nabble.com/no-input-when-using-a-link-
 tp4400550p4400550.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




-- 
Jeremy Thomerson
http://wickettraining.com
*Need a CMS for Wicket?  Use Brix! http://brixcms.org*


Re: Serving different content depending on User Agent

2012-02-18 Thread Jeremy Thomerson
On Mon, Feb 13, 2012 at 8:21 AM, Richard W. Adams rwada...@up.com wrote:

 Could someone explain the meaning of the string argument to
 Session.setStyle()? Unfortunately, the javadocs give no clue, other saying
 that a skin can be used. Is the string the name of a stylesheet file, or
 something else?

 Note to Wicket team: The Wicket Javadocs are woefully inadequate. Time
 invested in fleshing them out would be well spent  would prevent a lot of
 questions like this.


Patches welcome.

Of course, Javadocs can always be improved, but your statement that they
will prevent a lot of questions like this isn't necessarily true.  I've
been on lots of mailing lists over the years and it doesn't matter how good
the javadocs are, there are still questions.   Most people don't look at
the javadocs.

Did you actually read the entire javadoc?  The setStyle javadocs give you a
link to the Session (class) javadocs.  These docs explain what style is and
then give a long list of exactly how all the resources are loaded -
including the style parameter and how it effects resource names.  If you
see something that can be improved there, please by all means submit a
patch or even an email that says please add such-and-such.

-- 
Jeremy Thomerson
http://wickettraining.com
*Need a CMS for Wicket?  Use Brix! http://brixcms.org*


Re: Serving different content depending on User Agent

2012-02-18 Thread Martin Makundi
Also there is:

https://cwiki.apache.org/WICKET/localization-and-skinning-of-applications.html

https://cwiki.apache.org/OOOUSERS/branding-style-guide.html

2012/2/19 Jeremy Thomerson jer...@wickettraining.com:
 On Mon, Feb 13, 2012 at 8:21 AM, Richard W. Adams rwada...@up.com wrote:

 Could someone explain the meaning of the string argument to
 Session.setStyle()? Unfortunately, the javadocs give no clue, other saying
 that a skin can be used. Is the string the name of a stylesheet file, or
 something else?

 Note to Wicket team: The Wicket Javadocs are woefully inadequate. Time
 invested in fleshing them out would be well spent  would prevent a lot of
 questions like this.


 Patches welcome.

 Of course, Javadocs can always be improved, but your statement that they
 will prevent a lot of questions like this isn't necessarily true.  I've
 been on lots of mailing lists over the years and it doesn't matter how good
 the javadocs are, there are still questions.   Most people don't look at
 the javadocs.

 Did you actually read the entire javadoc?  The setStyle javadocs give you a
 link to the Session (class) javadocs.  These docs explain what style is and
 then give a long list of exactly how all the resources are loaded -
 including the style parameter and how it effects resource names.  If you
 see something that can be improved there, please by all means submit a
 patch or even an email that says please add such-and-such.

 --
 Jeremy Thomerson
 http://wickettraining.com
 *Need a CMS for Wicket?  Use Brix! http://brixcms.org*

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