Re: turning off page versioning

2014-09-24 Thread Jesse Long

On 24/09/2014 16:22, Garret Wilson wrote:

On 9/24/2014 9:26 AM, Martijn Dashorst wrote:
On Wed, Sep 24, 2014 at 2:13 AM, Garret Wilson 
gar...@globalmentor.com wrote:
I'm not denying that versioned pages may be a useful concept for 
some use

cases (even though I can't think of any offhand).

Persioning is a very useful concept and used in many applications. You
are just focussing on your particular use case for today and not
thinking of broader issues that we have tackled for about a decade.

Take google's search page with the pagination at the bottom. Click on
2, click on back. What do you expect? go back to the page before you
searched google? Or go back to page 1?




But note that in your example you're not talking about the version of 
the page. You're pointing to a /navigation control/, which of course 
I would expect to interact with navigation. Notice that when you page 
back and forth, you actually change the URL query (e.g. start=10). So 
you're not changing the version of the page---you're actually 
modifying the query you send to the page, and of course you can 
navigate among different page queries. In fact Wicket already has a 
totally separate mechanism for sending queries to pages through page 
parameters, exactly like Google is doing.


I am completely in favor of sending page query parameters in the URL 
when I want to specify what data should be retrieved from a query, and 
for the user to navigate among queries. But I still (in my use case) 
don't have a need for that same query page to be versioned.


Hi Garret,

(Side note: you probably should not be overriding isVisible(). Call 
setVisibilityAllowed() in onConfigure(). isVisible() is often called 
multiple times during a request cycle and, if expensive, can lead to 
some slowness.)


Page classes are mounted at a specific URL, not page instances. A page 
instance is made up of a component tree as well as page state - data 
stored in the component tree. When you request a mounted URL, you get a 
new page instance as created from that mounted page class. That is the 
basic contract of the mount. Serving up anything other than this would 
be incorrect, as it breaks the contract.


Humor me here. Please think of the page instance strictly as component 
tree and page state. Think of the page class as a starting point, a 
factory. If you create a new object from the class, you get a specific 
page instance (again, think component tree and page state).


Now, if the page state or component tree changes, the page instance is 
no longer that thing you would get if you created a new instance of 
that page class. It is a different beast now. The fact that this  
Wicket has no business serving up this beast when the user requested the 
mounted URL, aka that thing you would get if you created a new instance 
of that page class.


Every time the component tree or page state changes, it is no longer the 
same page. Because it is no longer the same page, the URL changes. This 
is where is helps to think of a page as a component tree and page state. 
Its not so much different versions of the same page, as much as 
different pages.


I'd like to point specifically to the impact of page state here. Being 
able to record state in the page object is one of the things that makes 
Wicket awesome, but it is not the only place to store state. You can 
also store state in the session, in a database, and in cookie, query and 
post parameters.


When Wicket talks about stateful pages, its talking about component tree 
and page state (the state stored in the component tree - the Page object 
being the root of the component tree). A Wicket page is stateful when it 
does, or could, change the component tree or PAGE state. When a page 
does not modify the PAGE state, then it is stateless in Wicket language 
(excuse the simplification).


Using stateless pages reading and writing state outside of the page 
object can get you most, if not all, of what you want.


Lets take your Facebook example:

1. Each time you go to https://www.facebook.com/jdoe, it would
   redirect you to https://www.facebook.com/jdoe?1;. Not if it was a
   stateless page.
2. Imagine if you clicked Like on somebody's picture, and it
   redirectred you to https://www.facebook.com/jdoe?3;. Again, not if
   it was a stateless page. Why should clicking Like change the page
   state or the component tree? In other words, why does this need to
   be a stateful link, why not use a StatelessLink? All the data of who
   likes what is not stored in PAGE state. It is stored in a database.
3. But it still kept https://www.facebook.com/jdoe?2 in memory, so
   that when you hit Back you'd see the picture before you liked
   it.. Again, stateless pages are not stored in the page store, so
   you would have a /jdoe?2 in memory. Also, whether or not you like a
   picture should not be pulled from page state, but from a database or
   cache somewhere. The page runs onConfigure each time before
   rendering, 

Re: on session expiry home page links behave differently than non home page links

2014-09-22 Thread Jesse Long
 it. The attacker gets you to click on a link 
like http://innocent/whatever;, which you dont realize redirects to 
http://nukesite/?0-1.ILinkListener-link;. You click on the innocent 
link and suddenly there are fireworks like 1999.


This only works if the attacker gets the page id and render count 
correct. In the example above, the page id is 0 and the render count is 
1. If either of these number are not correct, the page will just be 
rendered without the action having been taken, or is 
recreateMountedPageAfterExpiry is off, you will get page expired error.


Using the QueryParameterCryptoMapper class I attached to the ticket, 
these IRequestListener URL query parameters (like 
?0-1.ILinkListener-link) are encrypted on the home page and mounted pages.


If you do not use a unique encryption key per session, this does not 
help much, since the encrypted URL will be the same for all sessions. If 
the attacker manages to get the URL for another session, he can redirect 
you to the same encrypted URL, and you are still vulnerable.


However, you are using KeyInSessionSunJceCryptFactory, so each session 
has its own decryption key. That means that encrypted URLs obtained from 
one session will not be decryptable in a different session, and so not work.


Like you said, you were able to copy the URL from one browser into a 
different browser and it worked. The only way I can reproduce this is by 
copying the URL with the jsessionid in it. Before the servlet container 
has verified that cookies are working in your session, the session id is 
encoded in URLs. If you copy a URL that has the session id in it into a 
different browser, then the second browser will be seen as part of the 
same session - it identifies itself with the same session id.


Because both browsers are using the same session, they both use the same 
decryption key, so URLs from one browser can be decrypted by the other.


This is session fixation, almost not really CSRF. What is important to 
note here, is that the attacker is the one who started the session. He 
needed to start the session in order to obtain a valid link to send to 
you. He then sends the link to you with HIS session id encoded in the 
URL. If he has the link, he could just as well execute it himself, 
without needing to employ CSRF to get you to execute it. In other words, 
you execute the CSRF link in his session, with his privileges. It would 
be easier for him to just click the link himself. Same result.


The only thing I can see an attacker could gain here is if he sends you 
a link generated from his unauthenticated (and hence unprivileged) 
session, which you execute. If you then authenticate the session as 
yourself, he can continue using the same session id on his side, but now 
he has all your privileges. This is proper session fixation, and would 
work just as well if the link was to the home page.


You can avoid this by calling Session.replaceSession() BEFORE marking 
the session as authenticated during authentication. Normal defense 
against session fixation.


Thanks,
Jesse


On 18/09/2014 22:54, sgu...@osc.state.ny.us wrote:

Hello Jesse,

Thanks for the update.

I have updated the quick start with the following changes and is 
attached.




1. Setting inorg.apache.wicket.protocol.http.WebApplication#init() method

*super*.init();

getSecuritySettings().setCryptFactory(*new*KeyInSessionSunJceCryptFactory()); 



setRootRequestMapper(*new*CryptoMapper(getRootRequestMapperAsCompound(), 
*this*));


getApplicationSettings().setPageExpiredErrorPage(PageExpired.*class*);

getPageSettings().setRecreateMountedPagesAfterExpiry(*false*);

2. Removed the 404 mount in 
org.apache.wicket.protocol.http.WebApplication#init()


3. Removed /404 error page config from web.xml

4. Commented configureResponsePageExpired.class which was configured 
to 404 status



With the above changes I have noticed the following.

1. Home page urls are encrypted and XSRF safe (tested by copy pasting 
urls from home page in  different browser)


 The setting you recommended belows is actually playing a role 
in encrypting home page urls.


getPageSettings().setRecreateMountedPagesAfterExpiry(*false*);

If you  removed the above setting then your home page urls are exposed 
and XSRF vulnerable.


Please explain why this flag has a bearing on encrypting home page 
urls ?


2. On session expiry we click on any urls (home page/ non home page) 
we see a 404 NOT_FOUND.
 I understand from your pervious explanation that since urls are 
encrypted and session is unbound we get a 404.




 But my question still remains how to handle the above scenario 
where is user is redirected to SessionExpired Page on session expiry ?


 is there a explicit setting in wicket or some way where the user 
is redirected to SessionExpired Page on session expiry ?





/Thanks  Regards/
/Satish Gutta/




From: Jesse Long j...@unknown.za.net
To: users@wicket.apache.org
Date: 09/17/2014 04:35 PM

Re: on session expiry home page links behave differently than non home page links

2014-09-17 Thread Jesse Long

Hi Satish,

The problem here is that your quickstart uses the same page for page 
expired error and error 404.


PageExpired.STATUS_CODE is 404.

Your web.xml sets the 404 error page to /404, and you mount the 
PageExpired page as /404. You also set the PageExpiredErrorPage to 
PageExpired.


When your session expires, the decryption key is no longer available in 
the session, so the URL cannot be decrypted. This is because you are 
using KeyInSessionSunJceCryptFactory, which stores a new unique random 
decryption key in each session. When the session expires, a new session 
is created which in turn gets a new random decryption key. The new 
session's get cannot decrypt the encrypted URL which was encrypted with 
the old, expired session's key.


Because the URL cannot be decrypted, no IRequestMapper can map the URL 
to a IRequestHandler, and a 404 error results. So, you are not actually 
getting a page expired error, you are getting a 404 error. It looks the 
same to you because you are using the same page to display both errors.


The reason the home page links do not cause a 404 error is because the 
URL is not encrypted on the home page, at least not in this quickstart. 
(I know, I'll get back to you about the other issue you have). Because 
there is no encryption on the home page link, the link remains usable to 
wicket after the session has expired.


Wicket can see that you are trying to execute a callback link on the 
home page, because the URL is /?1-1.ILinkListener, but because the 
session has expired, page id 1 is no longer retrievable from the page 
store. However, because of the URL, wicket can tell that this was 
something to do with the home page, and just recreates a new instance of 
the home page and displays that to you.


You can control this behavior by calling 
getPageSettings().setRecreateMountedPagesAfterExpiry(false);


Cheers,
Jesse


On 17/09/2014 17:23, sgu...@osc.state.ny.us wrote:

Hello,

I am having a problem in dealing with Session expiry specifically when 
you click on a link in home page after session expiry.


The out come is you remain on home page, you are neither navigated to 
the link you clicked nor redirected to PageExpired page which is 
configured in


_org.apache.wicket.protocol.http.WebApplication#_init() _method_ _as_ 
_follows_


getApplicationSettings().setPageExpiredErrorPage(PageExpired.*class*);
mountPage(/+ PageExpired.STATUS_CODE, PageExpired.*class*);

With that said, the behavior is different when links on other pages 
(link in First Navigation page from quick start)

are clicked on session expiry, you actually hit PageExpired page.

Why is the behavior different for home page links compared to links on 
other pages when it comes to session expiry ?



I am attaching a quick start to support my explanation above.
Quick Start Application flow:
i. Hit root url http://localhost:8080 http://localhost:8080/, you 
will navigate to home page with a link to First Navigation page.

ii. In First Navigation Page we have a link to Second Navigation Page.
iii. In Second Navigation Page we have a link back to home page.




/Thanks  Regards/
/Satish Gutta/




Notice: This communication, including any attachments, is intended 
solely for the use of the individual or entity to which it is 
addressed. This communication may contain information that is 
protected from disclosure under State and/or Federal law. Please 
notify the sender immediately if you have received this communication 
in error and delete this email from your system. If you are not the 
intended recipient, you are requested not to disclose, copy, 
distribute or take any action in reliance on the contents of this 
information.



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




Re: Partially include JSP files into Wicket-HTML-Pages via Custom Tag

2014-08-29 Thread Jesse Long

Hi Tobias,

Nice work. BTW, you can do this to remove the ban on openclose tags:

@Override
protected void onComponentTag(final ComponentTag tag)
{
tag.setType(XmlTag.TagType.OPEN);
super.onComponentTag(tag);
}

Cheers,
Jesse


On 29/08/2014 10:53, Soloschenko, Tobias wrote:

Hello everyone,

because of some migrations I had to partially include JSP files into Wicket 
HTML Pages. I found a documentation for the prior 1.4 version of Wicket and 
some Stack Overflow posts about newer implementations (mentioned at the readme 
of the git repository).

I modified and improved it a little bit and made it work for wicket 6.16.0.

https://github.com/klopfdreh/wicket.jsp

Is there any other way to do this out of the box in Wicket 6.16.0?

kind regards,

Tobias





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



Re: Pagination in wicket

2014-06-27 Thread Jesse Long

Hi K,

I use this:


div class=btn-group
a wicket:id=firstPageLink class=btn 
btn-defaultspan class=glyphicon glyphicon-fast-backward/span/a
a wicket:id=previousPageLink 
class=btn btn-defaultspan class=glyphicon 
glyphicon-backward/span/a

/div
Page input type=text 
wicket:id=pageNumberInput style=margin: 0px; width: 45px; text-align: 
right; padding: 0px 4px; display: inline-block; class=form-control/

of span wicket:id=numberOfPages/span
div class=btn-group
a wicket:id=nextPageLink class=btn 
btn-defaultspan class=glyphicon glyphicon-forward/span/a
a wicket:id=lastPageLink class=btn 
btn-defaultspan class=glyphicon glyphicon-fast-forward/span/a

/div




final TextFieldLong pageNumberTextField = new 
TextFieldLong(pageNumberInput, new IModelLong()

{
@Override
public Long getObject()
{
return dataTable.getCurrentPage() + 1;
}

@Override
public void setObject(Long object)
{
if (object != null){
long v = object - 1;
if (v  dataTable.getPageCount() - 1){
v = dataTable.getPageCount() - 1;
}else if (v  0){
v = 0;
}
setCurrentPage(v);
}
}

@Override
public void detach()
{
}
}, Long.class)
{
@Override
protected void onConfigure()
{
super.onConfigure();

clearInput();
}
};

pageNumberTextField.add(new 
AjaxFormComponentUpdatingBehavior(change)

{
@Override
protected void onError(AjaxRequestTarget target, 
RuntimeException e)

{
pageNumberTextField.clearInput();
target.add(pageNumberTextField);
target.focusComponent(pageNumberTextField);
}

@Override
protected void onUpdate(AjaxRequestTarget target)
{
target.add(container); // container including 
navigation as well as data table

target.focusComponent(pageNumberTextField);
}
});

pageNumberTextField.setOutputMarkupId(true);
add(pageNumberTextField);

add(new AjaxFallbackLinkVoid(firstPageLink)
{
@Override
public void onClick(AjaxRequestTarget target)
{
setCurrentPage(0);
if (target != null){
target.add(container); // container including nav 
and data table

}
}

@Override
protected void onConfigure()
{
super.onConfigure();

setEnabled(dataTable.getCurrentPage()  0);
}
});

add(new AjaxFallbackLinkVoid(previousPageLink)
{
@Override
public void onClick(AjaxRequestTarget target)
{
long currentPage = dataTable.getCurrentPage();

if (currentPage  0){
setCurrentPage(currentPage - 1);
}

if (target != null){
target.add(container); // container including nav 
and data table

}
}

@Override
protected void onConfigure()
{
super.onConfigure();

setEnabled(dataTable.getCurrentPage()  0);
}
});

add(new AjaxFallbackLinkVoid(nextPageLink)
{
@Override
public void onClick(AjaxRequestTarget target)
{
long currentPage = dataTable.getCurrentPage();

if (currentPage  dataTable.getPageCount() - 1){
setCurrentPage(currentPage + 1);
}

if (target != null){
target.add(container); // container including nav 
and data table

}
}

@Override
protected void onConfigure()
{
super.onConfigure();

setEnabled(dataTable.getCurrentPage()  
dataTable.getPageCount() - 1);

}
});

add(new AjaxFallbackLinkVoid(lastPageLink)
{
@Override
public void onClick(AjaxRequestTarget target)
{
setCurrentPage(dataTable.getPageCount() - 1);

if (target != null){
target.add(container); // container 

Re: Pagination in wicket

2014-06-27 Thread Jesse Long

Oh, yes and...

response.render(new OnDomReadyHeaderItem($('# + 
pageNumberTextFieldId + ').keydown(function(event){if (event.which == 
13){event.preventDefault();$(this).blur();}});));
response.render(new OnDomReadyHeaderItem($('# + 
pageNumberTextFieldId + ').focus(function(){$(this).select();});));


in renderHead()

Cheers,
Jesse

On 27/06/2014 14:06, Jesse Long wrote:

Hi K,

I use this:


div class=btn-group
a wicket:id=firstPageLink 
class=btn btn-defaultspan class=glyphicon 
glyphicon-fast-backward/span/a
a wicket:id=previousPageLink 
class=btn btn-defaultspan class=glyphicon 
glyphicon-backward/span/a

/div
Page input type=text 
wicket:id=pageNumberInput style=margin: 0px; width: 45px; 
text-align: right; padding: 0px 4px; display: inline-block; 
class=form-control/

of span wicket:id=numberOfPages/span
div class=btn-group
a wicket:id=nextPageLink class=btn 
btn-defaultspan class=glyphicon glyphicon-forward/span/a
a wicket:id=lastPageLink class=btn 
btn-defaultspan class=glyphicon glyphicon-fast-forward/span/a

/div




final TextFieldLong pageNumberTextField = new 
TextFieldLong(pageNumberInput, new IModelLong()

{
@Override
public Long getObject()
{
return dataTable.getCurrentPage() + 1;
}

@Override
public void setObject(Long object)
{
if (object != null){
long v = object - 1;
if (v  dataTable.getPageCount() - 1){
v = dataTable.getPageCount() - 1;
}else if (v  0){
v = 0;
}
setCurrentPage(v);
}
}

@Override
public void detach()
{
}
}, Long.class)
{
@Override
protected void onConfigure()
{
super.onConfigure();

clearInput();
}
};

pageNumberTextField.add(new 
AjaxFormComponentUpdatingBehavior(change)

{
@Override
protected void onError(AjaxRequestTarget target, 
RuntimeException e)

{
pageNumberTextField.clearInput();
target.add(pageNumberTextField);
target.focusComponent(pageNumberTextField);
}

@Override
protected void onUpdate(AjaxRequestTarget target)
{
target.add(container); // container including 
navigation as well as data table

target.focusComponent(pageNumberTextField);
}
});

pageNumberTextField.setOutputMarkupId(true);
add(pageNumberTextField);

add(new AjaxFallbackLinkVoid(firstPageLink)
{
@Override
public void onClick(AjaxRequestTarget target)
{
setCurrentPage(0);
if (target != null){
target.add(container); // container including nav 
and data table

}
}

@Override
protected void onConfigure()
{
super.onConfigure();

setEnabled(dataTable.getCurrentPage()  0);
}
});

add(new AjaxFallbackLinkVoid(previousPageLink)
{
@Override
public void onClick(AjaxRequestTarget target)
{
long currentPage = dataTable.getCurrentPage();

if (currentPage  0){
setCurrentPage(currentPage - 1);
}

if (target != null){
target.add(container); // container including nav 
and data table

}
}

@Override
protected void onConfigure()
{
super.onConfigure();

setEnabled(dataTable.getCurrentPage()  0);
}
});

add(new AjaxFallbackLinkVoid(nextPageLink)
{
@Override
public void onClick(AjaxRequestTarget target)
{
long currentPage = dataTable.getCurrentPage();

if (currentPage  dataTable.getPageCount() - 1){
setCurrentPage(currentPage + 1);
}

if (target != null){
target.add(container); // container including nav 
and data table

}
}

@Override
protected void onConfigure()
{
super.onConfigure();

setEnabled

Re: Feedback panel title area

2014-04-28 Thread Jesse Long

On 25/04/2014 18:30, Entropy wrote:

I just tried putting some text inside the feedback panel's html like so:

div class=errorpanel id=errorpanel wicket:id=feedbackThis is a
test/div

That didn't work.  This is a test was overwritten when the feedback panel
rendered.  Which is exactly what I expected it to do.



Hi,

The text between the tags is called the body. When a Panel is rendered, 
the body of the tags to which the panel was bound (This is a test in 
your example) is ignored, and the associated markup is rendered instead. 
Associated markup is the markup provided by the Panel, that is shipped 
in an HTML file with the same name as the Panel's class, or super class.


There is nothing preventing you from subclassing FeedbackPanel, and 
providing very similar associated markup, just including a span 
wicket:id=myheading/span.


To override the associated markup provided by a Panel's parent (replace 
markup instead of extend it), you do this:


wicket:panel
here you must provide all the markup required by the Panel.
/wicket:panel

ie. Use wicket:panel instead of wicket:extend.

So, to get what you want, create a subclass of FeedbackPanel, called 
MyFeedbackPanel. Then, in MyFeedbackPanel.html, copy all the HTML from 
FeedbackPanel.html, and insert the label that you want to add. Then, in 
MyFeedbackPanel#onInitialize(), add the label as you normally would.


Cheers,
Jesse

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



Re: Strange issue with AJAX update + file download

2014-04-10 Thread Jesse Long

On 10/04/2014 12:53, Martin Grigorov wrote:

On Thu, Apr 10, 2014 at 1:44 PM, Ernesto Reinaldo Barreiro 
reier...@gmail.com wrote:


Hi,


On Thu, Apr 10, 2014 at 12:36 PM, Tobias Gierke 
tobias.gie...@voipfuture.com wrote:


Hi,

  Hi,



On Thu, Apr 10, 2014 at 1:13 PM, Tobias Gierke 
tobias.gie...@voipfuture.com


wrote:
Hi,

   What do you exactly mean by the rendering of the page after download


completed? You repaint a part of the screen via AJAX? And this is the
one
giving problem with images?

  Good point. I just investigated the AJAX response returned by the

server
when clicking the 'Start download' button on the modal dialog and I
noticed
that along with the JavaScript snippet that does the setTimeout(...)
there are also a lot of AJAX component updates that are obviously
generated
by components with overridden onEvent() methods. I didn't write the

code

so
I wasn't aware of this :/

I suspect that the issue I'm seeing is caused by the Wicket AJAX

library

being interrupted by the setTimeout() call while processing the
component
updates... proving this will unfortunately take some time since the

page

has a lot of different components that all override onEvent() ...

  JavaScript is single-threaded. There is no way to interrupt it.

By using setTimeout/setInterval functions you just add tasks to the

queue

that this single thread processes.


I stand corrected ;) But how come - given that  setTimeout() just adds a
task to some queue - the actual magnitude of the timeout has an effect

?

My queues are usually processed first-to-last ;)


Probably the time out just influence the download of images: e.g. maybe by
making

window.location.href=' + url + '\, 100);

You are telling the browser stop loading images, we are processing anew
document


There is still something unclear here - window.location.href is contributed
via target.appendJavaScript().
This means it is put into evaluate XML element in the Ajax response and
should be processed (sequentially!) later than the resource downloads by
Wicket.FunctionExecuter. I.e. the resources should fire their loaded
events before FunctionExecuter to move to the next task




Page locking maybe? Does the download lock the page for the duration of 
the download?


ajax get
ajax response
dom modified
browser starts downloading images in background, one (or a few) at a time
download of file starts (page is locked on server)
while file download is still busy, browser attempts to download other 
images. This may require page lock on server, which will make this 
request hang until file download is complete.


Maybe, instead of using AJAXDownload, make like:

new AjaxLink(link){
@Override
public void onClick(AjaxRequestTarget target){
// do whatever
target.add(...);

Application.get().getResourceReferenceRegistry().registerResourceReference(MyDownloadResourceReference.INSTANCE);

target.appendJavaScript(setTimeout(\window.location.href=' + 
urlFor(MyDownloadResourceReference.INSTANCE, null) + '\, 100););

}
};

public class MyDownloadResourceReference
extends ResourceReference
{
public static final MyDownloadResourceReference INSTACE = new 
MyDownloadResourceReference();


public MyDownloadResourceReference()
{
 super(MyApp.class, download-woteva);
}

@Override
public IResource getResource()
{
// return resource
}
}

You will need to have some sort of way of passing information from the 
page to the IResource about exactly what should be downloaded. You can 
do this with by storing temp info in the session (not so great), or by 
passing PageParameters in the urlFor() instead of null, and parsing them 
in the IResource.


HTH,
Jesse

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



Re: Best practice: JS/CSS library resource references

2014-03-25 Thread Jesse Long

Hi Sebastien,

Session overriding app defaults allows you to set a different theme for 
the session. Like a custom CSS for that session.


I'm talking about simple library settings objects, like yours I put in 
the previous mail and like Select2's etc.


I did not mean extending IJavaScriptLibrarySettings, just a brand new 
object that has methods like: getJQueryUICSSResourceReference() etc. I 
dont think it would be a good idea to start analyzing the class 
hierarchies of these settings objects.


I originally wanted to just raise awareness about the inability to have 
page specific customizations in most Wicket libraries out there. I was 
hoping to arrive at some kind of best practice for locating library 
settings, which allows for per page customizations. My idea was that 
each library, like yours for example, would implement it independently.


The more I think about it, the more it looks like a really good 
implementation will consist of too many parts for each library to 
implement independently.


Martin's last email looks like he would also like the solution to be a 
reusable one, so that all JS libraries can gain advantage of using the 
settings locator.


Last night I started working on some classes to implement just this idea 
in a re-usable way. Unfortunately, the code that came out was quite 
ugly. Just not a very neat solution. I'm going to continue working on 
this, and hopefully come up with something that is respectable. I'll 
create a github repo when I have something worthwhile.


I have another, similar idea which I did not discuss in the last email, 
but which I am now thinking of doing at the same time: It's becoming 
less and less accurate to say a JS library depends on JQuery. More often 
than not, a JS library depends on specific versions or version ranges of 
JQuery. I would like to be able to declare dependencies on JQuery, and 
provide a version range. All components etc that renderHead() can then 
specify which versions of JQuery they can work with, and I have a custom 
IHeaderResponseDecorator that records what different components wants, 
and during close() picks a version that will work with all the 
components on the page.


I think this, second idea will help with the concerns you raised. I 
haven't worked out exactly how I'm going to implement this yet, but I'm 
pretty sure it should be easy with subclassing HeaderItem and a custom 
IHeaderResponse. Will also implement some features from 
wicketstuff-jslibraries.


I'll post once I have some code to show.

Cheers,
Jesse

On 24/03/2014 16:46, Sebastien wrote:

Hi,

I like the idea too... Even, I am not sure to have understood the use-case
about the Session scope here, but I trust you :)

I've got one question...
Imagine you are supplying 2 libraries, plugin1 and plugin2 for instance

The libraries definitions would be
IPlugin1LibrarySettings extends IJavaScriptLibrarySettings
IPlugin2LibrarySettings extends IJavaScriptLibrarySettings

Then, you define you custom script like:
MyLibrarySettings extends JavaScriptLibrarySettings implements
IPlugin1LibrarySettings, IPlugin2LibrarySettings

By doing this, I *cannot* have the same getters for returning the plugin's
JavaScriptResourceReference, ie:
IPlugin1LibrarySettings#getPluginJavaScriptResourceReference
IPlugin2LibrarySettings#getPluginJavaScriptResourceReference

So, user wishing to provides its own library have to check all
IxxxLibrarySettings interfaces to not overlap an existing getter name, even
interfaces of satellite projects (but he will never do it of course...). Do
you see the point?

I think that, by writing a new strategy for loading/customizing javascript
library resource references, it would be nice to solve this question in the
meantime... (if you are waiting for my solution, I should tell you that I
do not have it yet! ;) )

What so you think?

Best regards,
Sebastien.


On Mon, Mar 24, 2014 at 12:12 PM, Martin Grigorov mgrigo...@apache.orgwrote:


On Mon, Mar 24, 2014 at 12:59 PM, Jesse Long j...@unknown.za.net wrote:


On 24/03/2014 12:05, Martin Grigorov wrote:


Hi Jesse,



On Mon, Mar 24, 2014 at 11:11 AM, Jesse Long j...@unknown.za.net

wrote:

  Hi All,

Wicket uses mostly ResourceReferences to render and manage the URLs for
CSS and JavaScript files to be included in the output.

When we use libraries like JQuery UI, Bootstrap etc, it is often a
requirement to allow the user to provide his own customized resource
references. Typically, our code that integrates Wicket with these
libraries
provides a settings object, which contains getters and setters for
resource references, as well as some other variables that manipulate

the

libraries behavior.

eg: https://github.com/sebfz1/wicket-jquery-ui/blob/master/
wicket-jquery-ui-core/src/main/java/com/googlecode/
wicket/jquery/core/settings/IJQueryLibrarySettings.java

I want to propose some behavior regarding these settings objects, which
will hopefully make our lives a little easier. Initially, I just

Best practice: JS/CSS library resource references

2014-03-24 Thread Jesse Long

Hi All,

Wicket uses mostly ResourceReferences to render and manage the URLs for 
CSS and JavaScript files to be included in the output.


When we use libraries like JQuery UI, Bootstrap etc, it is often a 
requirement to allow the user to provide his own customized resource 
references. Typically, our code that integrates Wicket with these 
libraries provides a settings object, which contains getters and 
setters for resource references, as well as some other variables that 
manipulate the libraries behavior.


eg: 
https://github.com/sebfz1/wicket-jquery-ui/blob/master/wicket-jquery-ui-core/src/main/java/com/googlecode/wicket/jquery/core/settings/IJQueryLibrarySettings.java


I want to propose some behavior regarding these settings objects, which 
will hopefully make our lives a little easier. Initially, I just want to 
generate discussion. We can talk and decide what is the best plan (or if 
any plan is needed).


At the moment, the general pattern I have observed is: Settings objects 
are configured on the Application. renderHead() retrieves the settings 
object from the Application, and uses the resource reference configured 
that settings object to render the header items. Sometimes, if there is 
no Application, or no settings object registered with the application, 
then the default resource references packaged with the wicket 
integration of the library are used.


The problem I have with this is that it only really allows for one set 
of resources references/settings per application. (Yes, I know 
wicket-bootstrap has theme providers etc, but I'm talking about your day 
to day Wicket/JS library integration that uses the pattern above). If 
you have page A and page B, which both use JQueryUI, for example, and 
both require *different* customized JQueryUI resource references, or 
each require different settings for the JQueryUI library, then it 
becomes complicated.


What I have been doing recently is this: settings object are 
Serializable. There are default settings if no settings object can be 
found. Settings objects can be registered to Application using MetaData 
pattern (saves us having to use a special type of Application), and, 
importantly, settings objects can also be registered to Pages, again 
using the MetaData pattern.


This way, you can have separate settings for each page, and have 
multiple pages using wildly different customizations of the library.


Basically, renderHead() code looks something like this:

renderHead(Component component, IHeaderResponse response)
{
MyLibrarySettings settings = MyLibrary.getSettings(component);

// render head using MyLibrary settings.
}

and you have helper methods like:

public class MyLibrary
{
private static final MetaDataKeyMyLibrarySettings key = ...;

public static void setApplicationSettings(Application app, 
MyLibrarySettings settings)

{
app.setMetaData(key, settings);
}

public static void setPageSettings(Page page, MyLibrarySettings 
settings)

{
page.serMetaData(key, settings);
}

public static void getSettings(Component component, 
MyLibrarySettings settings)

{
MyLibrarySettings settings = component.getPage().getMetaData(key);

if (settings == null){
settings = Application.get().getMetaData(key);
}

if (settings == null){
settings = getDefaultMyLibrarySettings();
}

return settings;
}
}

What do you all think?

Thanks,
Jesse

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



Re: CSRF protection and mounting pages

2013-09-18 Thread Jesse Long

Hi Andreas,

Try using this, in addition to normal CryptoMapper.

usage:

protected void init()
{
setRootRequestMapper(new CryptoMapper(getRootRequestMapper(), .));

mountPage();
mountPage();
mountPage();
mountPage();
mountPage();

setRootRequestMapper(new 
ListenerInterfaceCryptoMapper(getRootRequestMapper(), ));

}


Let me know if it works for you?

Cheers,
Jesse


import java.util.List;
import org.apache.wicket.Application;
import 
org.apache.wicket.core.request.handler.BookmarkableListenerInterfaceRequestHandler;
import 
org.apache.wicket.core.request.handler.ListenerInterfaceRequestHandler;

import org.apache.wicket.core.request.mapper.CryptoMapper;
import org.apache.wicket.request.IRequestHandler;
import org.apache.wicket.request.IRequestMapper;
import org.apache.wicket.request.Request;
import org.apache.wicket.request.Url;
import org.apache.wicket.util.IProvider;
import org.apache.wicket.util.crypt.ICrypt;
import org.apache.wicket.util.string.Strings;

public class ListenerInterfaceCryptoMapper
extends CryptoMapper
{
private final String parameterName;

public ListenerInterfaceCryptoMapperCryptoMapper(String 
parameterName, IRequestMapper wrappedMapper, Application application)

{
super(wrappedMapper, application);
this.parameterName = parameterName;
}

public ListenerInterfaceCryptoMapper(String parameterName, 
IRequestMapper wrappedMapper, IProviderICrypt cryptProvider)

{
super(wrappedMapper, cryptProvider);
this.parameterName = parameterName;
}

@Override
protected Url decryptUrl(Request request, Url encryptedUrl)
{
ListUrl.QueryParameter queryParameters = 
encryptedUrl.getQueryParameters();


if (queryParameters.size() == 1){
Url.QueryParameter param = queryParameters.get(0);

if (param.getName().equals(parameterName)  
Strings.isEmpty(param.getValue()) == false){
String decodedQueryString = 
getCrypt().decryptUrlSafe(param.getValue());


return new Url(encryptedUrl.getSegments(), 
Url.parse(decodedQueryString, 
encryptedUrl.getCharset()).getQueryParameters(), encryptedUrl.getCharset());

}
}

return encryptedUrl;
}

@Override
protected Url encryptUrl(Url url)
{
// no encrypting of segments
return url;
}

@Override
public Url mapHandler(IRequestHandler requestHandler)
{
Url url = super.mapHandler(requestHandler);

if (url.getQueryParameters().isEmpty()){
return url;
}

if ((requestHandler instanceof ListenerInterfaceRequestHandler) 
|| (requestHandler instanceof BookmarkableListenerInterfaceRequestHandler)){
Url encryptedUrl = new Url(url.getSegments(), 
url.getCharset());


encryptedUrl.addQueryParameter(parameterName, 
getCrypt().encryptUrlSafe(url.getQueryString()));


return encryptedUrl;
}else{
return url;
}
}
}


On 18/09/2013 14:48, Andreas Kappler wrote:
Thanks for pointing out that ticket. So as I see it, there is 
currently no easy way to secure pages from CSRF attacks if they are 
mounted. To be honest I find it a bit surprising that no one 
contributed a solution for this common problem.


I will probably go for the solution with redirects instead of mounting 
pages, it seems to me to be the safest way.


Am 18.09.2013 14:08, schrieb Martin Grigorov:

Check https://issues.apache.org/jira/browse/WICKET-5326
It talks about similar things


On Wed, Sep 18, 2013 at 3:03 PM, Andreas Kappler 
andreas.kapp...@jato-consulting.de wrote:


Hi Martin,

thanks for your answer. I tried that and I am not sure if I did 
something
wrong, but still the URLs generated for posting forms are not 
encrypted.


For example I have a page that contains a form to change the user's
password and I want the page to be available as /changePassword. Now 
if the

user submits the form, the form's action points to /changePassword?xyz,
which makes it open to CSRF.

Best Regards,
Andreas

Am 18.09.2013 13:09, schrieb Martin Grigorov:


Hi,

You can extend CryptoMapper and setup it as root mapper.
In your custom CryptoMapper you can override Url mapHandler(final
IRequestHandler requestHandler). If the passed requestHandler is
IPageClassRequestHandler then you can call #getPageClass() on it and
decide
whether to encrypt the Url or not. For all other IRequestHandlers - 
always

encrypt.


On Wed, Sep 18, 2013 at 11:43 AM, Andreas Kappler 
andreas.kappler@jato-**consulting.de 
andreas.kapp...@jato-consulting.de

wrote:

  Hi!

I am currently looking into making our Wicket applications CSRF safe.
From
my understanding the CryptoMapper is the way to go, and I was able 
to set

it up working successfully.

There are however several mounted pages in the applications (with
WebApplication.mountPage), where the URLs should not be encrypted. 
This

also works 

Re: Wicket: DropDownChoice onChange open response page in right frame

2013-08-07 Thread Jesse Long

Hi Jeremie,

You can use javascript:

target.appendJavascript(top.frames['myframename'].location=' + 
urlFor(TraineeView.class,pageParamaters) + ';);


Cheers,
Jesse

On 07/08/2013 13:09, Jeremie wrote:

Hello,

In my research project, I need to create a combo box with a list of choices.
I use AJAX and DropDownChoice to perform some action on selection change. My
application is based on the frames example on Wicket's website:
http://www.wicket-library.com/wicket-examples/frames/

When the user selects a choice in the combo box, I use PageParameters to
pass in the value of the selected choice to another Java/Wicket class I
created that will query values from a db based on the selected value and
will create a Highcharts graph in the right frame (the main frame).

At this point, when I change the combo box selection, the graph opens, but
in the left frame (or left menu bar if you prefer) instead of the main body
(right frame). With anchor tags, I can specify the HTML target attribute
with the value right ( /a # ) and this ensures my response page opens
in the right frame, but my dropdown choices are not links.

Here is my code that calls the response page with the parameters (ddSkills
is a DropDownChoice object):

// pass selected skill value on to graph page
 ddSkills.add(new AjaxFormComponentUpdatingBehavior(onchange) {
 @Override
 protected void onUpdate(AjaxRequestTarget target) {
 PageParameters pageParameters = new PageParameters();
 pageParameters.add(skill, selectedSkill);
 setResponsePage(TraineesView.class, pageParameters);
 }
 });

My questions is: how can I tell Wicket I want the response page to open in a
new tab, or in my case the right frame, using PageParameters, or any other
way I might not have figured out? Is is feasible using the values of a combo
box or should I try using RepeatingView or ListView to make my options
links, in which case I could perhaps add the target attribute.

Thanks for your help,

Jeremie




--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-DropDownChoice-onChange-open-response-page-in-right-frame-tp4660763.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: Inmethod Grid on IE9

2013-07-23 Thread Jesse Long

Hi Jose,

I too had the same issue, and I also dont know how to fix it. Please let 
us know what you did to get it to work.


My work around is to set this for IE 9 only:

overflow-y: hidden;
overflow-x: scroll;

If there is a better solution, please let us know.

Thanks,
Jesse


On 18/07/2013 17:10, Dan Simko wrote:

Hi, my IE has the same problem. But unfortunately I do not have any idea
how to fix (except to remove horizontal scrollbar).


On Thu, Jul 18, 2013 at 5:02 PM, Jose Mauricio Meraz Mercado 
jmm...@gmail.com wrote:


It seems there was something wrong with my IE, now it is working fine

Thanks


2013/7/12 Jose Mauricio Meraz Mercado jmm...@gmail.com


Hi,

Currently on the application we are developing we are using InMethod
grids, when those grids have a horizontal scroll bar there is a strange
behavior that makes the div that has the contents grow when you select

text

or when you select a record on the grid.

This behavior can be reproduced on
http://www.wicket-library.com/inmethod-grid/data-grid/simple (the
horizontal scroll bar has to be present, just passing the mouse on the

rows

will cause the navigation bar to be pushed below). IE8, Firefox and

Chrome

this works fine

We found this on the wicketstuff project with something similar to what

we

have, but the solution provided doesn't work:
https://github.com/wicketstuff/core/issues/44

Has anyone experienced and resolved this?

Thanks for any help

We are using Wicket 1.4.19 and Inmethod-grid 1.4.9.1




--
El conocimiento es poder




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



Re: Feedback message is not available for behaviors added to nested form components

2013-07-03 Thread Jesse Long

Hi James,

This is a shortened list of events happening, including only the ones 
affecting you. They are in the order in which they occur.


 * IFormSubmitListener#onFormSubmitted()
 * ListView#onBeforeRender()
 * Page#onRender()

ListView#onBeforeRender() calls ListView#onPopulate(). If you are not 
using ListView#setReuseItems(true), then ListView#onPopulate() removes 
all children of ListView and re-creates them.


So, the children of ListView that are present during Page#onRender() are 
not the same children that were present during 
IFormSubmitListener#onFormSubmitted(), and hence not the same children 
that had the feedback messages.


Cheers,
Jesse

On 03/07/2013 02:35, James Selvakumar wrote:

No.


On Tue, Jul 2, 2013 at 7:04 PM, Sven Meier s...@meiers.net wrote:


Are you using listView.setReuseItems(true) ?

Sven


On 07/02/2013 11:13 AM, James Selvakumar wrote:


Hi all,

I've the following component heirarchy:

form:textField
form:listView:panel-1:**panel1DropDownChoice
form:submitButton

I've marked the all the form components as required.

I also have a behavior that is added to all the form components (via
IVisitor) which will make the respective feedback messages appear under
the
form components.

It works perfectly for the form component texField which is directly
attached to the form.

However it doesn't work for for panel1DropDownChoice.

I've added some debug messages in the validate() method of
panel1DropDownChoice and found that feedback messages are indeed
generated.

However from the debug messages in my behavior, I found that feedback
messages were some how lost.

This is the behavior I'm using. (Thanks London Wicket users)

*public class ValidationMsgBehavior extends Behavior

{
  private static Logger logger =
LoggerFactory.getLogger(**ValidationMsgBehavior.class);

  @Override
  public void afterRender(Component c)
  {
  logger.debug(Preparing to add validation msg for the component
{}, c);
  FormComponent fc = (FormComponent) c;
  if (!fc.isValid()) {
  String error;
  if (fc.hasFeedbackMessage()) {
  logger.debug(Form component {} has feedback messages,
fc);
  error =
fc.getFeedbackMessages().**first(FeedbackMessage.ERROR).**
getMessage().toString();
  } else {
  error = Your input is invalid.;
  }
  fc.getResponse().write(
  div class=\text-error\ + error + /div);
  }else{
  logger.debug(Form component {} is valid, fc);
  }
  }
}*

Any clues? I've been trying to crack this for a whole day.



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








Re: How to dynamically add a hyperlink (BookmarkablePageLink) to DefaultDataTable that is rendered as an anchor

2013-06-17 Thread Jesse Long

Hi David,

The IColumn#populateItem method populates a cell in the HTML table. It 
is as if you are adding your components to markup like this:


td wicket:id=xyz/td

If you have that, and you do:

add(new LinkVoid(xyz){...});

then you will have the same results. Why? Because Link was not designed 
to be added to td markup. Actually, it can be added to td, but then 
you get the onclick behaviour you are describing.


What the link Sven sent is trying to say is this: you cant add a Link 
directly to the cellItem. You must create an intermediate component, the 
example shows it as the LinkPanel. The LinkPanel is added to the td, 
and this works nicely. The link panel then makes a markup available, 
and you add the link to that.


I usually use an abstract LinkPanel that has one abstract factory method 
to create the link, so my populateItem method looks like:


cellItem.add(
// adding link panel to cell
new LinkPanelRowType(componentId, rowModel){
// link panel has abstract factory method for link
@Override
protected Component createLink(String componentId, IModelRowType 
model)

{
return new LinkRowType(componentId, model)
{
@Override
public void onClick()
{
getModel().doSomething();
setResponsePage();
}
}.setBody(Model.of(Whatever));
}
});

hth,
Jesse

On 14/06/2013 18:22, David Solum wrote:

I am using Wicket 6.8 and have a sortable DefaultDataTable that gets its
columns programmatically.

The markup to get this table and the dynamically generated columns simple
(I've added spaces so it all shows):

  wicket:panel
  table wicket:id=dataTable border=0 cellpadding=1
cellspacing=1 width=90% / 
  /wicket:panel

All of the columns are generated from a passed in LinkedHashMap of labels
and attributes:

 for (EntryString, String entry : entrySet) {
 final String label = entry.getKey();
 final String attribute = entry.getValue();
 columns.add(new PsPropertyColumn(label, attribute) {

 @Override
 public void populateItem(Item cellItem, String componentId,
IModel model)
 {
 final Object modelObject = model.getObject();
 final Object value = PropertyResolver.getValue(attribute,
modelObject);
 // Add an edit link
 BookmarkablePageLink link = new ...;
 ...
 cellItem.add(link);
 }
 }
 }

 DefaultDataTable table = new DefaultDataTable(dataTable, columns,
dataProvider, MAX_ROWS) {
 ...
 }
 add(table);

So this properly displays as a sortable table with clickable columns that
send the user to the required page.  However, as many posts have mentioned,
this is rendered as a cell with an onclick handler rather than an anchor (
a href=... /) tag. I want the anchor tag for a couple of reasons, one if
which is that I want to add my own onclick handler without having an
existing onclick handler in the way.

I have seen a solution that says to put an anchor tag inside a panel in the
HTML markup, and to add the link inside of a Panel subclass.  Sadly for me
the markup in the examples wasn't complete, and whatever I try (anchor tags,
tr/td tags, panel tags, etc.), I get the same error:

  Last cause: Close tag not found for tag:
. For Components only raw markup is allow in between the tags but not other
Wicket Component. Component: [DefaultDataTable [Component id = dataTable]]

Here is the simplest thing I've tried:

  wicket:panel
  table wicket:id=dataTable border=0 cellpadding=1
cellspacing=1 width=90%
  a href=# wicket:id=link /a
  /table
  /wicket:panel

Again, no success.  I would love to see markup that allows the
BookmarkablePageLinks be rendered insided the DefaultDataTable as anchor
tags.  Thanks in advance for any help.





--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/How-to-dynamically-add-a-hyperlink-BookmarkablePageLink-to-DefaultDataTable-that-is-rendered-as-an-ar-tp4659502.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: Is it possible to add a static prefix to the generated URL from CryptoMapper?

2013-06-04 Thread Jesse Long

Hi Magnus,

Sorry for replying so late, but I wanted to add a word of caution here.

There is a problem with Form#dispatchEvent() when you change the number 
of URL segments. I cant remember the exact details, but it has something 
to do with the Url#resolveRelative() or the call to it making 
assumptions about the number of url segments. You can trigger the event 
by using a DropDownChoice with Javascript (not AJAX) on change events.


Cheers,
Jesse

On 28/05/2013 17:12, Martin Grigorov wrote:

Hi Magnus,

At the moment this doesn't seem to be very easy because #encryptUrl() and
#decryptUrl() methods are private..
If they were protected then it would be quite easy to extend the class and
provide your own #mapHandler() / #mapRequest() methods which decide
themselves what to encrypt/decrypt.
Feel free to file a ticket for improvement for this.

At the moment you can use your own root request mapper that wraps
CryptoMapper and removes/prepends user segment in the beginning of the
url for IPageClassRequestHandlers.



On Tue, May 28, 2013 at 5:52 PM, Magnus K Karlsson 
magnus.r.karls...@gmail.com wrote:


Hi!

I'm successfully testing CryptoMapper in Apache Wicket 6 with unique URL
for each Session. But I'm also depending on to be able to define security
constaint in the web.xml.

 security-constraint
 web-resource-collection
 web-resource-nameexample-wicket/web-resource-name
 url-pattern/user/*/url-pattern
 /web-resource-collection

 auth-constraint
 descriptionThese are the roles who have access./description
 role-nameROLE_USER/role-name
 role-nameROLE_ADMIN/role-name
 /auth-constraint
 /security-constraint

So my question is it possible to prefix predefined classes with
CryptoMapper?

Example

I used to mount pages with mountPage(/user/ + Foo.class.getSimpleName(),
Foo.class);

which resulted in URL: http://localhost:8080/example-wicket/user/Foo

now I would like to decrypt Foo and it's possible page parameters, but not
'user', e.g.


http://localhost:8080/example-wicket/user/o9SSJ_GJqmO_wPa3pBY9hhdoDOXrAjrVc8kgLXVijrc6zKG3_zokAWSik-hyrZBXM4h5Qc2JOn0WfAGPQo8eYA/o9Sc8/Jqme5/9SS98

--
Best Regards
Magnus K Karlsson

Mobile: +46 (0)70 218 00 84
Email: magnus.r.karls...@gmail.com
Blog: magnus-k-karlsson.blogspot.com




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



Re: Wicket RepeatingView refresh / rerender ? Possibilities? [List items missing]

2013-05-08 Thread Jesse Long

Hi,

Just override RepeatingView#onPopulate() like this:

@Override
protected void onPopulate()
{
removeAll();
// TODO: populate items here, like:
// add(new Label(newChildId(), Date is:  + new Date().toString()));
}

Also may be a good idea to call onPopulate() from onInitialize(), like:

@Override
protected void onInitialize()
{
onPopulate();
}

Cheers,
Jesse

On 07/05/2013 14:59, DaWicketUser wrote:

Hi Community,

i got a little problem with my wicket application.

The problem is on a page called OverviewPage, here are some panels like the
ListPanel, in which my RepeatingView is.

This RepeatingView (List) got some items with a button for each item, if i
press the button, i will be redirected to another page (RegistationPage) and
some changes to the RepeatingView (list) are done.

If i now navigate back to the OverviePage with the RepeatingView (list), the
list is exactly the same like before. I did changes to the list items but
they are not visible. (I did not press the browser back button, i clicked a
link of my navigation)

I know instances of wicket pages last over the session... can i tell wicket
to rerender this page / list again? what possibilities are there? can anyone
help oder give advices?

Thanks

DaWicketUser



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-RepeatingView-refresh-rerender-Possibilities-List-items-missing-tp4658623.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: DataTable multiple sort columns

2013-04-30 Thread Jesse Long

Hi Lucio,

Its something I'd be interested in pursuing myself, but the real problem 
is how to display the sort state to the user. With single sort state, 
you just show an arrow next to the column used for sorting.


You could use a Palette type component as a top toolbar, allowing the 
user to add from available columns in the left to the sort columns in 
the right, and sort them in the order that they were added to the right 
hand side of the palette.


You dont need to use SortableDataProvider (which supports 
SingleSortState), you can use any subclass of ISortableDataProvider and 
you can support whatever ISortState you want.


Cheers,
Jesse

On 30/04/2013 18:48, Lucio Crusca wrote:

Hello *,

is there a way/what's the cleaner way to support multiple sort columns with
DataTable? I know it's up to the SortableDataProvider to provide sorted rows,
no matter how, but the SortParam class seems to support only one sort
criterium at a time. e.g. the DataTable is aware only of the *last* sorted
column. Even if I kept track of other columns (e.g. previously clicked for
sorting), I still have no clue about how to provide a visual feedback to the
user about what columns are being included in the sort criteria.






-
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: DataTable multiple sort columns

2013-04-30 Thread Jesse Long

Hi Lucio,

I like the idea of 3 states, ascending, descending and none for each 
column. You will need to create a new interface that extends 
ISortableDataProvider which provides a default sort order for when the 
user deselects all columns (you must always have some sort order, so 
when the user deselects all sorting, fall back to default).


All of this would not be possible with the existing header toolbar, but 
it would not be too difficult to implement an extended header toolbar to 
know about multiple sort columns, and render the sort state/priority of 
the column. I do think however that your header would be very busy.


How often are your users actually going to want to order by multiple 
fields? A hybrid approach might work better - normal single sort state 
from clicking on headers, or expand collapsible palette for complex 
sorting as is needed the added benefit here is that you can add features 
like add remove and reorder columns in this panel. I use a collapsible 
panel for filtering and it seems to work quite nicely.


Cheers,
Jesse

On 30/04/2013 19:44, Lucio Crusca wrote:

In data Tuesday 30 April 2013 19:14:12, Jesse Long ha scritto:

Hi Lucio,

Its something I'd be interested in pursuing myself, but the real problem
is how to display the sort state to the user.

How about this?

ascii-art font=monospaced

| |^ | ^ |   |
| Name  2 | Color  3 | Price | Available   1 |
|   v |  | v | v |

/ascii-art


That would mean the primary sorting is by availability descending (1), then by
name (2) descending and finally by color (3) ascending. Price is unsorted.
Clicking a column, instead of only toggling direction, could switch between
ascending, descending and unsorted. Clicking unsorted columns could make them
be the primary sort column and shift other sort columns priority by 1.

A more intuitive alternative would be to make the single arrows clickable, in
addition to columns names, and clicking columns names would only toggle
between sorted/unsorted states, with unsorted-sorted transition moving the
column to the primary sort criteria as above.

Would it be hard to obtain that with current wicket components?


You could use a Palette type component as a top toolbar, allowing the
user to add from available columns in the left to the sort columns in
the right, and sort them in the order that they were added to the right
hand side of the palette.

That's another way to do it. I don't like it very much to be honest, but I
guess it's only a matter of taste.


You dont need to use SortableDataProvider (which supports
SingleSortState), you can use any subclass of ISortableDataProvider and
you can support whatever ISortState you want.

Thanks for the hint, I hadn't realized that before.


-
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: AW: AW: DefaultDataTable will not render bottomtoolbar for export

2013-04-24 Thread Jesse Long

Hi Christoph,

Are the headers present in the CSV file? (No, indicates some sort of 
error generating the CSV, look at server logs. Yes, would indicate no 
records, but possibly error encountered after rendering headers, again, 
check server logs).


Are there records displayed in the HTML data table? If there are no 
records there, then none will be present in the exported CSV.


Thanks,
Jesse

On 24/04/2013 09:13, christoph.ma...@t-systems.com wrote:

Hello,

Now I can see the exporttoolbar but when I click the link the csv is empty. Why 
is that empty?

Here the code:
@Override
public void onSubmit(AjaxRequestTarget target, Form form) {
target.add(feedback);
FilterCreatorProtocol filter = 
(FilterCreatorProtocol)form.getModelObject();
if(ConsoleDataHandlerImpl.getInstance().queryProtocolRowsByFilter(filter) 
= MAX_SEARCH_RESULTS){
ListProtocolRecord protocolData = 
ConsoleDataHandlerImpl.getInstance().queryProtocolDataWithSearchFilter(filter);

target.add(ProtokollierungPage.this.get(searchTable).replaceWith(getSearchTable(protocolData)));
}else{
error(ErrorMessage);
}
}

private DefaultDataTable getSearchTable(ListProtocolRecord dataList) {
  DefaultDataTableProtocolRecord,String searchTable = new 
DefaultDataTableProtocolRecord, String(searchTable,getTableHead(),new 
ProtocolDataSortDataProvider(dataList),10);
  searchTable.setOutputMarkupId(true);
  searchTable.addBottomToolbar(new ExportToolbar(searchTable, new ModelString(Export 
to), new ModelString(export)).addDataExporter(new CSVDataExporter()));

  return searchTable;
}

ListIColumnProtocolRecord,String columns = new 
ArrayListIColumnProtocolRecord,String();
columns.add(new PropertyColumnProtocolRecord, String(new 
ResourceModel(protocolRecord.retentionID), retentionId, retentionId));
columns.add(new PropertyColumnProtocolRecord, String(new 
ResourceModel(protocolRecord.protocolID), protocolId, protocolId){
 @Override
 public void populateItem(ItemICellPopulatorProtocolRecord cellItem, 
String componentId, IModelProtocolRecord model)
 {
 cellItem.add(new ActionPanel(componentId, model));
 }
 });
columns.add(new PropertyColumnProtocolRecord, String(new 
ResourceModel(protocolRecord.externalID), externalId, externalId));
columns.add(new DatePropertyColumn(new 
ResourceModel(protocolRecord.eventTimestamp),eventTimestamp,eventTimestamp,dd.MM.
 HH:mm:ss));
columns.add(new PropertyColumnProtocolRecord, String(new 
ResourceModel(protocolRecord.integrationService),integrationService,integrationService));
columns.add(new PropertyColumnProtocolRecord, String(new 
ResourceModel(protocolRecord.endpoint),endpoint,endpoint));
columns.add(new PropertyColumnProtocolRecord, String(new 
ResourceModel(protocolRecord.endpointType),endpointType,endpointType));
columns.add(new PropertyColumnProtocolRecord, String(new 
ResourceModel(protocolRecord.messageStatus),messageStatus.description,messageStatus.description));


Mit freundlichen Grüßen
Christoph Manig
Systems Engineer

T-Systems International GmbH
Systems Integration - SC Travel, Transport  Logistics
Hoyerswerdaer Str. 18
01099 Dresden
tel.:   +49 (0) 351 / 8152 - 188
fax:+49 (0) 351 / 8152 - 209
email:  christoph.ma...@t-systems.com


-Ursprüngliche Nachricht-
Von: Manig, Christoph
Gesendet: Mittwoch, 24. April 2013 07:54
An: users@wicket.apache.org
Betreff: AW: AW: DefaultDataTable will not render bottomtoolbar for export

Hello,

now I see the Problem. Thank you for your help and sorry for my blindness.


Mit freundlichen Grüßen
Christoph Manig
Systems Engineer

T-Systems International GmbH
Systems Integration - SC Travel, Transport  Logistics Hoyerswerdaer Str. 18
01099 Dresden
tel.:   +49 (0) 351 / 8152 - 188
fax:+49 (0) 351 / 8152 - 209
email:  christoph.ma...@t-systems.com

-Ursprüngliche Nachricht-
Von: Jesse Long [mailto:j...@unknown.za.net]
Gesendet: Dienstag, 23. April 2013 15:57
An: users@wicket.apache.org
Betreff: Re: AW: DefaultDataTable will not render bottomtoolbar for export

Hi Christoph,

PropertyColumns are already exportable. Exportable means implements 
IExportableColumn.

Sven identified that the replaced data table does not have the export toolbar 
added to it. This is why it does not display after being replaced.

Cheers,
Jesse

On 23/04/2013 15:49, christoph.ma...@t-systems.com wrote:

Ok. Thanks for your answer.

Here are my columns:
ListIColumnProtocolRecord,String columns = new
ArrayListIColumnProtocolRecord,String();
columns.add(new PropertyColumnProtocolRecord, String(new
ResourceModel(protocolRecord.retentionID), retentionId, retentionId)); columns.add(new 
PropertyColumnProtocolRecord, String(new ResourceModel(protocolRecord.protocolID), protocolId, 
protocolId){
  @Override
  public void populateItem(ItemICellPopulatorProtocolRecord cellItem, 
String

Re: AW: AW: AW: DefaultDataTable will not render bottomtoolbar for export

2013-04-24 Thread Jesse Long
 property null? In the table this cell isn't empty and
in the markup the rows are rendered including their content. Here
is my
properties.xml:
!DOCTYPE properties SYSTEM
http://java.sun.com/dtd/properties.dtd;
properties
 !--entry key=/entry--
 entry key=app.titleSMW Protokollierung/entry
 entry key=nullBitte Wählen/entry
 entry key=nullValidBitte Wählen/entry

 entry key=contentHeaderProtokollierung/entry
 entry key=labelRetentionIDRetention-ID:/entry
 entry key=labelContentSearchNach Inhalt:/entry
 entry key=labelExtIDExternal-ID:/entry
 entry key=labelIntServiceIntegration Service:/entry
 entry key=labelServiceNameServicename:/entry
 entry key=labelZeitVonZeitraum von:/entry
 entry key=labelZeitBisbis:/entry
 entry key=labelSystemSystem:/entry
 entry key=labelStatusStatus:/entry
 entry key=labelServiceTypServicetyp:/entry


 !-- Datatable --
 entry key=datatable.no-records-foundKeine Einträge
vorhanden/entry
 entry key=datatable.export-to=Export toExport to/entry
 entry key=datatable.export-file-nameexport/entry
 entry key=NavigatorLabelAngezeigt werden die Einträge/entry
 entry key=protocolRecord.retentionIDRetention-ID/entry
 entry key=protocolRecord.protocolIDProtocol-ID/entry
 entry key=protocolRecord.externalIDExternal-ID/entry
 entry key=protocolRecord.eventTimestampEvent-Timestamp/entry
 entry
key=protocolRecord.integrationServiceIntegration-Service/entry
 entry key=protocolRecord.endpointEndpoint/entry
 entry key=protocolRecord.endpointTypeEndpoint-Typ/entry
 entry
key=protocolRecord.messageStatusMessage-Status/entry

/properties


Mit freundlichen Grüßen
Christoph Manig
Systems Engineer

T-Systems International GmbH
Systems Integration - SC Travel, Transport  Logistics
Hoyerswerdaer Str. 18
01099 Dresden
tel.:   +49 (0) 351 / 8152 - 188
fax:+49 (0) 351 / 8152 - 209
email:  christoph.ma...@t-systems.com


-Ursprüngliche Nachricht-
Von: Jesse Long [mailto:j...@unknown.za.net]
Gesendet: Mittwoch, 24. April 2013 10:10
An: users@wicket.apache.org
Betreff: Re: AW: AW: DefaultDataTable will not render
bottomtoolbar for export

Hi Christoph,

Are the headers present in the CSV file? (No, indicates some sort
of error generating the CSV, look at server logs. Yes, would
indicate no records, but possibly error encountered after
rendering headers, again, check server logs).

Are there records displayed in the HTML data table? If there are
no records there, then none will be present in the exported CSV.

Thanks,
Jesse

On 24/04/2013 09:13, christoph.ma...@t-systems.com wrote:

Hello,

Now I can see the exporttoolbar but when I click the link the
csv is

empty. Why is that empty?

Here the code:
@Override
public void onSubmit(AjaxRequestTarget target, Form form) {
   target.add(feedback);
   FilterCreatorProtocol filter =

(FilterCreatorProtocol)form.getModelObject();
if(ConsoleDataHandlerImpl.getInstance().queryProtocolRowsByFilter(
fi
lt
er)
= MAX_SEARCH_RESULTS){

   ListProtocolRecord protocolData =

ConsoleDataHandlerImpl.getInstance().queryProtocolDataWithSearchFi
lt
er
(filter);
target.add(ProtokollierungPage.this.get(searchTable).replaceWith
(g
et
SearchTable(protocolData)));

   }else{
   error(ErrorMessage);
   }
}

private DefaultDataTable getSearchTable(ListProtocolRecord
dataList)

{

   DefaultDataTableProtocolRecord,String searchTable = new

DefaultDataTableProtocolRecord,
String(searchTable,getTableHead(),new
ProtocolDataSortDataProvider(dataList),10);

   searchTable.setOutputMarkupId(true);
   searchTable.addBottomToolbar(new
ExportToolbar(searchTable, new ModelString(Export to), new
ModelString(export)).addDataExporter(new
CSVDataExporter()));

   return searchTable;
}

ListIColumnProtocolRecord,String columns = new
ArrayListIColumnProtocolRecord,String();
columns.add(new PropertyColumnProtocolRecord, String(new
ResourceModel(protocolRecord.retentionID), retentionId,

retentionId)); columns.add(new PropertyColumnProtocolRecord,
String(new ResourceModel(protocolRecord.protocolID),
StringprotocolId,
protocolId){

  @Override
  public void

populateItem(ItemICellPopulatorProtocolRecord cellItem, String
componentId, IModelProtocolRecord model)

  {
  cellItem.add(new ActionPanel(componentId, model));
  }
  });
columns.add(new PropertyColumnProtocolRecord, String(new
ResourceModel(protocolRecord.externalID), externalId,
externalId)); columns.add(new DatePropertyColumn(new
ResourceModel(protocolRecord.eventTimestamp),eventTimestamp,
e ve nt Timestamp,dd.MM. HH:mm:ss)); columns.add(new
PropertyColumnProtocolRecord, String(new
ResourceModel(protocolRecord.integrationService),integrationS
er vi ce ,integrationService)); columns.add(new
PropertyColumnProtocolRecord, String(new
ResourceModel(protocolRecord.endpoint),endpoint,endpoint))
; columns.add(new

Re: DefaultDataTable will not render bottomtoolbar for export

2013-04-23 Thread Jesse Long

Hi Christoph,

ExportToolbar#isVisible() is not visible in any of these conditions:

* There are no rows displayed (this is your case)
* There are no data exporters (this is not your case)
* There are no exportable columns (I dont know if this is your case)

If you want the export toolbar to be visible when there are no rows, 
please overload ExportToolbar#isVisible(), or file a Jira issue if you 
want that configurable.


Thanks,
Jesse


On 23/04/2013 14:54, christoph.ma...@t-systems.com wrote:

Hello,

I have a Problem with the DefaultDataTable and the Export csv. Here is my code:

DefaultDataTableProtocolSearchData,String searchTable = new 
DefaultDataTableProtocolSearchData, String(searchTable,getTableHead(),new 
ProtocolDataSortDataProvider(Collections.EMPTY_LIST),10);
searchTable.addBottomToolbar(new ExportToolbar(searchTable,new ModelString(Export to),new 
ModelString(export)).addDataExporter(new CSVDataExporter()));
searchTable.setOutputMarkupId(true);

add(searchTable);

This table will be replaced by submitting an AjaxFallbackButton, so that the 
DataProvider gets an list with some data and not an empty list. My Problem is 
that the bottomtoolbar for exporting a csv ist not rendered. The 
no-records-found toolbar will be rendered.

What is the problem here? Can anyone please help me?



Mit freundlichen Grüßen
Christoph Manig
Systems Engineer

T-Systems International GmbH
Systems Integration - SC Travel, Transport  Logistics
Hoyerswerdaer Str. 18
01099 Dresden
tel.:   +49 (0) 351 / 8152 - 188
fax:+49 (0) 351 / 8152 - 209
email:  christoph.ma...@t-systems.com







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



Re: AW: DefaultDataTable will not render bottomtoolbar for export

2013-04-23 Thread Jesse Long

Hi Christoph,

PropertyColumns are already exportable. Exportable means implements 
IExportableColumn.


Sven identified that the replaced data table does not have the export 
toolbar added to it. This is why it does not display after being replaced.


Cheers,
Jesse

On 23/04/2013 15:49, christoph.ma...@t-systems.com wrote:

Ok. Thanks for your answer.

Here are my columns:
ListIColumnProtocolRecord,String columns = new 
ArrayListIColumnProtocolRecord,String();
columns.add(new PropertyColumnProtocolRecord, String(new 
ResourceModel(protocolRecord.retentionID), retentionId, retentionId));
columns.add(new PropertyColumnProtocolRecord, String(new 
ResourceModel(protocolRecord.protocolID), protocolId, protocolId){
 @Override
 public void populateItem(ItemICellPopulatorProtocolRecord cellItem, 
String componentId, IModelProtocolRecord model)
 {
 cellItem.add(new ActionPanel(componentId, model));
 }
 });
columns.add(new PropertyColumnProtocolRecord, String(new 
ResourceModel(protocolRecord.externalID), externalId, externalId));
columns.add(new DatePropertyColumn(new 
ResourceModel(protocolRecord.eventTimestamp),eventTimestamp,eventTimestamp,dd.MM.
 HH:mm:ss));
columns.add(new PropertyColumnProtocolRecord, String(new 
ResourceModel(protocolRecord.integrationService),integrationService,integrationService));
columns.add(new PropertyColumnProtocolRecord, String(new 
ResourceModel(protocolRecord.endpoint),endpoint,endpoint));
columns.add(new PropertyColumnProtocolRecord, String(new 
ResourceModel(protocolRecord.endpointType),endpointType,endpointType));
columns.add(new PropertyColumnProtocolRecord, String(new 
ResourceModel(protocolRecord.messageStatus),messageStatus.description,messageStatus.description));

How can I make them exportable? What are exportable columns in Wicket?

At first the dataTable is empty, so the BottomToolbar shouldn't be rendered. 
That's right. But when it is replaced by an Ajaxbutton and there is some data 
in the dataTable the Bottomtoolbar isn't rendered.Why? Because of the 
non-exportable columns?


Mit freundlichen Grüßen
Christoph Manig
Systems Engineer

T-Systems International GmbH
Systems Integration - SC Travel, Transport  Logistics
Hoyerswerdaer Str. 18
01099 Dresden
tel.:   +49 (0) 351 / 8152 - 188
fax:+49 (0) 351 / 8152 - 209
email:  christoph.ma...@t-systems.com


-Ursprüngliche Nachricht-
Von: Jesse Long [mailto:j...@unknown.za.net]
Gesendet: Dienstag, 23. April 2013 15:43
An: users@wicket.apache.org
Betreff: Re: DefaultDataTable will not render bottomtoolbar for export

Hi Christoph,

ExportToolbar#isVisible() is not visible in any of these conditions:

* There are no rows displayed (this is your case)
* There are no data exporters (this is not your case)
* There are no exportable columns (I dont know if this is your case)

If you want the export toolbar to be visible when there are no rows, please 
overload ExportToolbar#isVisible(), or file a Jira issue if you want that 
configurable.

Thanks,
Jesse


On 23/04/2013 14:54, christoph.ma...@t-systems.com wrote:

Hello,

I have a Problem with the DefaultDataTable and the Export csv. Here is my code:

DefaultDataTableProtocolSearchData,String searchTable = new
DefaultDataTableProtocolSearchData,
String(searchTable,getTableHead(),new
ProtocolDataSortDataProvider(Collections.EMPTY_LIST),10);
searchTable.addBottomToolbar(new ExportToolbar(searchTable,new
ModelString(Export to),new
ModelString(export)).addDataExporter(new CSVDataExporter()));
searchTable.setOutputMarkupId(true);

add(searchTable);

This table will be replaced by submitting an AjaxFallbackButton, so that the 
DataProvider gets an list with some data and not an empty list. My Problem is 
that the bottomtoolbar for exporting a csv ist not rendered. The 
no-records-found toolbar will be rendered.

What is the problem here? Can anyone please help me?



Mit freundlichen Grüßen
Christoph Manig
Systems Engineer

T-Systems International GmbH
Systems Integration - SC Travel, Transport  Logistics Hoyerswerdaer
Str. 18
01099 Dresden
tel.:   +49 (0) 351 / 8152 - 188
fax:+49 (0) 351 / 8152 - 209
email:  christoph.ma...@t-systems.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





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



Re: AW: AW: DefaultDataTable will not render bottomtoolbar for export

2013-04-23 Thread Jesse Long
Because you replaced the data table to which the export toolbar was 
added with another data table, which has no export toolbar. A data table 
without an export toolbar will not render an export toolbar. If you want 
the export toolbar to render, you must add it to the data table being 
rendered.


On 23/04/2013 15:52, christoph.ma...@t-systems.com wrote:

But I added the Toolbar at the initial call oft he Webpage. Then I can submit 
the AjaxButton and some data is in the table. Why should I add the 
bottomtoolbar again? The no-record-found-toolbar will be rendered after the 
Ajaxcall. Why not the Exporttoolbar?


Mit freundlichen Grüßen
Christoph Manig
Systems Engineer

T-Systems International GmbH
Systems Integration - SC Travel, Transport  Logistics
Hoyerswerdaer Str. 18
01099 Dresden
tel.:   +49 (0) 351 / 8152 - 188
fax:+49 (0) 351 / 8152 - 209
email:  christoph.ma...@t-systems.com


-Ursprüngliche Nachricht-
Von: Sven Meier [mailto:s...@meiers.net]
Gesendet: Dienstag, 23. April 2013 15:44
An: users@wicket.apache.org
Betreff: Re: AW: DefaultDataTable will not render bottomtoolbar for export

Your replaced DataTable doesn't have a bottomtoolbar:

  
target.add(ProtokollierungPage.this.get(searchTable).replaceWith(
  new 
DefaultDataTableProtocolRecord,String(searchTable,
  getTableHead(),
  new 
ProtocolDataSortDataProvider(protocolData),
  100)));


Sven


On 04/23/2013 03:29 PM, christoph.ma...@t-systems.com wrote:

Hello,

here is the code of onSubmit method of the AjaxFallbackButton.

FormFilterCreatorProtocol protocollSearchForm = new 
FormFilterCreatorProtocol(protokollierungSucheForm, new 
CompoundPropertyModelFilterCreatorProtocol(new FilterCreatorProtocol()));
  protocollSearchForm.add(new
AjaxFallbackButton(submit,protocollSearchForm) {

  @Override
  public void onSubmit(AjaxRequestTarget target, Form form) {
  target.add(feedback);
  FilterCreatorProtocol filter = 
(FilterCreatorProtocol)form.getModelObject();
  
if(ConsoleDataHandlerImpl.getInstance().queryProtocolRowsByFilter(filter) = 
MAX_SEARCH_RESULTS){
  ListProtocolRecord protocolData = 
ConsoleDataHandlerImpl.getInstance().queryProtocolDataWithSearchFilter(filter);
  
target.add(ProtokollierungPage.this.get(searchTable).replaceWith(
  new 
DefaultDataTableProtocolRecord,String(searchTable,
  getTableHead(),
  new 
ProtocolDataSortDataProvider(protocolData),
  100)));
  }else{
  error(ErrorMessage);
  }


  }
  }) ;

Do you need some other informations?


Mit freundlichen Grüßen
Christoph Manig
Systems Engineer

T-Systems International GmbH
Systems Integration - SC Travel, Transport  Logistics Hoyerswerdaer
Str. 18
01099 Dresden
tel.:   +49 (0) 351 / 8152 - 188
fax:+49 (0) 351 / 8152 - 209
email:  christoph.ma...@t-systems.com

-Ursprüngliche Nachricht-
Von: Sven Meier [mailto:s...@meiers.net]
Gesendet: Dienstag, 23. April 2013 15:16
An: users@wicket.apache.org
Betreff: Re: DefaultDataTable will not render bottomtoolbar for export

Show us your #onSubmit(ART) ... formatted please.

Sven

On 04/23/2013 02:54 PM, christoph.ma...@t-systems.com wrote:

Hello,

I have a Problem with the DefaultDataTable and the Export csv. Here is my code:

DefaultDataTableProtocolSearchData,String searchTable = new
DefaultDataTableProtocolSearchData,
String(searchTable,getTableHead(),new
ProtocolDataSortDataProvider(Collections.EMPTY_LIST),10);
searchTable.addBottomToolbar(new ExportToolbar(searchTable,new
ModelString(Export to),new
ModelString(export)).addDataExporter(new CSVDataExporter()));
searchTable.setOutputMarkupId(true);

add(searchTable);

This table will be replaced by submitting an AjaxFallbackButton, so that the 
DataProvider gets an list with some data and not an empty list. My Problem is 
that the bottomtoolbar for exporting a csv ist not rendered. The 
no-records-found toolbar will be rendered.

What is the problem here? Can anyone please help me?



Mit freundlichen Grüßen
Christoph Manig
Systems Engineer

T-Systems International GmbH
Systems Integration - SC Travel, Transport  Logistics Hoyerswerdaer
Str. 18
01099 Dresden
tel.:   +49 (0) 351 / 8152 - 188
fax:+49 (0) 351 / 8152 - 209
email:  christoph.ma...@t-systems.com





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


-
To unsubscribe, e-mail: 

Re: Deprecation of createLabelModel

2013-03-13 Thread Jesse Long

Hi Tron,

Would it not suffice to change PropertyColumn to implement 
IExportableColumnT, S, ? extends Object? This would make the return 
type of getDataModel() a IModel? extends Object, and IModelString 
will work.


Alternative is in Wicket 7, remove third type parameter for 
IExportableColumn, and make getDataModel() return IModel?. Downside of 
this is that you can never getDataModel().setObject(), but I dont think 
anyone does that anyways.


Cheers,
Jesse

On 13/03/2013 11:39, Tron Walseth wrote:

Hi

A bit of advice is needed;

The method createDataLabel of 
org.apache.wicket.extensions.markup.html.repeater.data.table.PropertyColumn is deprecated 
since 6.2.0, and the documentation advice is to use public IModelObject 
getDataModel(IModelT rowModel) instead.

We have overridden this method in some places, and in most cases, the method returns 
a ResourceModel (IModelString). When fixing deprecation warnings by changing 
the method name, the compiler complains that the return type is not correct.

The solution is fairly simple, just change the signature to
 @SuppressWarnings({ rawtypes, unchecked })
 @Override
 public IModel getDataModel(final IModelT rowModel){}

and everything works, but I don't like this solution. This is (in my book) not 
clean code.

I would like to know, is there anybody that have a better solution, and if not, is it 
possible to change the return value of getDataModel to IModel? ?

Yours
Tron
-
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: [ANN] wicketstuff-lazymodel

2013-03-08 Thread Jesse Long

OK, that sounds great.

Thanks Martin.

On 08/03/2013 14:33, Martin Grigorov wrote:

Hi,

Wicket 6.7.0 will be cut next Friday. Can you wait a bit more ?
I can build it this Sunday too.


On Thu, Mar 7, 2013 at 12:51 AM, Jesse Long j...@unknown.za.net wrote:


Hi All,

Please can we do a 6.6.0 release of wicketstuff... I'd love for LazyModel
to be on Maven Central.

Thanks,
Jesse


On 18/02/2013 19:30, Sven Meier wrote:


Hi all,

I've added a new module to wicketstuff:

LazyModel offers lazy evaluation of method invocations. It takes the best
from present solutions (safemodel and modelfactory) and improves on
reflection to support:

* arbitrary parameters
* generics
* collections
* interfaces

Two simple examples:

 IModelString model = model(from(a).getB().**
getStrings().get(key));

 new LazyColumnA, B(header, from(A.class).getB());

Read more here:

 
https://github.com/**wicketstuff/core/wiki/**LazyModelhttps://github.com/wicketstuff/core/wiki/LazyModel

Have fun
Sven

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







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



Re: [ANN] wicketstuff-lazymodel

2013-03-08 Thread Jesse Long

I can wait till 6.7.0. :-)

Cheers,
Jesse

On 08/03/2013 15:03, Martin Grigorov wrote:

:-)

I didn't understand which option you choose - to wait one more week or to
release 6.6.0 this weekend ?

On Fri, Mar 8, 2013 at 2:56 PM, Jesse Long j...@unknown.za.net wrote:


OK, that sounds great.

Thanks Martin.


On 08/03/2013 14:33, Martin Grigorov wrote:


Hi,

Wicket 6.7.0 will be cut next Friday. Can you wait a bit more ?
I can build it this Sunday too.


On Thu, Mar 7, 2013 at 12:51 AM, Jesse Long j...@unknown.za.net wrote:

  Hi All,

Please can we do a 6.6.0 release of wicketstuff... I'd love for LazyModel
to be on Maven Central.

Thanks,
Jesse


On 18/02/2013 19:30, Sven Meier wrote:

  Hi all,

I've added a new module to wicketstuff:

LazyModel offers lazy evaluation of method invocations. It takes the
best
from present solutions (safemodel and modelfactory) and improves on
reflection to support:

* arbitrary parameters
* generics
* collections
* interfaces

Two simple examples:

  IModelString model = model(from(a).getB().**

getStrings().get(key));

  new LazyColumnA, B(header, from(A.class).getB());

Read more here:

  
https://github.com/wicketstuff/core/wiki/LazyModelhttps://github.com/**wicketstuff/core/wiki/**LazyModel
https://github.com/**wicketstuff/core/wiki/**LazyModelhttps://github.com/wicketstuff/core/wiki/LazyModel
Have fun
Sven

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



  --**

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




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







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



Re: [ANN] wicketstuff-lazymodel

2013-03-06 Thread Jesse Long

Hi All,

Please can we do a 6.6.0 release of wicketstuff... I'd love for 
LazyModel to be on Maven Central.


Thanks,
Jesse

On 18/02/2013 19:30, Sven Meier wrote:

Hi all,

I've added a new module to wicketstuff:

LazyModel offers lazy evaluation of method invocations. It takes the 
best from present solutions (safemodel and modelfactory) and improves 
on reflection to support:


* arbitrary parameters
* generics
* collections
* interfaces

Two simple examples:

IModelString model = model(from(a).getB().getStrings().get(key));

new LazyColumnA, B(header, from(A.class).getB());

Read more here:

https://github.com/wicketstuff/core/wiki/LazyModel

Have fun
Sven

-
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: Redirect to login page on UnauthorizedActionException(Page,RENDER)

2012-12-11 Thread Jesse Long

Hi Paul,

Thanks for the reply. I think you are misunderstanding me. I have the my 
instantiation authorization working perfectly the way I want it. I now 
want my action (RENDER or ENABLE) authorization to work the same way.


IAuthorizationStrategy says yes or no to instantiations and actions.

If the question was instantiation and the answer was no, then 
IUnauthorizedComponentInstantiationListener can make a decision to 
possibly redirect to a login page.


If the question was action and the answer was no, then an 
UnauthorizedActionException is thrown. The IExceptionMapper is asked 
about what to do with the exception, and an access denied page is shown.


I dont think the IAuthorizationStrategy is the right place to be 
throwing redirect exception. If it was, the return type would be void 
and and it would either work or throw an exception. Also, it seems a 
shame to limit the use of IAuthorizationStrategy to components involved 
in the current request cycle, as would be the case if 
IAuthorizationStrategy threw redirect exceptions. You would not be able 
to get a target page/page class, check permissions, and enable/disable a 
link based on the answer.


Seems to me IExceptionMapper should make decisions about what to do, but 
the default implementation is very unfriendly towards being extended. 
Either that, or we need something like a IUnauthorizedActionListener.


For now I'm just going ahead with IExceptionMapper, copy and paste 
DefaultExceptionMapper...


Cheers,
Jesse

On 11/12/2012 18:28, Paul Bors wrote:

Maybe this helps you a bit more...

I have my own CompoundAuthorizationStrategy that in turn uses a few nested
IAuthorizationStrategy and one of them throws
RestartResponseAtInterceptPageException depending on the condition inside
isInstantiationAuthorized() similar to:

public boolean isInstantiationAuthorized(Class componentClass) {
 MySession session = MySession.session();
 ...
 // Page is the parent of all protected pages
 if(componentClass.getAnnotation(Authenticate.class) != null) {
 User user = session.getUser();
 if(user == null) {
 throw new
RestartResponseAtInterceptPageException(MyApplication.myApp().getSignInPageC
lass());
 }
 }
 ...
}

For the above code I have my pages annotated with my own Authenticate but I
think you should be able to check the type of the componentClass for what
you want and etc.

~ Thank you,
   Paul Bors

-Original Message-
From: Jesse Long [mailto:j...@unknown.za.net]
Sent: Tuesday, December 11, 2012 2:30 AM
To: users@wicket.apache.org
Subject: Re: Redirect to login page on
UnauthorizedActionException(Page,RENDER)

Hi Paul,

Thanks for the reply. Yes, I only want to redirect to a login page on
UnauthorizedActionException when the component is an instance of Page and
the action as RENDER and when the session is not authenticated, so a custom
access denied page is not exactly what I'm looking for, but I could probably
make it work.

Cheers,
Jesse

On 10/12/2012 19:40, Paul Bors wrote:

Do you want to redirect to the Login page for all thrown
AccessDenied exceptions? Or just in some situations?

If you want to do it for all, then create your own WebPage for
AccessDeinedPage such as:

public class AccessDeniedPage extends WebPage {
  private static final long serialVersionUID = 1L;
  
  public AccessDeniedPage() {

  Session.get().warn(ResourceModel(access.denied));
  throw new
RestartResponseException(Application.get().getLoginPage());
  }
}

And inside your Application class in your init():

@Override
protected void init() {
  ...
  IApplicationSettings applicationSettings = getApplicationSettings();
  applicationSettings.setAccessDeniedPage(AccessDeniedPage.class);
  ...
}

There are other such exceptions which you can assign your own page
implementation, see the API for IApplicationSettings.

As for redirecting the user to your custom AccessDeined page (the
LoginPage) only under few circumstances, I haven't run into that need
yet so someone else could help you if you really need to do that.

~ Thank you,
Paul Bors

-Original Message-
From: Jesse Long [mailto:j...@unknown.za.net]
Sent: Monday, December 10, 2012 11:05 AM
To: users@wicket.apache.org
Subject: Redirect to login page on
UnauthorizedActionException(Page,RENDER)

Hi All,

I am using the authorization strategy to authorize viewing of pages by
checking if instantiation is allowed. If the session is not
authenticated, and if instantiation is not allowed, I redirect the
user to a login page using an IUnauthorizedComponentInstantiationListener.

I also check if the RENDER action is allowed using the authorization
strategy. At the moment, if the user tries to view a Page which he is
allowed to instantiate, but where the authorization strategy denies
RENDER permission (permissions configured for render/enable, but not
for instantiation), he gets a AccessDenied page

Redirect to login page on UnauthorizedActionException(Page,RENDER)

2012-12-10 Thread Jesse Long

Hi All,

I am using the authorization strategy to authorize viewing of pages by 
checking if instantiation is allowed. If the session is not 
authenticated, and if instantiation is not allowed, I redirect the user 
to a login page using an IUnauthorizedComponentInstantiationListener.


I also check if the RENDER action is allowed using the authorization 
strategy. At the moment, if the user tries to view a Page which he is 
allowed to instantiate, but where the authorization strategy denies 
RENDER permission (permissions configured for render/enable, but not for 
instantiation), he gets a AccessDenied page. In these situations, I also 
want to redirect the user to a login page if the session is not 
authenticated.


Would IExceptionMapper be the correct place to do this? If so, could we 
make DefaultExceptionMapper a bit easier to extend please?


Thanks,
Jesse

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



Re: Redirect to login page on UnauthorizedActionException(Page,RENDER)

2012-12-10 Thread Jesse Long

Hi Paul,

Thanks for the reply. Yes, I only want to redirect to a login page on 
UnauthorizedActionException when the component is an instance of Page 
and the action as RENDER and when the session is not authenticated, so a 
custom access denied page is not exactly what I'm looking for, but I 
could probably make it work.


Cheers,
Jesse

On 10/12/2012 19:40, Paul Bors wrote:

Do you want to redirect to the Login page for all thrown AccessDenied
exceptions? Or just in some situations?

If you want to do it for all, then create your own WebPage for
AccessDeinedPage such as:

public class AccessDeniedPage extends WebPage {
 private static final long serialVersionUID = 1L;
 
 public AccessDeniedPage() {

 Session.get().warn(ResourceModel(access.denied));
 throw new
RestartResponseException(Application.get().getLoginPage());
 }
}

And inside your Application class in your init():

@Override
protected void init() {
 ...
 IApplicationSettings applicationSettings = getApplicationSettings();
 applicationSettings.setAccessDeniedPage(AccessDeniedPage.class);
 ...
}

There are other such exceptions which you can assign your own page
implementation, see the API for IApplicationSettings.

As for redirecting the user to your custom AccessDeined page (the LoginPage)
only under few circumstances, I haven't run into that need yet so someone
else could help you if you really need to do that.

~ Thank you,
   Paul Bors

-Original Message-
From: Jesse Long [mailto:j...@unknown.za.net]
Sent: Monday, December 10, 2012 11:05 AM
To: users@wicket.apache.org
Subject: Redirect to login page on UnauthorizedActionException(Page,RENDER)

Hi All,

I am using the authorization strategy to authorize viewing of pages by
checking if instantiation is allowed. If the session is not authenticated,
and if instantiation is not allowed, I redirect the user to a login page
using an IUnauthorizedComponentInstantiationListener.

I also check if the RENDER action is allowed using the authorization
strategy. At the moment, if the user tries to view a Page which he is
allowed to instantiate, but where the authorization strategy denies RENDER
permission (permissions configured for render/enable, but not for
instantiation), he gets a AccessDenied page. In these situations, I also
want to redirect the user to a login page if the session is not
authenticated.

Would IExceptionMapper be the correct place to do this? If so, could we make
DefaultExceptionMapper a bit easier to extend please?

Thanks,
Jesse

-
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





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



Re: Why is SortParam.getProperty generic?

2012-11-18 Thread Jesse Long
I use sort parameters of type FieldTable where field is a meta data 
type describing a field in (or reachable through joins from) the table 
represented by the Table class.


My data provider then uses the currently selected Field to create the 
ORDER BY part of the SQL.


Cheers,
Jesse

On 17/11/2012 16:42, Sven Meier wrote:
It's just that some devs wanted to use other things than strings to 
identify the sort order:


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

Perhaps Jesse has an example?

Sven


On 11/17/2012 01:19 PM, Jochen Mader wrote:
SortParam.getProperty doesn't return a String butIt might be due to 
the fact that I am sick but I don't get why

  T.
So far I always used getProperty as vasis for a PropertyModel to 
resolve things.

Any hint would be appreciated,
Jochen

-
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





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



Re: need advice for wicket-plugin's implementation

2012-11-13 Thread Jesse Long

See CompoundClassResolver. Designed for this purpose.

On 12/11/2012 14:12, Martin Grigorov wrote:

Hi,

Since you use custom ClassLoaders you have to use custom IClassResolver too.


On Fri, Nov 9, 2012 at 5:22 PM, Decebal Suiu decebal.s...@asf.ro wrote:


Hi

I'm working to first version of wicket-plugin. I encounter some problems.
In few words I implemented a PluginManagerInitializer that create a
PluginManager, load and start the plugins from a directory
and store the plugin manager to application using wicket meta data.
Each plugin is loaded with a PluginClassLaoder.
I want to map each plugin's resources on ./plugin/plugin-name/...

My problem is how to create a reference to a plugin resource.

See this code:

 @Extension
 public static class HelloSection extends SimpleSection {

 public HelloSection() {
 //super(new ModelString(Hello), new
PluginResourceReference(HelloSection.class, settings.png));
 super(new ModelString(Hello), new
PackageResourceReference(HelloSection.class, settings.png));
 }

 }

In above code I want to add a new tab (section) to my TabbedPanel (I
created
a demo application with a tabbed panel and itabs from plugins)
but HelloSection.class is not visible to wicket (I retrieve a
CastClassException).
It seems to me that I cannot use ResourceReference in my case because
scope parameter (must be visible in wicket but I want something relative
to plugin baseResourcesPath).

Any advice how can I implement my idea is welcome.

Best regards,
Decebal




--
View this message in context:
http://apache-wicket.1842946.n4.nabble.com/need-advice-for-wicket-plugin-s-implementation-tp4653751.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: SortableDataProvider setSort default sort order

2012-11-12 Thread Jesse Long

Hi Steven,

The exact details of the sort order are up to you. SortableDataProvider 
doesn't actually do any sorting, it only provides the sort state methods 
to manage the *desired* sort order. You must still return the items in 
the correct order when the iterator() method is called.


Cheers,
Jesse


On 12/11/2012 07:22, steven.li wrote:

Hi all

what's the default sort order of SortableDataProvider ? such as , I have
column A,B,C, and I call

setSort(C, SortOrder.descending), then how it will return results if 10
rows with the same value C ?

that means, how to compare between column A and column B, which I didn't
specify in the setSort statement.

I asked this because I got two different result in paging view and
downloaded excel file, the paging view is based on SortableDataProvider, and
downloaded excel file is based on pure sql, which append order by at the
end of the sql.


thanks.



-
Steven Li

Skyworthglobal www.skyworthglobal.com
--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/SortableDataProvider-setSort-default-sort-order-tp4653782.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: Wicket CryptoMapper loses RequestParameters for HomePage (1.5-SNAPSHOT)

2012-11-06 Thread Jesse Long

On 05/11/2012 22:50, matmar wrote:

Hi!

We have a problem with using CryptoMapper, and a proposed fix. I'd like some
comments from this community regarding both the bug and the fix.

When CryptoMapper is used, query parameters are only found via
PageParameters, and not via RequestParameters, as expected.

Code to repro:
--code-
HomePage.java
  
 public HomePage(final PageParameters parameters) {

   add(new Label(version,
getApplication().getFrameworkSettings().getVersion()));
   add(new Label(fooFromPageParameters,
parameters.get(foo).toString(NOT_FOUND_FROM_PAGE_PARAMETERS)));
   add(new Label(fooFromRequestParameters,
getRequest().getRequestParameters().getParameterValue(foo).toString(NOT_FOUND_FROM_REQUEST_PARAMETERS)));
 }
  
HomePage.html
  
   div id=bd
  
Congratulations!


  pWicket version: wicket:container
wicket:id=version1.5-SNAPSHOT/wicket:container/p
  pFoo from Page parameters: wicket:container
wicket:id=fooFromPageParametersfooFromPageParametes/wicket:container/p
  pFoo from request parameters: wicket:container
wicket:id=fooFromRequestParametersfooFromRequestParameters/wicket:container/p
   /div
  
WicketApplication.java
  
public void init()

{
   super.init();
   //comment to get both parameters working
   setRootRequestMapper(new CryptoMapper(getRootRequestMapper(),
this));
  
}
  
When called with url http://localhost:8080/?foo=bar, and CryptoMapper is

enabled, the value for foo is not found via requestParameters.

code---

And then the proposed fix:
http://pastebin.com/dWdPhcLD




Hi matmar,

The problem is this: The request comes in with an unencrypted url, like: 
/?foo=bar. Then, the CryptoMapper encrypts this to something like: 
/kjhskfdjhfksd and redirects to this URL. Then, after the redirect, the 
request returned by Component.getRequest() is the Request containing the 
encrypted URL. Request.getRequestParameters() returns an adapter which 
works directly on the URL, and so does getQueryParamaters(). These are 
actually doing their jobs correctly, the problem is that the wrong 
Request is being returned by RequestCycle.get().getRequest().


This code should solve that:

CryptoMapper.java:
@Override
public IRequestHandler mapRequest(final Request request)
{
Url url = decryptUrl(request, request.getUrl());

if (url == null){
return wrappedMapper.mapRequest(request);
}

Request decryptedRequest = request.cloneWithUrl(url);

IRequestHandler requestHandler = 
wrappedMapper.mapRequest(decryptedRequest);


if (requestHandler == null){
return null;
}
/* we must not simply set the correct request here, because we are 
not sure
 * that a potential parent request mapper may select another, 
higher scoring,

 * request handler. */
return new RequestSettingRequestHandler(decryptedRequest, 
requestHandler);

}

private static class RequestSettingRequestHandler
implements IRequestHandler
{
private Request request;
private final IRequestHandler wrappedHandler;

public RequestSettingRequestHandler(Request request, 
IRequestHandler wrappedHandler)

{
this.request = request;
this.wrappedHandler = wrappedHandler;
}

public void respond(IRequestCycle requestCycle)
{
RequestCycle.get().setRequest(request);
wrappedHandler.respond(requestCycle);
}

public void detach(IRequestCycle requestCycle)
{
wrappedHandler.detach(requestCycle);
}
}


Having said all that, we should not be encrypting the URL for the home 
page, so we could simply change the beginning of 
CryptoMapper.encryptUrl() from:


/* this is probably a bug, mea culpa */
if (url.getSegments().isEmpty()  
url.getQueryParameters().isEmpty())

{
return url;
}

to:

if (url.getSegments().isEmpty())
{
return url;
}

Cheers,
Jesse

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



Re: format value missing in ConversionException thrown by wicket-datetime's DateConverter

2012-11-06 Thread Jesse Long

Hi Benedikt,

wicket-datetime implementation is much nicer, but requires the Joda Time 
dependency, which the wicket-extensions version is based on normal JDK API.


When JSR310 comes out in Wicket's minimum required Java version (Java 
8?) we can probably merge them.


Cheers,
Jesse

On 05/11/2012 13:40, Benedikt Schlegel wrote:

What I need is not what I want in this case.. I want to reuse wicket
components as much as possible. I don't want to reinvent the wheel.

In wicket, there are two separate, Date-specific TextField components:
- org.apache.wicket.extensions.markup.html.form.DateTextField
- org.apache.wicket.datetime.markup.html.form.DateTextField

Both use different DateConverters, to be located at:
- org.apache.wicket.util.convert.converter.DateConverter
- org.apache.wicket.datetime.DateConverter

The components in wicket-datetime are more convenient and powerful, so I'm
gonna use them. The only drawback I see is the spartanic
ConversionException, in which e.g. the dateformat information is missing.
The exception created by wicket-etensions's DateConverter holds that
information. So yes, I guess this is a break.


That also raises a much bigger question: Why is that legacy code (my guess)
in wicket-extensions still there? Why don't consolidate those two? As I see
it, same authors were working on both packages?


2012/11/5 Martin Grigorov mgrigo...@apache.org


Hi,

We follow users@ mailing list too :-)

Since
1) DateConverter is not final
2) the related methods in it are public, non-final
3) it is possible to register custom converter for Date.class in
ConverterLocator

I think you should be able to do what you need.
Are there any breaks ?

On Sun, Nov 4, 2012 at 1:59 PM, Simon B simon.bott...@gmail.com wrote:

Hi Benedikt

Should this be posted on the Forum for Wicket Core developers forum?

Simon



--
View this message in context:

http://apache-wicket.1842946.n4.nabble.com/format-value-missing-in-ConversionException-thrown-by-wicket-datetime-s-DateConverter-tp4653598p4653603.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




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





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



Re: something similar with setOutputMarkupContainerClassName

2012-10-23 Thread Jesse Long

This was my solution, works for me:

public abstract class AbstractBodyTransformerBehavior
extends AbstractTransformerBehavior
{
protected abstract CharSequence transformBody(Component component, 
CharSequence body) throws Exception;


private static int indexOfCharacterInSequence(CharSequence 
haystack, char needle)

{
int max = haystack.length();

for (int i = 0; i  max; i++){
if (haystack.charAt(i) == needle){
return i;
}
}

return -1;
}

private static int lastIndexOfCharacterInSequence(CharSequence 
haystack, char needle)

{
int max = haystack.length();

for (int i = (max - 1); i = 0; i--){
if (haystack.charAt(i) == needle){
return i;
}
}

return -1;
}

@Override
public CharSequence transform(Component component, CharSequence 
output) throws Exception

{
int bodyStart = indexOfCharacterInSequence(output, '') + 1;

int bodyEnd = lastIndexOfCharacterInSequence(output, '');

if (bodyStart  1 || bodyEnd  0){
throw new WicketRuntimeException(Unable to find body for 
component:  + output);

}

StringBuilder sb = new StringBuilder(output.length());

sb.append(output.subSequence(0, bodyStart));

sb.append(transformBody(component, 
output.subSequence(bodyStart, bodyEnd)));


sb.append(output.subSequence(bodyEnd, output.length()));

return sb;
}
}


On 23/10/2012 11:04, Martin Grigorov wrote:

You just need to put something after the first closing tag and before
the last opening one.

For the first case it is something like (not tested, and better use
compiled Pattern):

String replaced = original.replaceAll(^(.*?])(.*), $1+theComment + $2);

Once again I agree that having the two additional methods in
Behavior.java will simplify these use cases.

On Tue, Oct 23, 2012 at 11:55 AM, Decebal Suiu decebal.s...@asf.ro wrote:

AbstractTransformerBehavior can be a solution but I must parse the output to
retrieve the component tag body. For a particular situation (Jesse Long
situation) to parse the output it's not a big deal but in my situation
(something general for all my markup containers) I don't see a solution.
Maybe I suppose that all my container markups are divs (div .../div). Is
it an util class in wicket that can help me with the parsing operation? I
want to retrieve the component tag body only.

Best regards,
Decebal



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/something-similar-with-setOutputMarkupContainerClassName-tp4653202p4653252.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: Behavior modifying component body

2012-10-19 Thread Jesse Long

Hi Martin, Sven,

Thank you both for your feedback.

I had not tried AbstractTransformerBehavior because I didn't know about 
it, and because when I looked at the Behavior API it was clear that 
there was no way for any Behavior to modify ONLY the body.


Having said that, I have done some tests with 
AbstractTransformingBehavior. The problem with it is that it gives me 
the the output for the whole component, not just the body. I would still 
need to parse that output in order to insert content into the body, but 
it is workable.


I can solve my problem by parsing the output with 
AbstractTransformingBehavior and inserting some html after the opening tag.


Thanks again for your feedback,
Jesse

On 19/10/2012 15:56, Sven Meier wrote:
Why should we introduce a new API to just render *before* and *after* 
the body?
AbstractTransformerBehavior offers a solution for this and allows you 
to do even more with the body.


Best regards
Sven

On 10/19/2012 11:19 AM, Martin Grigorov wrote:

Another way is by using BorderBehavior.
See org.apache.wicket.examples.forminput.BeforeAndAfterBorder for an 
example.

The drawback here is that you will need an additional .java + .html
pair for each icon type and you'll need to apply it on the
Link/Button's label, so you cannot use AbstractLink#setBody(IModel)
:-/

On Fri, Oct 19, 2012 at 9:37 AM, Martin Grigorov 
mgrigo...@apache.org wrote:

Hi Jesse,

I see what you mean and I agree it will work and will be a simple
solution for such requirements.
My only concern is that the API of Behavior becomes bigger and
component rendering will do some more things. Most of the time these
methods will do nothing.

Have you considered using
org.apache.wicket.markup.transformer.AbstractTransformerBehavior for
this ?
I see how this is more cumbersome too:
- you will need to inject some markup in another markup
- you will need to add two behaviors to the component (I guess you use
ButtonBehavior from wicket-bootstrap already)

P.S. I've included dev@ so more Wicket devs can give their opinion 
on this.


On Thu, Oct 18, 2012 at 11:27 PM, Jesse Long j...@unknown.za.net 
wrote:

Hi Wicket Community,

I would like to modify the body of a Component from a Behavior.
Specifically, I want to add:

i class=icon icon-calendar/i

To the beginning of the of the body of a link, eg:

a href=#[here] Some other body/a

I dont want to extend AbstractLink etc, I want to add this 
functionality as

a Behavior.

I cannot see a way to do this without modifying Behavior and 
Component. Am I
missing something? Is there a way I can do this without patching 
the code?


If not, if we must modify the code, how about the patch at the 
bottom of

this mail?

1. Behavior gets two new methods, onBeforeComponentTagBody and
onAfterComponentTagBody, similar to onComponentTag.
2. These new methods take a ComponentTag argument. Is it conceivable
that the behavior will need to mess around with the ComponentTag,
especially after renderComponentTag is already called?
3. The Behavior does not get the MarkupStream, because I image we dont
want the Behavior messing around with it?
4. I think its pretty safe to implement these calles in
Component#internalRenderComponent. It is usually called from
onRender(), and pretty much everything that overrides onRender 
calls

it. Right?
5. #internalRenderComponent calls onComponentTagBody inside a if
(tag.isOpen()){} block. Immediately there after, it closes the tag
in a separate if (tag.isOpen()){} block. This seems to insinuate
that there is a possibility of onComponentTagBody modifying the
ComponentTag in some way, possibly leaving is not open. I dont 
think

that that should happen, but if it does it could make the calls to
Bahavior#onAfterComponentTagBody invalid, especially if
Behavior#onAfterComponentTagBody appends HTML to the response. 
Thoughts?
6. I call Behaviour#onAfterComponentTagBody on the behaviors in 
reverse

order, so that we can have multiple behaviors that add content
before (open tag) and after (close tag) the body. It should be 
noted
that Component#notifyBehaviorsComponentRendered() does not do 
this,

which may lead to problems if the behaviors add content before and
after the component.

Thanks,
Jesse


diff --git 
a/wicket-core/src/main/java/org/apache/wicket/Component.java

b/wicket-core/src/main/java/org/apache/wicket/Component.java
index 26bd055..9495dae 100644
--- a/wicket-core/src/main/java/org/apache/wicket/Component.java
+++ b/wicket-core/src/main/java/org/apache/wicket/Component.java
@@ -22,6 +22,7 @@ import java.util.ArrayList;
  import java.util.Arrays;
  import java.util.Iterator;
  import java.util.List;
+import java.util.ListIterator;
  import java.util.Locale;

  import org.apache.wicket.ajax.IAjaxRegionMarkupIdProvider;
@@ -2530,9 +2531,27 @@ public abstract class Component
  // Render the body only if open-body-close. Do not 
render if

open-close

Re: [DISCUSS] Security Frameworks

2012-10-18 Thread Jesse Long
We use an in house designed system very similar to Shiro. The security 
framework only works on permissions (not roles), but the permissions 
that a user has depends on the roles they belong to (implementation 
detail the framework does not care about).


It also does not allow Shiro style string permissions, only a class 
hierarchy extending Permission.


Why? Because its a lot easier with only permissions, and only class 
hierarchy for permissions.


On 18/10/2012 06:08, Jeremy Thomerson wrote:

Our of curiosity: among the wider community: what security framework(s) do
you use with with Wicket, and why?

[  ] I use my own custom framework
[  ] I use Shiro
[  ] I use Spring Security
[  ] I use WASP/Swarm
[  ] Other (please specify)

And don't forget the why.




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



Behavior modifying component body

2012-10-18 Thread Jesse Long

Hi Wicket Community,

I would like to modify the body of a Component from a Behavior. 
Specifically, I want to add:


i class=icon icon-calendar/i

To the beginning of the of the body of a link, eg:

a href=#[here] Some other body/a

I dont want to extend AbstractLink etc, I want to add this functionality 
as a Behavior.


I cannot see a way to do this without modifying Behavior and Component. 
Am I missing something? Is there a way I can do this without patching 
the code?


If not, if we must modify the code, how about the patch at the bottom of 
this mail?


1. Behavior gets two new methods, onBeforeComponentTagBody and
   onAfterComponentTagBody, similar to onComponentTag.
2. These new methods take a ComponentTag argument. Is it conceivable
   that the behavior will need to mess around with the ComponentTag,
   especially after renderComponentTag is already called?
3. The Behavior does not get the MarkupStream, because I image we dont
   want the Behavior messing around with it?
4. I think its pretty safe to implement these calles in
   Component#internalRenderComponent. It is usually called from
   onRender(), and pretty much everything that overrides onRender calls
   it. Right?
5. #internalRenderComponent calls onComponentTagBody inside a if
   (tag.isOpen()){} block. Immediately there after, it closes the tag
   in a separate if (tag.isOpen()){} block. This seems to insinuate
   that there is a possibility of onComponentTagBody modifying the
   ComponentTag in some way, possibly leaving is not open. I dont think
   that that should happen, but if it does it could make the calls to
   Bahavior#onAfterComponentTagBody invalid, especially if
   Behavior#onAfterComponentTagBody appends HTML to the response. Thoughts?
6. I call Behaviour#onAfterComponentTagBody on the behaviors in reverse
   order, so that we can have multiple behaviors that add content
   before (open tag) and after (close tag) the body. It should be noted
   that Component#notifyBehaviorsComponentRendered() does not do this,
   which may lead to problems if the behaviors add content before and
   after the component.

Thanks,
Jesse


diff --git a/wicket-core/src/main/java/org/apache/wicket/Component.java 
b/wicket-core/src/main/java/org/apache/wicket/Component.java

index 26bd055..9495dae 100644
--- a/wicket-core/src/main/java/org/apache/wicket/Component.java
+++ b/wicket-core/src/main/java/org/apache/wicket/Component.java
@@ -22,6 +22,7 @@ import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Iterator;
 import java.util.List;
+import java.util.ListIterator;
 import java.util.Locale;

 import org.apache.wicket.ajax.IAjaxRegionMarkupIdProvider;
@@ -2530,9 +2531,27 @@ public abstract class Component
 // Render the body only if open-body-close. Do not render 
if open-close.

 if (tag.isOpen())
 {
+for (Behavior b : getBehaviors())
+{
+if (isBehaviorAccepted(b))
+{
+b.onBeforeComponentTagBody(this, tag);
+}
+}
+
 // Render the body. The default strategy will simply 
call the component's

 // onComponentTagBody() implementation.
getMarkupSourcingStrategy().onComponentTagBody(this, markupStream, tag);
+
+ListIterator? extends Behavior it = 
getBehaviors().listIterator();

+while (it.hasPrevious())
+{
+Behavior b = it.previous();
+if (isBehaviorAccepted(b))
+{
+b.onAfterComponentTagBody(this, tag);
+}
+}
 }

 // Render close tag
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/behavior/Behavior.java 
b/wicket-core/src/main/java/org/apache/wicket/behavior/Behavior.java

index c916b7d..d9ea133 100644
--- a/wicket-core/src/main/java/org/apache/wicket/behavior/Behavior.java
+++ b/wicket-core/src/main/java/org/apache/wicket/behavior/Behavior.java
@@ -182,6 +182,14 @@ public abstract class Behavior
 public void onComponentTag(Component component, ComponentTag tag)
 {
 }
+
+public void onBeforeComponentTagBody(Component component, 
ComponentTag tag)

+{
+}
+
+public void onAfterComponentTagBody(Component component, 
ComponentTag tag)

+{
+}

 /**
  * Specifies whether or not this behavior is temporary. Temporary 
behaviors are removed at the




Re: sicket 6 beta3 - wicket 6

2012-09-27 Thread Jesse Long

WebSession#authenticate() disappeared after 6.0.0-beta3. Affected me...

Cheers,
Jesse

On 27/09/2012 14:41, Douglas Ferguson wrote:

That may take some time, there are some layers..

I just was curious if there are any known issues from beta3 to the stable 
release.

Douglas

On Sep 27, 2012, at 7:36 AM, Thomas Götz t...@decoded.de wrote:


Please show us some code or create a Quickstart that demonstrates the problem, 
else it will be very hard to help you.


On 27.09.2012, at 14:23, Douglas Ferguson the...@gmail.com wrote:


I just tried to upgrade from beta3 to wicket 6 and one of my main pages blows 
up with a vengeance.

It's the typical error indicating that something is in the code but now the 
markup and it lists out almost every field!
You guys have any idea what might cause this?

Works fine under beta3...

Douglas



-
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





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



Re: MountedMapper and CryptoMapper

2012-08-06 Thread Jesse Long

Hi Josh,

On 06/08/2012 22:10, jchappelle wrote:

Currently I am using CryptoMapper for my application. It is installed in the
init method of my application like this: setRootRequestMapper(new
CryptoMapper(getRootRequestMapper(), this));. I need some of my pages to be
bookmarkable with a url like /abc. I was able to accomplish this by doing
this in my init method: getRootRequestMapperAsCompound().add(new
MountedMapper(/abc, AbcPage.class));


It may be easier to just do this:
mountPage(/abc, AbcPage.class);

It does the same thing with less typing.


My problem is that if I do it like that then the url's generated for any
clicks on that page are not encrypted. Ideally I would like the urls to be
encrypted. Is there any way around this? I'm sure it is possible to write an
IRequestMapper or extend MountedMapper but I'm not really sure how to go
about it.

Any ideas?


That is strange behaviour. Mounting pages should not affect the URLs 
generated for pages not handled by the MountedMapper for those mounted 
pages. I have tested, and 1.5.7 and 6.0.0-beta3 do not have this 
behaviour. Which version are you using?


It is very likely that links to mounted pages will be unencrypted, but 
link to other pages served from within a mounted page should be 
encrypted (unless those other pages are also mounted of course).


Do you perhaps have any other custom IRequestMappers installed, possibly 
overriding mapHandler()?


Cheers,
Jesse



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



Re: Wicket Layout Design

2012-07-23 Thread Jesse Long

On 19/07/2012 17:01, divad91 wrote:

Hi,

I am new to Wicket. I'm working on a multi province web application.
The goal is to use the same web application for all provinces.
CSS and some business logic will differ for each province.

I want to know the best ways to instantiate my layout components in my base
page.
(Using markup inheritance for page composition)

* Each layout component could be subclassed.

public  class BasePage extends WebPage {
public BasePage() { 
// Want to know the best way to instanciate
// HeaderXXX or HeaderYYY for example base on the province.
add(new Header());  
add(new SideBar());
add(new Footer());
}
}

My BasePage is in a common maven module.
Each province subclassed pages and components are in a different maven
module.

I read that using factories to instanciate components was not a good idea
(http://blog.comsysto.com/2011/05/09/apache-wicket-best-practices-2/)
Do you have a better approach to accomplish this?


Hi David,

Generally, you would use (potentially abstract) factory methods to 
create you overridable components.


So:

public abstract class BasePage
{
public BasePage(){}

// these are the factory methods to create the components.
// I like to use the prefix createNew, you can change.

protected abstract Component createNewHeader(String componentId);

protected abstract Component createNewSideBar(String componentId);

protected abstract Component createNewFooter(String componentId);

// Then add the components in onInitialize().
// onInitialize() is much under used. It allows us to call overridden method
// outside of the constructor.

@Override
public void onInitialize()
{
super.onInitialize();

add(createNewHeader(header));
add(createNewSideBar(sideBar));
add(createNewFooter(footer));
}
}

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



Re: Status of wicketstuff jquery integration

2012-05-09 Thread Jesse Long

Hi Hielke,

It seems I was using an outdated version of WiQuery (1.2.3), but even 
then, I cant reproduce the extra 10M.


It may be that I had the dependencies for WiQuery and something else 
added to the war at the same time, my apologies.


wiquery-core 1.5.5 (and dependencies) adds just over 2MB new quickstart. 
(Probably worth it).


Cheers,
Jesse

On 09/05/2012 10:38, Hielke Hoeve wrote:

Hi Jesse,

Your 10mb of WiQuery puzzles me. The wiquery-core jar is 256 KB and the 
wiquery-jquery-ui jar is 857KB. I wonder which jars you include in your war. If 
you do not use jQuery UI then there is no need for wiquery-jquery-ui.

Hielke

-Original Message-
From: Jesse Long [mailto:j...@unknown.za.net]
Sent: woensdag 2 mei 2012 10:48
To: users@wicket.apache.org
Subject: Status of wicketstuff jquery integration

Hi All,

I'm interested in using features of the jquery integration in wicketstuff, but 
it seems it is not being maintained. The version of jquery packaged with the 
wicketstuff-jquery jar seems to be 1.3.2, which is quite old already. Am I 
missing something? Is there a preferred way of integrating jquery into wicket?

(WiQuery adds 10Mb to my war. JQWicket looks good, but why choose it over 
wicketstuff-jquery)?

I also note that the wicketstuff-jquery project does not make use of the 
wicketstuff-jslibraries project. Why not? Is wicketstuff-jslibraries the 
officially recommended way of including js libraries, or should I look 
elsewhere? wicketstuff-jquery method of detecting jquery.js presence seems like 
a hack.

Thanks,
Jesse

-
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





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



Status of wicketstuff jquery integration

2012-05-02 Thread Jesse Long

Hi All,

I'm interested in using features of the jquery integration in 
wicketstuff, but it seems it is not being maintained. The version of 
jquery packaged with the wicketstuff-jquery jar seems to be 1.3.2, which 
is quite old already. Am I missing something? Is there a preferred way 
of integrating jquery into wicket?


(WiQuery adds 10Mb to my war. JQWicket looks good, but why choose it 
over wicketstuff-jquery)?


I also note that the wicketstuff-jquery project does not make use of the 
wicketstuff-jslibraries project. Why not? Is wicketstuff-jslibraries the 
officially recommended way of including js libraries, or should I look 
elsewhere? wicketstuff-jquery method of detecting jquery.js presence 
seems like a hack.


Thanks,
Jesse

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