Enclosure around a RefreshingView

2019-06-28 Thread Boris Goldowsky
What’s the best practice for a list (built in this case with a RefreshingView) 
that has a header, which should be hidden if the list is empty?

The most obvious would be to wrap  around the whole thing, 
but the RefreshingView is still considered visible even when empty, so that 
doesn’t work by itself.

I tried adding an onConfigure method to set visibility based on the repeater’s 
size(), but the children don’t actually get added to the repeater until after 
onConfigure runs, so size() always returns 0.

There are ways I can brute force this of course.  But is there a clean, general 
solution?

Boris



Re: Redirect based on a header?

2018-03-01 Thread Boris Goldowsky
Thank you both for sending me looking in useful directions.
In case it is useful to others, here is what I ended up implementing:

getRootRequestMapperAsCompound().add(
new IRequestMapper() {
public IRequestHandler mapRequest(Request request) {
if (request instanceof WebRequest) {
if ("http".equals(((WebRequest) 
request).getHeader("x-forwarded-proto")))
return new 
RedirectRequestHandler(HTTPS_URL, 301);
}
return null;
}

public int getCompatibilityScore(Request request) {
return 1;
}

public Url mapHandler(IRequestHandler requestHandler) {
return null;
}
});



Boris


On 2/23/18, 10:56 AM, "Andrea Del Bene" <an.delb...@gmail.com> wrote:

You might also find useful having a look at request cycle listener 
(class AbstractRequestCycleListener) which can be adopted to redirect 
the requests to https.


On 22/02/2018 23:35, Martin Grigorov wrote:
> Hi,
>
> Does it have to be "with Wicket" ?
> You can use custom Servlet Filter that is executed before WicketFilter.
>
> Martin Grigorov
> Wicket Training and Consulting
> Looking for a remote position with Wicket ? Contact me!
> https://twitter.com/mtgrigorov
>
>
> On Thu, Feb 22, 2018 at 5:55 PM, Boris Goldowsky <bgoldow...@cast.org>
> wrote:
>
>> I’m not sure if there is a wicket-y way to do this.
>>
>> In the environment where I’m deploying my wicket app (google cloud +
>> kubernetes + docker + tomcat), a request that came in to the load 
balancer
>> under insecure http is forwarded to wicket, and identified by the request
>> containing an “x-forwarded-proto” header with the value “http”.  I need 
to
>> redirect such requests to the https version of the site.
>>
>> Is there a way in wicket to look at a request header and send a redirect
>> before any of the usual URL processing happens?
>>
>> Thanks!
>> Boris
>>
>>
>>
>> -
>> 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





Redirect based on a header?

2018-02-22 Thread Boris Goldowsky
I’m not sure if there is a wicket-y way to do this.

In the environment where I’m deploying my wicket app (google cloud + kubernetes 
+ docker + tomcat), a request that came in to the load balancer under insecure 
http is forwarded to wicket, and identified by the request containing an 
“x-forwarded-proto” header with the value “http”.  I need to redirect such 
requests to the https version of the site.

Is there a way in wicket to look at a request header and send a redirect before 
any of the usual URL processing happens?

Thanks!
Boris



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



Re: AjaxCallListener and promises

2017-05-12 Thread Boris Goldowsky
For anyone who may have a similar issue and find this thread, here’s the 
workaround I used.

Desired behavior was to have an AJAX submit on a form that includes a drawing 
widget.  The drawing can’t be saved directly; it needs to be asked to export 
its data into a hidden text field which can be saved.  The widget’s export 
operation returns a Promise.

Strategy:

1) Instead of an AjaxSubmit button, I’m using a regular 
2) That button has an onclick that invokes the export operation, with a “then” 
clause that emits a custom javascript event.
3) I attach an AjaxFormSubmitBehavior listening to this custom event, so the 
form is submitted when the data is ready.

I think it would be a nice feature in the future to think through a reasonable 
integration of the ajax handlers with Promises, as they are likely to become 
more commonly used now that they are reasonably standardized.

Boris


On 5/3/17, 3:08 PM, "Martin Grigorov" <mgrigo...@apache.org> wrote:

Hi,

No, Wicket doesn't use the return values for all handlers but
"preconditions" [1].
And even for preconditions the only value that matters is the literal
*false.*


1.

https://github.com/apache/wicket/blob/b24decd2f60983c11e75e5f2c34d0c6a93b56426/wicket-core/src/main/java/org/apache/wicket/ajax/res/js/wicket-ajax-jquery.js#L614

Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov

On Wed, May 3, 2017 at 5:52 PM, Boris Goldowsky <bgoldow...@cast.org> wrote:

> Is there any way to use a method that returns a promise as the onBefore of
> an IAxaxCallListener?  I don’t want the ajax operation to move forward
> until the promise resolves.  Due to the nature of promises in Javascript,
> there doesn’t seem to be a way to simply wait for it.
>
> Boris
>
>



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



Re: header item uniqueness

2017-05-10 Thread Boris Goldowsky
Sven, do you expect your fix for this to get into the next point release of 
Wicket 7, or will it only be in Wicket 8?

Just trying to determine if I need to build a work-around or if I can wait for 
an official fix.

Thanks!

Boris


On 4/25/17, 9:07 PM, "Boris Goldowsky" <bgoldow...@cast.org> wrote:

Thank you!

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

Boris


On 4/25/17, 6:02 PM, "Sven Meier" <s...@meiers.net> wrote:

Hi Boris,

this is a bug in ResourceAggregator, please file a Jira issue - I think 
I have a fix ready by tomorrow.

Have fun
Sven


    
    On 25.04.2017 15:32, Boris Goldowsky wrote:
> I think Sven is right.
> Debugging through, it appears to be here in ResourceAggregator:
>
>   private void recordHeaderItem(HeaderItem item, Set 
depsDone)
>   {
>   renderDependencies(item, depsDone);
>   RecordedHeaderItem recordedItem = 
itemsToBeRendered.get(item);
>
>   “recordedItem” ends up as the old header item rather than the new 
one.
>
> Bng
>
>
> On 4/24/17, 6:09 PM, "Sven Meier" <s...@meiers.net> wrote:
>
>  HI,
>  
>  this might be caused by ResourceAggregator - it marks items as 
being
>  rendered, instead of render tokens.
>  
>  I'll check tomorrow.
>  
>  Sven
>  
>  
>  On 24.04.2017 23:41, Martin Grigorov wrote:
>  > On Mon, Apr 24, 2017 at 11:39 PM, Martin Grigorov 
<mgrigo...@apache.org>
    >  > wrote:
>  >
>  >> Hi,
>  >>
>  >> On Mon, Apr 24, 2017 at 10:20 PM, Boris Goldowsky 
<bgoldow...@cast.org>
>  >> wrote:
>  >>
>  >>> I have a situation like this:
>  >>>
>  >>> public void renderHead(IHeaderResponse response) {
>  >>>  …
>  >>>  
response.render(JavaScriptHeaderItem.forReference(resRef,
>  >>> pageParameters1, “id1”));
>  >>>  
response.render(JavaScriptHeaderItem.forReference(resRef,
>  >>> pageParameters2, “id2”));
>  >>> }
>  >>>
>  >>> where same ResourceReference is used for both resources – 
the different
>  >>> page parameters point it to different actual Resources.
>  >>>
>  >>> However, the check for uniqueness of header items seems to 
consider them
>  >>> equal, despite the different PageParameters and different 
IDs, and only one
>  >>> of them actually gets rendered in the page head.
>  >>>
>  >> Which check exactly do you refer ?
>  >>
>  >> 
org.apache.wicket.markup.head.internal.HeaderResponse#markItemRendered()
>  >> does such check by calling 
org.apache.wicket.markup.head.HeaderItem#
>  >> getRenderTokens().
>  >> 
org.apache.wicket.markup.head.JavaScriptReferenceHeaderItem#getRenderTokens()
>  >> uses the url and the id. The url contains the parameters.
>  >> All looks good to me!
>  >>
>  > The other check is at jQuery.Head.containsElement() 
(wicket-ajax-jquery.js)
>  > and it uses the value "src", i.e. it should not match because 
of the
>  > different parameters.
>  >
>  >>
>  >>> Is this a bug, or is there a way to force the two items to 
both be
>  >>> included?
>  >>>
>  >>> I’m using Wicket 7.5.0.
>  >>>
>  >>> Boris
>  >>>
>  >>>
>  >>>
>  >>>
>  >>>
>  
>  
>  
-
>  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




?B�CB�?�?[��X��ܚX�K??K[XZ[?�?\�\��][��X��ܚX�P?�X��]?�\?X�?K�ܙ�B��܈?Y??]?[ۘ[??��[X[�?�??K[XZ[?�?\�\��Z?[???�X��]?�\?X�?K�ܙ�B�



AjaxCallListener and promises

2017-05-03 Thread Boris Goldowsky
Is there any way to use a method that returns a promise as the onBefore of an 
IAxaxCallListener?  I don’t want the ajax operation to move forward until the 
promise resolves.  Due to the nature of promises in Javascript, there doesn’t 
seem to be a way to simply wait for it.

Boris



Re: header item uniqueness

2017-04-25 Thread Boris Goldowsky
Thank you!

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

Boris


On 4/25/17, 6:02 PM, "Sven Meier" <s...@meiers.net> wrote:

Hi Boris,

this is a bug in ResourceAggregator, please file a Jira issue - I think 
I have a fix ready by tomorrow.

Have fun
Sven



On 25.04.2017 15:32, Boris Goldowsky wrote:
> I think Sven is right.
> Debugging through, it appears to be here in ResourceAggregator:
>
>   private void recordHeaderItem(HeaderItem item, Set depsDone)
>   {
>   renderDependencies(item, depsDone);
>   RecordedHeaderItem recordedItem = itemsToBeRendered.get(item);
>
>   “recordedItem” ends up as the old header item rather than the new one.
>
> Bng
>
>
> On 4/24/17, 6:09 PM, "Sven Meier" <s...@meiers.net> wrote:
>
>  HI,
>  
>  this might be caused by ResourceAggregator - it marks items as being
>  rendered, instead of render tokens.
>  
>  I'll check tomorrow.
>  
>  Sven
>  
>  
>  On 24.04.2017 23:41, Martin Grigorov wrote:
>  > On Mon, Apr 24, 2017 at 11:39 PM, Martin Grigorov 
<mgrigo...@apache.org>
>  > wrote:
>  >
>  >> Hi,
>  >>
>  >> On Mon, Apr 24, 2017 at 10:20 PM, Boris Goldowsky 
<bgoldow...@cast.org>
>  >> wrote:
>  >>
>  >>> I have a situation like this:
>  >>>
>  >>> public void renderHead(IHeaderResponse response) {
>  >>>  …
>  >>>  response.render(JavaScriptHeaderItem.forReference(resRef,
>  >>> pageParameters1, “id1”));
>  >>>  response.render(JavaScriptHeaderItem.forReference(resRef,
>  >>> pageParameters2, “id2”));
>  >>> }
>  >>>
>  >>> where same ResourceReference is used for both resources – the 
different
>  >>> page parameters point it to different actual Resources.
>  >>>
>  >>> However, the check for uniqueness of header items seems to 
consider them
>  >>> equal, despite the different PageParameters and different IDs, 
and only one
>  >>> of them actually gets rendered in the page head.
>  >>>
>  >> Which check exactly do you refer ?
>  >>
>  >> 
org.apache.wicket.markup.head.internal.HeaderResponse#markItemRendered()
>  >> does such check by calling 
org.apache.wicket.markup.head.HeaderItem#
>  >> getRenderTokens().
>  >> 
org.apache.wicket.markup.head.JavaScriptReferenceHeaderItem#getRenderTokens()
>  >> uses the url and the id. The url contains the parameters.
>  >> All looks good to me!
>  >>
>  > The other check is at jQuery.Head.containsElement() 
(wicket-ajax-jquery.js)
>  > and it uses the value "src", i.e. it should not match because of 
the
>  > different parameters.
>  >
>  >>
>  >>> Is this a bug, or is there a way to force the two items to both 
be
>  >>> included?
>  >>>
>  >>> I’m using Wicket 7.5.0.
>  >>>
>  >>> Boris
>  >>>
>  >>>
>  >>>
>  >>>
>  >>>
>  
>  
>  -
>  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: header item uniqueness

2017-04-25 Thread Boris Goldowsky
I think Sven is right.
Debugging through, it appears to be here in ResourceAggregator:

private void recordHeaderItem(HeaderItem item, Set depsDone)
{
renderDependencies(item, depsDone);
RecordedHeaderItem recordedItem = itemsToBeRendered.get(item);

 “recordedItem” ends up as the old header item rather than the new one.

Bng


On 4/24/17, 6:09 PM, "Sven Meier" <s...@meiers.net> wrote:

HI,

this might be caused by ResourceAggregator - it marks items as being 
rendered, instead of render tokens.

I'll check tomorrow.

Sven


On 24.04.2017 23:41, Martin Grigorov wrote:
> On Mon, Apr 24, 2017 at 11:39 PM, Martin Grigorov <mgrigo...@apache.org>
> wrote:
>
>> Hi,
>>
    >> On Mon, Apr 24, 2017 at 10:20 PM, Boris Goldowsky <bgoldow...@cast.org>
>> wrote:
>>
>>> I have a situation like this:
>>>
>>> public void renderHead(IHeaderResponse response) {
>>>  …
>>>  response.render(JavaScriptHeaderItem.forReference(resRef,
>>> pageParameters1, “id1”));
>>>  response.render(JavaScriptHeaderItem.forReference(resRef,
>>> pageParameters2, “id2”));
>>> }
>>>
>>> where same ResourceReference is used for both resources – the different
>>> page parameters point it to different actual Resources.
>>>
>>> However, the check for uniqueness of header items seems to consider them
>>> equal, despite the different PageParameters and different IDs, and only 
one
>>> of them actually gets rendered in the page head.
>>>
>> Which check exactly do you refer ?
>>
>> org.apache.wicket.markup.head.internal.HeaderResponse#markItemRendered()
>> does such check by calling org.apache.wicket.markup.head.HeaderItem#
>> getRenderTokens().
>> 
org.apache.wicket.markup.head.JavaScriptReferenceHeaderItem#getRenderTokens()
>> uses the url and the id. The url contains the parameters.
>> All looks good to me!
>>
> The other check is at jQuery.Head.containsElement() 
(wicket-ajax-jquery.js)
> and it uses the value "src", i.e. it should not match because of the
> different parameters.
>
>>
>>> Is this a bug, or is there a way to force the two items to both be
>>> included?
>>>
>>> I’m using Wicket 7.5.0.
>>>
>>> Boris
>>>
>>>
>>>
>>>
>>>


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





header item uniqueness

2017-04-24 Thread Boris Goldowsky
I have a situation like this:

public void renderHead(IHeaderResponse response) {
…
response.render(JavaScriptHeaderItem.forReference(resRef, pageParameters1, 
“id1”));
response.render(JavaScriptHeaderItem.forReference(resRef, pageParameters2, 
“id2”));
}

where same ResourceReference is used for both resources – the different page 
parameters point it to different actual Resources.

However, the check for uniqueness of header items seems to consider them equal, 
despite the different PageParameters and different IDs, and only one of them 
actually gets rendered in the page head.

Is this a bug, or is there a way to force the two items to both be included?

I’m using Wicket 7.5.0.

Boris






Re: Snapshot testing for wicket?

2016-12-15 Thread Boris Goldowsky
It can be convenient to write a unit test that essentially says, “this 
component should return this HTML” (or perhaps a slightly abstracted view of 
the HTML DOM).  Snapshot testing frameworks automate this (eg, making it easy 
to update the expected DOM when you intentionally change your component).  I’m 
wondering if this is possible for a wicket app; I’ve so far only seen it done 
with ReactJS.

See https://medium.com/@dschmidt1992/jest-snapshot-testing-3ef9fa1222bb  for a 
better explanation of the basic idea.

Boris


On 12/15/16, 7:04 AM, "Martin Grigorov" <mgrigo...@apache.org> wrote:

Hi,

What exactly do you need to do ?
To test your application against Wicket 7.6.0-SNAPSHOT ?

Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov

On Thu, Dec 15, 2016 at 12:40 PM, Boris Goldowsky <bgoldow...@cast.org>
wrote:

> Has anyone implemented snapshot testing for a wicket app or have
> suggestions on how it might be done?
>
> Boris
>
> (yes, I know there are different schools of thought on whether snapshot
> testing is a good idea or not)
>
>
>




Snapshot testing for wicket?

2016-12-15 Thread Boris Goldowsky
Has anyone implemented snapshot testing for a wicket app or have suggestions on 
how it might be done?

Boris

(yes, I know there are different schools of thought on whether snapshot testing 
is a good idea or not)




Annotation for detachable field

2016-12-05 Thread Boris Goldowsky
Is there any way to create an annotation that would mark a field’s value as 
something that ought to be detached?  That is, instead of:

private IModel userModel;

@Override
public void onDetach() {
super.onDetach();
if (userModel != null)
userModel.detach();
}

I would like to be able to write simply:

@Detach
private IModel userModel;

Has anyone tried this?

Boris



Re: Adding a row to a ListView (or any repeater) programmatically for Ajax update

2016-07-11 Thread Boris Goldowsky
You might also try “QuickView” : https://github.com/vineetsemwal/quickview
This has worked well for us for situations where we are appending items to a 
repeater.

Boris



On 7/11/16, 10:59 AM, "Martin Grigorov"  wrote:

Hi,

The article is
http://wicketinaction.com/2008/10/repainting-only-newly-created-repeater-items-via-ajax/
It has a demo application linked at the bottom.
It is against old version of Wicket but it should be easy to migrate it to
6.x/7.x/8.x

Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov

On Wed, Jul 6, 2016 at 10:54 PM, Lon Varscsak 
wrote:

> Hey guys, I have a large table and when the user clicks the “new” button, I
> don’t want to refresh the entire table.  I saw a post about using
> javascript to create the empty TR element, with the ID that wicket would
> use, and then have wicket just refresh that id.  Sounds great, except I’m
> struggling with how to pull that off.
>
> I don’t see exposed API for me to add (or get back) a new list item into
> the ListView (which would let me get it’s markup id for an update).  I
> think I can pull this off with my own subclass, but before moving on to
> that I wanted to make sure I wasn’t missing something basic.
>
> Thanks for any info,
>
> Lon
>




Re: JQuery 3.0.0

2016-07-07 Thread Boris Goldowsky
OK, thanks.  From the release notes it sounds like 2.2.3 at least should be 
safe to use?

Boris


On 7/7/16, 1:38 PM, "Martin Grigorov" <martin.grigo...@gmail.com> wrote:

Hi,

Yes, there are known problems.
It is not recommended to upgrade yet!
On Jul 7, 2016 8:25 PM, "Boris Goldowsky" <bgoldow...@cast.org> wrote:

> Are there any problems with replacing the default jQuery reference in
> Wicket 7.3 (jQuery 1.12.3) with the latest (jQuery 3.0.0)?  Have others
> tried this configuration?
>
> Thanks
>
> Boris
>
>



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



JQuery 3.0.0

2016-07-07 Thread Boris Goldowsky
Are there any problems with replacing the default jQuery reference in Wicket 
7.3 (jQuery 1.12.3) with the latest (jQuery 3.0.0)?  Have others tried this 
configuration?

Thanks

Boris



simple automated accessibility testing

2016-03-19 Thread Boris Goldowsky
I¹m thinking it would be handy to automate testing of the simplest of
validity & accessibility requirements ­ eg, checking that every 
element has an alt attribute, and every form input has a label.
Eventually maybe taking this up a notch and connecting with existing HTML
validation and a11y-checking engines.   As things stand, I have to do any
such testing manually with browser-based tools.

Is this something that already exists, or that others would be interested
in collaborating on?

I can think of a couple of possible methods that would be pretty general ­
not sure which is best.

A) extend WicketTester, adding some assertion methods; then one could
write a Junit test for each page asserting that it passes certain criteria.

B) create a runtime checker, something like StatelessChecker, that when
enabled would check every page as it is rendered.  You could turn this on
during development to have checking of the actual rendered HTML.

I¹d be grateful for any thoughts or suggestions.

Boris


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



Re: AJAX-Behavior that decides activation of a link

2015-01-08 Thread Boris Goldowsky
If I¹m understanding you correctly, wouldn¹t it be sufficient to code this
as 
a simple AjaxLink, which responds with a regular AJAX
update when the link is disabled, or uses setResponsePage when it¹s
enabled? 

Boris

On 1/7/15, 9:15 PM, Joachim Schrod jsch...@acm.org wrote:

Hi,

I have a class of links where some of them sometimes shall not
trigger. The decision is made server-side according to current state.

At first sight, the realization seems to be not that straight forward:
 -- I add an AJAX behavior to these link that allows default action
and computes if the link action shall be prevented.
 -- The AJAX behavior has an AJAX call listener (complete handler)
that may call attrs.event.preventDefault() if the link shall
not be triggered.
 -- The decision if the link shall not be triggered is
communicated by the AJAX request to the complete handler via
an HiddenField that is updated in the AJAX request. Delivery
of the decision via JSON is difficult, as we also want to
update other DOM elements with the response (feedback why the
link was not triggered).

Do I miss something? Is there a completely different approach that
I could take?

Or: Is there a better way to communicate the decision if the link
shall be triggered to the call listener? Introducing a hidden field
for that purpose seems to be awkward, for me.

I would be thankful for any comments or recommendations.

   Joachim

-- 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Joachim Schrod, Roedermark, Germany
Email: jsch...@acm.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: How to set cache scope for mapped resources

2014-12-12 Thread Boris Goldowsky


On 12/12/14, 11:22 AM, Martin Grigorov mgrigo...@apache.org wrote:

On Fri, Dec 12, 2014 at 2:52 AM, Boris Goldowsky bgoldow...@cast.org
wrote:

 Ah, yes that works.  I can now reference my resources too.

 Now, sorry to be a pain about this, but I would like to get it hooked
up to
 something like the FilenameWithVersionResourceCachingStrategy .  I am
not
 seeing how to do this.   The caching strategies demand something which
 implements IStaticCacheableResource, and it doesn¹t appear
 that resources like this which take PageParameters can implement that
 (there is no
 unique cache key or resource stream).


the unique cache key could be the file name (absolute or relative)
resource stream is the file content, you can use FileResourceStream


But this is a Resource built along the lines of
http://wicketinaction.com/2011/07/wicket-1-5-mounting-resources/  so there
is just one Resource for the whole directory, which serves up different
files based on the PageParameters that are sent to it.   I think the
caching strategies are not designed to work with this sort of thing.

Bng


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



mod_pagespeed with wicket?

2014-12-11 Thread Boris Goldowsky
Is anyone using google’s mod_pagespeed with Wicket?   I would be interested in 
comparing notes.

As a test, we’ve installed mod_pagespeed (default configuration) on an Apache 
web server that is a proxy in front of the Tomcat instance which runs Wicket, 
and are seeing some somewhat mysterious AJAX failures.   W’re also seeing a 
significant speedup and reduction in page size, so I’m thinking it will be 
worth the effort of diagnosing those problems!

Boris



Re: mod_pagespeed with wicket?

2014-12-11 Thread Boris Goldowsky
The issue seems to be that, if the mod_pagespeed Javascript rewriting
rules are enabled, then the Wicket ajax code tries to re-load JS libraries
like jQuery.  This is not only unnecessary, it breaks things.

Specifically ‹ without mod_pagespeed, or with the rewrite_javascript rules
disabled, Wicket inserts jQuery with an element like this:

script type=text/javascript
src=./wicket/resource/org.apache.wicket.resource.JQueryResourceReference/j
query/jquery-1.11.1.min-ver-8101D596B2B8FA35FE3A634EA342D7C3.js/script

If mod_pagespeed¹s rewrite_javascript rule is turned on, the element gets
rewritten to:

script type=text/javascript
src=wicket/resource/org.apache.wicket.resource.JQueryResourceReference/jqu
ery/jquery-1.11.1.min-ver-8101D596B2B8FA35FE3A634EA342D7C3.js.pagespeed.jm.
YSzgc-BSX9.js/script


Then the AJAX packet comes in with a header-contribution like this

header-contribution encoding=wicket1 ![CDATA[head
xmlns:wicket=http://wicket.apache.org;script type=text/javascript
src=./wicket/resource/org.apache.wicket.resource.JQueryResourceReference/j
query/jquery-1.11.1.min-ver-8101D596B2B8FA35FE3A634EA342D7C3.js/script
Š

This src attribute doesn¹t match the src that¹s already in the document,
so an other copy of jQuery gets loaded.

I¹m not sure why this breaks the AJAX operation (there is no error in the
console) but it¹s  clearly undesirable and does cause problems.
Interestingly, it only seems to break things in Wicket¹s deployment mode,
not development mode.


It might make things more stable if the jQuery references were served with
an ID that could be compared, rather than just the src.

I can make things work again with this mod_pagespeed directive:

Bng



On 12/11/14, 8:39 AM, Martin Grigorov mgrigo...@apache.org wrote:

Hi,

Any details about the problem with Ajax ?
If you need help then please share the related HTTPD configuration so we
can try to debug it.

Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov

On Thu, Dec 11, 2014 at 3:25 PM, Boris Goldowsky bgoldow...@cast.org
wrote:

 Is anyone using google¹s mod_pagespeed with Wicket?   I would be
 interested in comparing notes.

 As a test, we¹ve installed mod_pagespeed (default configuration) on an
 Apache web server that is a proxy in front of the Tomcat instance which
 runs Wicket, and are seeing some somewhat mysterious AJAX failures.
W¹re
 also seeing a significant speedup and reduction in page size, so I¹m
 thinking it will be worth the effort of diagnosing those problems!

 Boris




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



Re: How to set cache scope for mapped resources

2014-12-11 Thread Boris Goldowsky
Thanks for this.  I’m trying replacing the mapper with an extension of
AbstractResource and an extension of ResourceReference, as suggested in
that post, and then using something like
application.mountResource(“/img/${path}”, new MyResourceReference(…))
and it is indeed much easier to set the caching headers flexibly that way.

If the directory has subdirectories, though, the mount doesn’t work. Only
the first path segment up to the first / is passed to the Resource as the
path.  Is there a way to rewrite that mountResource invocation so that the
entire path after /img/ is passed through to the resource?  It would be
nice if there were a variant of ${} / #{} that was more greedy.

I can cheat by using attributes.getRequest().getUrl() in the Resource to
find the full path, but that breaks urlFor.

Ultimately my goal is to be able to get URLs for these resources that make
use of FilenameWithVersionResourceCachingStrategy .  As you may guess, I’m
trying various tacks to make the resource caching of my application work
better.

Boris




On 12/9/14, 3:21 PM, Martin Grigorov mgrigo...@apache.org wrote:

Check http://wicketinaction.com/2011/07/wicket-1-5-mounting-resources/
It describes the idea.

Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov

On Tue, Dec 9, 2014 at 3:45 AM, Boris Goldowsky bgoldow...@cast.org
wrote:

 The mapper maps a url path to a filesystem directory, so we can mount,
 say, /static/* to a directory of static files anywhere on our server.
It
 sets cache duration and MIME type properly along the way.

 I¹m certainly open to better ways to accomplish this goal!


 Boris

 On 12/8/14, 5:07 PM, Martin Grigorov mgrigo...@apache.org wrote:

 Hi,
 
 What is the reason to go so low level with AbstractMapper and
 ResourceStreamRequestHandler
 ?
 You can mount a ResourceReference with WebApplication#mountResource(),
and
 this ResRef#getResource() should return IResource/AbstractResource
where
 you have much better control on the response headers.
 
 
 Martin Grigorov
 Wicket Training and Consulting
 https://twitter.com/mtgrigorov
 
 On Mon, Dec 8, 2014 at 11:03 PM, Boris Goldowsky bgoldow...@cast.org
 wrote:
 
  I have a request mapper that extends AbstractMapper, and returns a
  ResourceStreamRequestHandler from mapRequest().
 
  The resource is being send with a Cache-Control: private header,
which
 is
  unfortunate for caching in this case; we want the resources to be
 publicly
  cacheable.
 
  How can I set the cache scope properly in this scenario?   I see that
  ResourceResponse has a setCacheScope() method, but my AbstractMapper
  doesn¹t seem to get access to this anywhere.
 
  Thanks for any pointers!
 
  Bng
 
 


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





Re: How to set cache scope for mapped resources

2014-12-11 Thread Boris Goldowsky
Ah, yes that works.  I can now reference my resources too.

Now, sorry to be a pain about this, but I would like to get it hooked up to
something like the FilenameWithVersionResourceCachingStrategy .  I am not
seeing how to do this.   The caching strategies demand something which
implements IStaticCacheableResource, and it doesn’t appear
that resources like this which take PageParameters can implement that
(there is no
unique cache key or resource stream).

Bng



On 12/11/14, 3:14 PM, Martin Grigorov mgrigo...@apache.org wrote:

Hi,

If the paths are arbitrary like /img/a/b/c and/img/d/e/f/g/h then just
mount at /img. The rest will be available as indexed parameters in
Attributes#getParameters().
See PageParameters#getIndexedCount() and #get(int)
To construct an url you should use #set(int, String)

Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov

On Thu, Dec 11, 2014 at 8:42 PM, Boris Goldowsky bgoldow...@cast.org
wrote:

 Thanks for this.  I’m trying replacing the mapper with an extension of
 AbstractResource and an extension of ResourceReference, as suggested in
 that post, and then using something like
 application.mountResource(“/img/${path}”, new
 MyResourceReference(…))
 and it is indeed much easier to set the caching headers flexibly that
way.

 If the directory has subdirectories, though, the mount doesn’t work.
Only
 the first path segment up to the first / is passed to the Resource as
the
 path.  Is there a way to rewrite that mountResource invocation so that
the
 entire path after /img/ is passed through to the resource?  It would be
 nice if there were a variant of ${} / #{} that was more greedy.

 I can cheat by using attributes.getRequest().getUrl() in the Resource to
 find the full path, but that breaks urlFor.

 Ultimately my goal is to be able to get URLs for these resources that
make
 use of FilenameWithVersionResourceCachingStrategy .  As you may guess,
I’m
 trying various tacks to make the resource caching of my application work
 better.

 Boris




 On 12/9/14, 3:21 PM, Martin Grigorov mgrigo...@apache.org wrote:

 Check http://wicketinaction.com/2011/07/wicket-1-5-mounting-resources/
 It describes the idea.
 
 Martin Grigorov
 Wicket Training and Consulting
 https://twitter.com/mtgrigorov
 
 On Tue, Dec 9, 2014 at 3:45 AM, Boris Goldowsky bgoldow...@cast.org
 wrote:
 
  The mapper maps a url path to a filesystem directory, so we can
mount,
  say, /static/* to a directory of static files anywhere on our server.
 It
  sets cache duration and MIME type properly along the way.
 
  I¹m certainly open to better ways to accomplish this goal!
 
 
  Boris
 
  On 12/8/14, 5:07 PM, Martin Grigorov mgrigo...@apache.org wrote:
 
  Hi,
  
  What is the reason to go so low level with AbstractMapper and
  ResourceStreamRequestHandler
  ?
  You can mount a ResourceReference with
WebApplication#mountResource(),
 and
  this ResRef#getResource() should return IResource/AbstractResource
 where
  you have much better control on the response headers.
  
  
  Martin Grigorov
  Wicket Training and Consulting
  https://twitter.com/mtgrigorov
  
  On Mon, Dec 8, 2014 at 11:03 PM, Boris Goldowsky
bgoldow...@cast.org
  wrote:
  
   I have a request mapper that extends AbstractMapper, and returns a
   ResourceStreamRequestHandler from mapRequest().
  
   The resource is being send with a Cache-Control: private header,
 which
  is
   unfortunate for caching in this case; we want the resources to be
  publicly
   cacheable.
  
   How can I set the cache scope properly in this scenario?   I see
that
   ResourceResponse has a setCacheScope() method, but my
AbstractMapper
   doesn¹t seem to get access to this anywhere.
  
   Thanks for any pointers!
  
   Bng
  
  
 
 
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 





How to set cache scope for mapped resources

2014-12-08 Thread Boris Goldowsky
I have a request mapper that extends AbstractMapper, and returns a 
ResourceStreamRequestHandler from mapRequest().

The resource is being send with a Cache-Control: private header, which is 
unfortunate for caching in this case; we want the resources to be publicly 
cacheable.

How can I set the cache scope properly in this scenario?   I see that 
ResourceResponse has a setCacheScope() method, but my AbstractMapper doesn’t 
seem to get access to this anywhere.

Thanks for any pointers!

Bng



Re: How to set cache scope for mapped resources

2014-12-08 Thread Boris Goldowsky
The mapper maps a url path to a filesystem directory, so we can mount,
say, /static/* to a directory of static files anywhere on our server.  It
sets cache duration and MIME type properly along the way.

I¹m certainly open to better ways to accomplish this goal!


Boris

On 12/8/14, 5:07 PM, Martin Grigorov mgrigo...@apache.org wrote:

Hi,

What is the reason to go so low level with AbstractMapper and
ResourceStreamRequestHandler
?
You can mount a ResourceReference with WebApplication#mountResource(), and
this ResRef#getResource() should return IResource/AbstractResource where
you have much better control on the response headers.


Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov

On Mon, Dec 8, 2014 at 11:03 PM, Boris Goldowsky bgoldow...@cast.org
wrote:

 I have a request mapper that extends AbstractMapper, and returns a
 ResourceStreamRequestHandler from mapRequest().

 The resource is being send with a Cache-Control: private header, which
is
 unfortunate for caching in this case; we want the resources to be
publicly
 cacheable.

 How can I set the cache scope properly in this scenario?   I see that
 ResourceResponse has a setCacheScope() method, but my AbstractMapper
 doesn¹t seem to get access to this anywhere.

 Thanks for any pointers!

 Bng




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



Re: [SOLVED] Re: PropertyModel / PropertyResolver / Map or List access

2014-11-10 Thread Boris Goldowsky
I would recommend against using .object inside a PropertyModel, at least
if your application makes use of detachable models.  When a component uses
the property model in your example,
new PropertyModel(MyPage.this, list.object[1].anyProperty)
The model returned by MyPage.getList() will be attached, but when the
PropertyModel is later detached, the upstream getList() model will NOT be
detached, possibly leading to session size blowing up or serialization
errors.


It won¹t necessarily cause a problem in your case, but beware.

Boris



On 11/7/14, 3:39 AM, Patrick Davids patrick.dav...@nubologic.com wrote:

Hi Sven, Hi Paul,
thanx, now its working.

I thought the PropertyModel/PropertyResolver will unpack the
model-object itself, so there is no need to adress getObject by .object.
Maybe a small note in javadoc could help others not running into this
issue.

So...
All ways (mentioned in javadoc) are working, tested:
(@Sven: I think you had some typos in your mail, so I will repeat my
working tests)

new PropertyModel(MyPage.this, list.object[1].anyProperty)
new PropertyModel(MyPage.this, list.object.1.anyProperty)

new PropertyModel(list, [1].anyProperty)
new PropertyModel(list, 1.anyProperty)

as well, navigation further, such an expression is working, too.
new PropertyModel(list, 1.anyProperty[any-string-key])


Thanx for help... best regards
Patrick
P.s.
Short question for string-key-access on maps.
The syntax is quite equal to associative arrays in javascript.
I like the way it is in wicket, no need paying attention for additional
quotation marks, and its ok for me, but shouldnt it also support
new PropertyModel(list, 1.anyProperty['any-string-key'])?



Am 06.11.2014 21:01, schrieb Sven Meier:
 Hi,

 you're telling PropertyModel to look up property list from MyPage, but
 list is not a list, it's a model, models don't have a property 1.

 Use this instead:

new Label(myLabel, new PropertyModel(list, [1],anyProperty))

 ... or:

new Label(myLabel, new PropertyModel(MyPage.this,
 list.object.[1].anyProperty))

 Regards
 Sven



 On 11/06/2014 05:03 PM, Patrick Davids wrote:
 Hi all,

 the javadoc of PropertyResolver says, map or list access is possible
via
 keys or index.
 Accessing an map via key is no problem, but I dont get it working for
 lists and index.

 for instance:

 MyPage extends Page{

 private IModelListAnything list;

 public MyPage(IModelListAnything list){
   super();
   this.list = list;

  add(new Label(mylabel, new PropertyModel(MyPage.this,
 list[1].anyProperty)));

 }

 }

 ends up in a Exception like this:
 Last cause: No get method defined for class: class MyPage$1
expression: 1

 I also made a try with list.1.anyProperty.
 Not working...

 Any ideas?

 best regards
 Patrick
 -
 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



Modify items in quickview?

2014-10-30 Thread Boris Goldowsky
How would you set things up to have the best of both worlds with a QuickView?   
I need to have
(a) a button like an AjaxItemsNavigator that adds additional elements to the 
QuickView without repainting the entire view, AND
(b) some AJAX operations that change the entire content of the QuickView – for 
example, they can change the data provider.

If I use the ReuseAllStrategy I can’t determine how to accomplish (b).  Other 
item reuse strategies don’t seem to allow (a).  Does a custom item reuse 
strategy with a “reset” method make sense or is there a better way?

Boris



Re: Modify items in quickview?

2014-10-30 Thread Boris Goldowsky
Yes, that one.

For now, I am just replacing the QuickView with a newly-instantiated one,
which does work around the problem.

Boris


On 10/30/14, 4:26 PM, Paul Bors p...@bors.ws wrote:

Are you talking about this QuickView?
https://github.com/vineetsemwal/quickview



On Thu, Oct 30, 2014 at 1:16 PM, Boris Goldowsky bgoldow...@cast.org
wrote:

 How would you set things up to have the best of both worlds with a
 QuickView?   I need to have
 (a) a button like an AjaxItemsNavigator that adds additional elements to
 the QuickView without repainting the entire view, AND
 (b) some AJAX operations that change the entire content of the
QuickView ­
 for example, they can change the data provider.

 If I use the ReuseAllStrategy I can¹t determine how to accomplish (b).
 Other item reuse strategies don¹t seem to allow (a).  Does a custom item
 reuse strategy with a ³reset² method make sense or is there a better
way?

 Boris




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



Re: equals() method for LoadableDetachableModels

2014-07-11 Thread Boris Goldowsky
Thank you all for your replies, very helpful!

Sven Meier s...@meiers.netmailto:s...@meiers.net wrote:

detachable models should never use getObject() in their implementation of 
equals()?

generally this is a good advice: there are several places in Wicket checking 
for model equality (e.g. ReuseIfModelsEqualStrategy).
A detachable model should have enough information to decide equality without 
loading the model object.

It would be good to note this somewhere in the documentation where model 
implementers will find it.

Ernesto Reinaldo Barreiro reier...@gmail.commailto:reier...@gmail.com wrote:

Shouldn't the serialize primary key=the bit of info needed to recover
data on attach stored on LDM be the criteria for equality?

Yes, and I will look into changing our implementation to do this.  However it 
is more complicated, since our LDM [*] also supports constructing a model based 
on a query rather than an ID, or storing a not-persisted object directly, so 
we’d have to do considerably more than just compare IDs.  And you could have a 
query-based model and an ID-based model that resolve to the same object — it’s 
perhaps a philosophical question whether those ought to compare equal or not.  
The practical question, of course, is whether changing the definition of 
equality will break any existing code.

[*] we are using a version of the HibernateObjectModel from the 
no-longer-maintained Databinder (see 
https://github.com/n8han/Databinder-for-Wicket/ ) updated for wicket 6 and 
recent Hibernate versions.   BTW if anyone is interested in collaborating on 
maintaining and improving this library that mediates between Wicket  
Hibernate, please get in touch.

Martin Grigorov mgrigo...@apache.orgmailto:mgrigo...@apache.org wrote:

does 
org.apache.wicket.core.util.objects.checker.CheckingObjectOutputStream#check()
really need to use #equals() (via Stack#contains()) ?
I think checking for identity equality should be OK too

I was wondering the same thing; using identity would certainly be safer for 
issues like these.

Boris




equals() method for LoadableDetachableModels

2014-07-10 Thread Boris Goldowsky
I’ve started using CheckingObjectOutputStream to test for models of database 
objects that are not properly detached, and find it very useful.

However I just diagnosed (after many hours of frustration) that it can also 
cause problems rather than solve them.   CheckingObjectOutputStream causes the 
equals() method of models to be called, and in the case of our models the 
equals() implementation loads the database object (models of the same object 
being considered equal to each other).  Since it’s doing this during 
serialization and thus after the detach process, the checker actually causes 
the exact problem that it’s supposed to prevent (and doesn’t generate any 
warnings in this case).

Is it a general rule, that I was just not aware of, that detachable models 
should never use getObject() in their implementation of equals()?   Or should 
CheckingObjectOutputStream be changed to avoid calling equals() ?

Bng


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



Re: How to implement an auto-save behavior

2014-02-11 Thread Boris Goldowsky
Thank you Martin, that works like a charm.

Boris


On Feb 10, 2014, at 2:27 PM, Martin Grigorov mgrigo...@apache.org wrote:

 Hi,
 
 To submit a form all you need to provide to the object you pass to
 Wicket.Ajax.ajax() is the 'f' attribute:
 Wicket.Ajax.post({ u: 'url/to/AjaxFormSubmitBehavior', f: 'formId', sc:
 'optionalSubmittingComponentId'});
 
 I will update the Ajax chapter in the Reference guide soon to explain the
 JS API.
 
 Martin Grigorov
 Wicket Training and Consulting
 
 
 On Mon, Feb 10, 2014 at 5:48 PM, Ernesto Reinaldo Barreiro 
 reier...@gmail.com wrote:
 
 Is not a function? If I look at the source code I see something like
 
 submitMultipartForm = function(context) {
 
 },
 
 
 
 
 On Mon, Feb 10, 2014 at 5:41 PM, Boris Goldowsky bgoldow...@cast.org
 wrote:
 
 Thanks, but that also results in Wicket.Ajax.Call.submitMultipartForm is
 not a function.
 
 I suspect the answer is to get the parameters set up correctly and then
 arrange for the result of getCallbackScript() to be called periodically.
 If someone else has done something like this and has a working example
 that would be really helpful.
 
 Boris
 
 
 
 On Feb 10, 2014, at 11:08 AM, Ernesto Reinaldo Barreiro 
 reier...@gmail.com wrote:
 
 Maybe Wicket.Ajax.Call.subitMultipartForm?
 
 
 On Mon, Feb 10, 2014 at 4:56 PM, Boris Goldowsky bgoldow...@cast.org
 wrote:
 
 I'm attempting to migrate an auto-saving behavior from wicket 1.5 to
 wicket 6.  In wicket 1.5 it worked by doing something like this every
 30
 seconds to loop through auto-save-enabled forms on the page and submit
 them:
 
 $(form.ajaxAutoSave).each(function() {
 var form = $(this);
 wicketSubmitFormById(form.attr('id')...)
 }
 
 The AJAX migration documentation -
 https://cwiki.apache.org/confluence/display/WICKET/Wicket+Ajax -
 suggests
 replacing Wicket.submitFormById with Wicket.Ajax.submitForm , but this
 method does not appear to exist:  replacing the above code with
 
 $(form.ajaxAutoSave).each(function() {
 var form = $(this);
 //unsure of expected params so just picked one from the migration
 documentation
 Wicket.Ajax.submitForm({f:form.attr('id')});
 }
 
 When the function is called I can see the following error in the
 console:
 
 Uncaught TypeError: Object # has no method 'submitForm'
 
 So I went into the console and I can see that Wicket.Ajax is defined,
 but
 Wicket.Ajax.submitForm is not.
 
 Is the documentation incorrect here, or is there some additional step
 to
 take to gain access to the submitForm method?
 
 Alternatively - is there a better way to create an auto-save behavior?
 AjaxFormSubmitBehavior would appear to almost meet the need, if there
 is a
 way to  tie it to a timer-generated event.
 
 Boris
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 
 
 --
 Regards - Ernesto Reinaldo Barreiro
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 
 
 --
 Regards - Ernesto Reinaldo Barreiro
 


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



How to implement an auto-save behavior

2014-02-10 Thread Boris Goldowsky
I’m attempting to migrate an auto-saving behavior from wicket 1.5 to wicket 6.  
In wicket 1.5 it worked by doing something like this every 30 seconds to loop 
through auto-save-enabled forms on the page and submit them:

 $(form.ajaxAutoSave).each(function() { 
  var form = $(this); 
  wicketSubmitFormById(form.attr('id')...) 
} 

The AJAX migration documentation - 
https://cwiki.apache.org/confluence/display/WICKET/Wicket+Ajax - suggests 
replacing Wicket.submitFormById with Wicket.Ajax.submitForm , but this method 
does not appear to exist:  replacing the above code with

 $(form.ajaxAutoSave).each(function() { 
  var form = $(this); 
  //unsure of expected params so just picked one from the migration 
documentation 
  Wicket.Ajax.submitForm({f:form.attr('id')}); 
} 

When the function is called I can see the following error in the console: 

Uncaught TypeError: Object # has no method 'submitForm' 

So I went into the console and I can see that Wicket.Ajax is defined, but 
Wicket.Ajax.submitForm is not.   

Is the documentation incorrect here, or is there some additional step to take 
to gain access to the submitForm method?

Alternatively - is there a better way to create an auto-save behavior?  
AjaxFormSubmitBehavior would appear to almost meet the need, if there is a way 
to  tie it to a timer-generated event.

Boris


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



Re: How to implement an auto-save behavior

2014-02-10 Thread Boris Goldowsky
Thanks, but that also results in Wicket.Ajax.Call.submitMultipartForm is not a 
function”.

I suspect the answer is to get the parameters set up correctly and then arrange 
for the result of getCallbackScript() to be called periodically.  If someone 
else has done something like this and has a working example that would be 
really helpful.

Boris



On Feb 10, 2014, at 11:08 AM, Ernesto Reinaldo Barreiro reier...@gmail.com 
wrote:

 Maybe Wicket.Ajax.Call.subitMultipartForm?
 
 
 On Mon, Feb 10, 2014 at 4:56 PM, Boris Goldowsky bgoldow...@cast.orgwrote:
 
 I'm attempting to migrate an auto-saving behavior from wicket 1.5 to
 wicket 6.  In wicket 1.5 it worked by doing something like this every 30
 seconds to loop through auto-save-enabled forms on the page and submit them:
 
 $(form.ajaxAutoSave).each(function() {
  var form = $(this);
  wicketSubmitFormById(form.attr('id')...)
 }
 
 The AJAX migration documentation -
 https://cwiki.apache.org/confluence/display/WICKET/Wicket+Ajax - suggests
 replacing Wicket.submitFormById with Wicket.Ajax.submitForm , but this
 method does not appear to exist:  replacing the above code with
 
 $(form.ajaxAutoSave).each(function() {
  var form = $(this);
  //unsure of expected params so just picked one from the migration
 documentation
  Wicket.Ajax.submitForm({f:form.attr('id')});
 }
 
 When the function is called I can see the following error in the console:
 
 Uncaught TypeError: Object # has no method 'submitForm'
 
 So I went into the console and I can see that Wicket.Ajax is defined, but
 Wicket.Ajax.submitForm is not.
 
 Is the documentation incorrect here, or is there some additional step to
 take to gain access to the submitForm method?
 
 Alternatively - is there a better way to create an auto-save behavior?
 AjaxFormSubmitBehavior would appear to almost meet the need, if there is a
 way to  tie it to a timer-generated event.
 
 Boris
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 
 
 -- 
 Regards - Ernesto Reinaldo Barreiro


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



Question on role-based authorization

2013-12-20 Thread Boris Goldowsky
I’m trying to use wicket-auth-roles (in Wicket 1.5.9) to make a component that 
is enabled only for logged-in users.  In my case if you’re not logged in, you 
have only a role called GUEST.   If you are logged in you have a role called 
STUDENT (and also GUEST, since everything guests can do, students can do too).

I tried this annotation at the top of the class:

@AuthorizeActions(actions = { @AuthorizeAction(action=ENABLE, deny={“GUEST}, 
roles={STUDENT})})

However, everyone is denied (since everyone has the GUEST role).

Then I tried:

@AuthorizeActions(actions = { @AuthorizeAction(action=ENABLE, deny={}, 
roles={STUDENT})})

but for some reason AbstractRoleAuthorizationStrategy.hasAny(roles) returns 
true for the empty list of roles, so everyone is denied again.  If I leave out 
the deny list entirely:

@AuthorizeActions(actions = { @AuthorizeAction(action=ENABLE, 
roles={STUDENT})})

it is a null pointer exception.


I know I can write my own strategy or define my own annotation, but it seems 
like my case is exactly what the roles annotations are supposed to do.   So  
either this a bug in wicket-auth-roles, or else I am doing something wrong.  
Thoughts?

Boris



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



Re: Question on role-based authorization

2013-12-20 Thread Boris Goldowsky
One oddity with AnnotationsRoleAuthorizationStrategy#check() is that specifying 
deny = {} actually denies everyone (since 
AbstractRoleAuthorizationStrategy.hasAny(roles) returns true for the empty list 
of roles).  But people might be depending on that behavior, so it would be hard 
to recommend changing it.

A better case can be made for changing the current behavior when the deny 
parameter is omitted entirely.
With this annotation:
@AuthorizeActions(actions = { @AuthorizeAction(action=ENABLE, 
roles={STUDENT})})
when it gets to this line in AnnotationsRoleAuthorizationStrategy#check():
if (hasAny(new Roles(authorizeActionAnnotation.deny(
invokes new Roles(), which results in a set of one role called “”.
This is what causes the null pointer exception, in my own code, since there is 
no role named “”.

So I can fix the NPE, but how about a patch so that if the deny parameter is 
omitted, then it skips deny checking and moves right on to the next step of 
checking the roles parameter?   The current behavior of assuming a role named 
“” for that defaulted case, does not seem like it would be useful for anyone.

Boris


On Dec 20, 2013, at 8:17 AM, Sven Meier s...@meiers.net wrote:

 AnnotationsRoleAuthorizationStrategy#check() looks good to me.
 
 Can you debug what's happening there in your case?
 
 Sven
 
 On 12/20/2013 01:53 PM, Boris Goldowsky wrote:
 I’m trying to use wicket-auth-roles (in Wicket 1.5.9) to make a component 
 that is enabled only for logged-in users.  In my case if you’re not logged 
 in, you have only a role called GUEST.   If you are logged in you have a 
 role called STUDENT (and also GUEST, since everything guests can do, 
 students can do too).
 
 I tried this annotation at the top of the class:
 
 @AuthorizeActions(actions = { @AuthorizeAction(action=ENABLE, 
 deny={“GUEST}, roles={STUDENT})})
 
 However, everyone is denied (since everyone has the GUEST role).
 
 Then I tried:
 
 @AuthorizeActions(actions = { @AuthorizeAction(action=ENABLE, deny={}, 
 roles={STUDENT})})
 
 but for some reason AbstractRoleAuthorizationStrategy.hasAny(roles) returns 
 true for the empty list of roles, so everyone is denied again.  If I leave 
 out the deny list entirely:
 
 @AuthorizeActions(actions = { @AuthorizeAction(action=ENABLE, 
 roles={STUDENT})})
 
 it is a null pointer exception.
 
 
 I know I can write my own strategy or define my own annotation, but it seems 
 like my case is exactly what the roles annotations are supposed to do.   So  
 either this a bug in wicket-auth-roles, or else I am doing something wrong.  
 Thoughts?
 
 Boris
 
 
 
 -
 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: Question on role-based authorization

2013-12-20 Thread Boris Goldowsky
I should have checked JIRA first.   It looks like this was fixed, but only for 
wicket 6, under this issue:

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

Boris

On Dec 20, 2013, at 8:17 AM, Sven Meier s...@meiers.net wrote:

 AnnotationsRoleAuthorizationStrategy#check() looks good to me.
 
 Can you debug what's happening there in your case?
 
 Sven
 
 On 12/20/2013 01:53 PM, Boris Goldowsky wrote:
 I’m trying to use wicket-auth-roles (in Wicket 1.5.9) to make a component 
 that is enabled only for logged-in users.  In my case if you’re not logged 
 in, you have only a role called GUEST.   If you are logged in you have a 
 role called STUDENT (and also GUEST, since everything guests can do, 
 students can do too).
 
 I tried this annotation at the top of the class:
 
 @AuthorizeActions(actions = { @AuthorizeAction(action=ENABLE, 
 deny={“GUEST}, roles={STUDENT})})
 
 However, everyone is denied (since everyone has the GUEST role).
 
 Then I tried:
 
 @AuthorizeActions(actions = { @AuthorizeAction(action=ENABLE, deny={}, 
 roles={STUDENT})})
 
 but for some reason AbstractRoleAuthorizationStrategy.hasAny(roles) returns 
 true for the empty list of roles, so everyone is denied again.  If I leave 
 out the deny list entirely:
 
 @AuthorizeActions(actions = { @AuthorizeAction(action=ENABLE, 
 roles={STUDENT})})
 
 it is a null pointer exception.
 
 
 I know I can write my own strategy or define my own annotation, but it seems 
 like my case is exactly what the roles annotations are supposed to do.   So  
 either this a bug in wicket-auth-roles, or else I am doing something wrong.  
 Thoughts?
 
 Boris
 
 
 
 -
 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



Contract opportunity in Boston area

2013-05-29 Thread Boris Goldowsky
I head the technology/programming group for a small non-profit educational RD 
organization, CAST  (http://www.cast.org).

We have an opening for an experienced Wicket between now and September.  As a 
highly collaborative group, we'd be thrilled to find someone local who could be 
on site in Wakefield, MA a day or two a week, but we will certainly consider 
other options as well.

Please contact me directly by email if you are interested -

Boris Goldowsky
Director of Technology
CAST, Inc.



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



Static-file resource serving question

2013-01-17 Thread Boris Goldowsky
Hi all -

Trying to upgrade a number of wicket applications from 1.4 to wicket 1.5, and 
then once that's working, to 6.x.

One thing we want to handle is having any reference in the markup such as img 
src=img/logo.png/  be able to find that image in a filesystem directory 
known to the application.  There are  also js and css directories.  These are 
not inside WEB-INF, not in the classpath or anything like that, just out in the 
server's filesystem.

In Wicket 1.4 we handled this as follows:
Add the parent directory of img, js, and css to 
getResourceSettings().addResourceFolder(...)
Define a subclass of URIRequestTargetUrlCodingStrategy whose decode() method 
did this:
return new ResourceStreamRequestTarget(new 
PackageResourceStream(Application.class, / + getMountPath() + / + path))
and set some caching headers.
Mount this URIRequestTargetUrlCodingStrategy on the img path, the js path, 
and the css path.


I am not sure how to accompish this in 1.5 or 6.x.  Can someone help me either 
translate the above strategy, or point out how to use the new request-mapping 
setup to make it simpler and clearer?

BTW I did study 
http://wicketinaction.com/2011/07/wicket-1-5-mounting-resources/ , but that is 
for dynamic images.  Great for database images, but it does not take advantage 
of wicket's understanding of files - their modification dates, caching 
strategies, determining their mime types, etc.   I feel like what I want is a 
superclass of PackageResource that understands files but does not make the 
package assumption - but there is no such superclass.

Bng


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



Re: Static-file resource serving question

2013-01-17 Thread Boris Goldowsky
Thank you, but that doesn't quite accomplish what I was hoping for, since (a) 
I'd have to change all the HTML files, and (b) the images are not, in fact, in 
the same directory as the HTML (or a subdirectory of that location).

Also, I didn't mention it before, but it is useful to be able to 
programmatically get ahold of these images in addition to loading them directly 
from markup.

Bng


On Jan 17, 2013, at 8:13 AM, Martin Grigorov wrote:

 All you need is to wrap it in wicket:linkimg
 src=img/logo.png//wicket:link
 This way Wicket will search for img/logo.png in the same folder where the
 current .html is.
 
 
 On Thu, Jan 17, 2013 at 2:52 PM, Boris Goldowsky bgoldow...@cast.orgwrote:
 
 Hi all -
 
 Trying to upgrade a number of wicket applications from 1.4 to wicket 1.5,
 and then once that's working, to 6.x.
 
 One thing we want to handle is having any reference in the markup such as
 img src=img/logo.png/  be able to find that image in a filesystem
 directory known to the application.  There are  also js and css
 directories.  These are not inside WEB-INF, not in the classpath or
 anything like that, just out in the server's filesystem.
 
 In Wicket 1.4 we handled this as follows:
 Add the parent directory of img, js, and css to
 getResourceSettings().addResourceFolder(...)
 Define a subclass of URIRequestTargetUrlCodingStrategy whose decode()
 method did this:
return new ResourceStreamRequestTarget(new
 PackageResourceStream(Application.class, / + getMountPath() + / + path))
 and set some caching headers.
 Mount this URIRequestTargetUrlCodingStrategy on the img path, the js
 path, and the css path.
 
 
 I am not sure how to accompish this in 1.5 or 6.x.  Can someone help me
 either translate the above strategy, or point out how to use the new
 request-mapping setup to make it simpler and clearer?
 
 BTW I did study
 http://wicketinaction.com/2011/07/wicket-1-5-mounting-resources/ , but
 that is for dynamic images.  Great for database images, but it does not
 take advantage of wicket's understanding of files - their modification
 dates, caching strategies, determining their mime types, etc.   I feel like
 what I want is a superclass of PackageResource that understands files but
 does not make the package assumption - but there is no such superclass.
 
 Bng
 
 
 -
 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 http://jweekend.com/


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



ATOM display in wicket?

2011-10-12 Thread Boris Goldowsky
Is wicketstuff-rome still a usable package with recent Wicket versions, or does 
anyone have an alternative simple way to display an ATOM or RSS feed on a 
wicket page?

Thanks!

Boris



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



Job opening - Boston area

2010-07-14 Thread Boris Goldowsky
Our educational RD non-profit is looking to hire a programmer who has a 
real interest in working to improve education.  You'd have to be in 
commuting distance of Wakefield, MA (just north of Boston).  The job 
will involve lots of building experimental web apps using Wicket.  
Please see

   http://cast.org/about/opportunities/
if you're interested -

Boris


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



Re: Recover from session expiration ?

2010-04-12 Thread Boris Goldowsky
Thanks for the suggestion!  StatelessAjaxFallbackLink is very nearly 
magical.  It in fact almost works, but unfortunately seems incompatible 
with most UrlCodingStrategies.  It generates some spurious URLs with the 
wrong number of ..'s if the page has a subdirectory or two in the URL.  
Back to the debugging cave...


Bng


mbrictson wrote:

Have you seen jolira-tools? It was mentioned here on the mailing list
recently. I haven't used it, but it seems to have some components that are
intended solve the type of stateless ajax problem you are having.

http://code.google.com/p/jolira-tools/wiki/stateless


  


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



Recover from session expiration ?

2010-04-08 Thread Boris Goldowsky
I have a wicket website that stores some user choices around how a page is 
displayed in the Session - simple, non-critical information.  It also uses Ajax 
to do things like bring up a zoomed-in version of an image.

The problem is when sessions expire after an hour or so, trying to zoom an 
image or set a display preference causes an Page Expired exception.  Since 
people aren't logging in or anything, and no mission-critical information is 
being stored in the session, I'd prefer to allow a new session to be 
transparently created when necessary rather than showing users a session 
expired page.

Am I missing some easy way around this problem, or do I need to re-build all 
the functionality to use cookies and jQuery instead of wicket forms and ajax?

This thread seems relevant but didn't seem to have a solution: 
http://www.nabble.com/Graceful-handling-of-ajax-after-session-expiration-tf4559480.html

Thanks for any pointers -

Bng


Re: better way setting up ID for a Wicket component?

2010-03-30 Thread Boris Goldowsky
IDs are needed for e.g. AJAX functionality.  The default Wicket 
implementation of markup IDs will create them smartly, never creating 
duplicate ids even in the case of multiple instances of panels, 
repeaters, etc.


As I understand Wicket best practice, it is never to call setMarkupId() 
at all, and just let the smart default thing happen.  If you *must* call 
it because you have some special requirement for particular IDs, then 
you take on the responsibility for making sure your IDs are unique 
yourself.  In this light, a setMarkupIdToWicketId() method is a 
dangerous thing.


Bng

David Chang wrote:

Craig, I really appreciate your input. If a panel is reused more than one time 
on the same page, then the panel's components should not use IDs in the first 
place. It would always violate valid HTML. Correct?

Regards.
  
  


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



Wicketstuff updated!

2010-03-24 Thread Boris Goldowsky
As discussed, and not hearing any objections, I've updated the 
wicketstuff-core project to depend on Wicket 1.4.7.  wicketstuff-core's 
version number is now 1.4.7-SNAPSHOT, and the idea is that people can 
test it, and barring any major problems it can be released as a stable 
version 1.4.7 .


Now, before people can easily test this, the artifacts need to get into 
the wicket snapshots maven repository, right?  Can someone with the 
requisite permissions make this happen?  In the meantime of course 
people are encouraged to download the projects and build and test them 
locally.


In addition to wicket, the following dependencies were also updated to 
the latest stable version within the same major version of the project.  
I did not attempt to move Lucene from version 2.4.1 to 3.0.1, for 
instance, since more significant changes might be required for this (if 
any subproject is actually using it).


 Jetty: 6.1.22
 Lucene: 2.4.1
 slf4j: 1.5.11
 JUnit: 4.8.1

I had to make a couple of changes to get everything to build with the 
new dependencies (commented out wagon-ssh-external extension from 
inmethod-grid; added new required constructor argument to two instances 
of SpringComponentInjector).  People should test the build and make sure 
these changes are ok.  But at least for me, I can do a mvn install at 
the top level and it works.


Bng


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



Re: Wicketstuff versioning

2010-03-23 Thread Boris Goldowsky
I may be wrong, but wouldn't it make sense to delay creating a 1.4.x
branch until/unless someone actually wants to commit some code that
would be different for 1.4.x and 1.5-SNAPSHOT?  Once we branch, we have
to start committing every bug fix to two different versions, right?  

If we're lucky, everything in Wicketstuff may work fine unchanged with
1.4 and 1.5, and I suggest we can save ourselves a large amount of
headache by just maintaining a single trunk, and bumping the version
after there's an official Wicket release.

Of course, correct me if I'm wrong.  I don't know how fundamentally
different wicket 1.5 is going to be, or if there are a lot of people
running snapshots of it now who would need Wicketstuff to be tracking
it.

Bng


On Mon, 2010-03-22 at 19:07 +0100, Major Péter wrote:
 Yepp, nice chat, but who wants to do the dirty work??
 The first thing would be to create the 1.4.x branch, then release the
 current state as wicketstuff 1.4.7, and then modify the settings of the
 trunk to compile with wicket trunk.
 Let's split these jobs up to people, then do it.
 Also maybe we should write some policies about projects and maintaining
 the projects (like the current maintainers e-mail address should be
 available in the project pom.xml#developers tag, something like that),
 but this is an another thread...
 
 Best Regards,
 Peter


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



Re: Wicketstuff versioning

2010-03-23 Thread Boris Goldowsky
I think this sounds good, and meshes with the comments several other 
people have made.  So I think we're converging on a general agreement 
for a process.   Documenting it on the wiki would be great.


If there are no objections, I can take the first step in this process, 
which would seem to be setting wicketstuff-core's dependency to wicket 
1.4.7, and then asking people to test it.  We should probably set a date 
by which we ask people to test out the modules they use -- otherwise if 
no issues are reported we won't know when to declare the testing period 
over and actually do the release.


How do people feel about the other dependencies in there (jetty, slf4j, 
etc)?  Should we just as a matter of course re-point those to the latest 
stable versions when we do a version bump of wicket and are heading into 
a round of testing?


Bng



Michael O'Cleirigh wrote:

Hello,

I'd like the trunk to follow the latest wicket release since when 
wicketstuff-core is released it is meant to be paired with the current 
wicket release. i.e. not 1.4-SNAPSHOT but 1.4.7, 1.4.8, 1.4.9 and 
eventually into 1.5RC1, etc.


Envisioned Process for 1.4.8 Wicket Release:
1. wicket releases new version 1.4.8
2. wicketstuff-core pom is updated for 1.4.8
3. organized testing and vote on release.
4. release (non SNAPSHOT) artifacts are generated and pushed into 
maven and a svn:/tags/wicketstuff-core-1.4.8 tag is created
5. trunk pom's are changed back to wicketstuff-core version of 
1.4-SNAPSHOT


I think we should only cut one release per wicket main release and any 
other changes just go automatically into the 1.4-SNAPSHOT releases 
that are generated when a developer commits.  If a user needs new 
features in the gap between releases they can just get the SNAPSHOT 
releases.


+1 for creating a svn:/branches/wicketstuff-core-1.4 when trunk 
switches to the 1.5 RC's.  We can then support two release lines but 
everying is tied to wicket main releases.  When wicket end of life's 
the 1.4.x line there will be no more releases just snapshots.  Also 
there should be no developer requirement to sync the 1.4 and 1.5 
branch project contents (i.e. supporting two lines) just maintenance 
on 1.4 branch and new development on trunk.


+1 on creating wicketstuff-core jira to coordinate release process.

+1 on creating a wicketstuff-core/wicketstuff-test module to share 
testing code between core projects.


+1 on running integration tests to find run-time issues before release 
on the generated project artifacts (i.e. like selenium through maven 
integration-test phase).  I know this is hard but maybe a special 
profile in the pom to allow these extended quality checks to be run 
outside of a continuous integration environment prior to release.


+1 improving the wicketstuff developer wiki with details on how the 
release process works  (I'm volunteering)


Regards,

Mike


Id vote for this one:

modify the trunk
first for 1.4.7 fix the incompatibilities if there are, and then release
it as 1.4.7 and make trunk to follow 1.4-SNAPSHOT?

And if you like sonar, it's opensource and requires almost no setup it
has a fluent plugin with maven. For example theres a pretty good
integration between hudson, I could'nt find one for team city though
:/ But in theory it's just running the mvn command sonar:sonar..

2010/3/23 Major Pétermajorpe...@sch.bme.hu:
  

Tests are good, but this could be also arranged with voting, or not?
So what would be the best?
Modify the trunk to use 1.4.7, and release the current state as
wicketstuff 1.4.1 (because it's using 1.4.1 now) or modify the trunk
first for 1.4.7 fix the incompatibilities if there are, and then 
release

it as 1.4.7 and make trunk to follow 1.4-SNAPSHOT?
Or what else do you have in mind?
This sonarsource is good stuff, +1.

Peter

2010-03-23 12:33 keltezéssel, nino martinez wael írta:


+1 for me on upgrading wicketstuff core to 1.4.7.

On another topic making sure that an upgrade actually works are
another thing. Code might compile but there could be runtime
problems.. I discussed looong time ago a possibility for making tests
for the javascript parts of the code aswell, with rhino... We could'nt
really call it stable until we made sure it where that. On another
node I'd suggest adding wicketstuff core to nemo.sonarsource.org , as
it would help showing code metrics etc..

2010/3/23 Stefan Lindnerlind...@visionet.de:
  
Should we really start with a big bang? Support wicketstuff STABLE 
core releases for Wicket 1.4 AND 1.5RCx? Is a RC for Wicket 1.5 in 
sight? Or does this mean everything in wicketstuff will stay as it 
is for a long time?
Why not start with a smaller step and create a core wicketstuff 
release for current wicket 1.4?


Stefan

-Ursprüngliche Nachricht-
Von: Major Péter [mailto:majorpe...@sch.bme.hu]
Gesendet: Dienstag, 23. März 2010 11:38
An: users@wicket.apache.org
Betreff: Re: Wicketstuff versioning

2010-03-23 11:24 keltezéssel, Boris Goldowsky írta

Re: Wicketstuff versioning

2010-03-19 Thread Boris Goldowsky

nino martinez wael wrote:

I'll be happy to join in Boris.
  

That would be awesome, thanks Nino.

I'm thinking the first thing would be to bump the wicket dependency to 
v1.4.7 and do a maven release of the current state of wicketstuff-core 
as version 1.4.7.  Make sense?  Is that something you could do?


Stefan Lindner wrote:
Perhaps we should define an island of stability (like the name wickststuff-core implies). 
I agree with that  the rest of your message.  Jeremy put together a 
nice framework under wicketstuff-core, and there are a decent set of 
modules in there.  How about calling those the stable set.  Anyone can 
put something into core - as long as it works and they're willing to 
make some effort to keep it working.  If one of the core modules breaks 
with a future wicket version, and no one steps up to fix it, then it 
gets dropped out of wicketstuff-core.



And: YES, I would help to maintain such a stable core of wicketstuff.
Great!!  I think with 4 or 5 people it shouldn't be a terrible task.  
(of course I could be wrong...)


Bng


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



Re: Easies way to set custom HTML

2010-03-19 Thread Boris Goldowsky
Do you mean you have HelloPanel with one markup, and HelloMyDearFriends 
with the same functionality but different markup?


In that case define a trivial class HelloMyDearFriends.java extending 
HelloPanel but not changing the function.  Drop in your 
HelloMyDearFriends.html next to it, and you should be set.  Each version 
will use its own markup.


Bng




On Fri, Mar 19, 2010 at 7:39 AM, Sigmar Muuga meedi...@gmail.com wrote:
  

Hello,
which is the easiest way to set custom HTML page for a Page or Panel?
For example I have panel called HelloPanel, conventinally Wicket wants to
pair it with HelloPanel.html in the same package, but I want to
use HelloMyDearFriends.html with that panel...

Sigmar






  


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



Responding to JSON request

2010-03-19 Thread Boris Goldowsky
I'm trying to make the spellcheck part of the wicketstuff tinymce module 
work.  I think the protocol used by the spellchecking plugin may have 
changed since this module was written.


TinyMCE sends a POST request to the server; the post data looks 
something like this (this is JSON format, right?)


|{id:c0,method:checkWords,params:[en,[text,to,check||]]}|


a Resource is trying to respond to this, but how does it get access to 
the post data?  The previous version used getParameters(), but 
getParamters() does not seem to see this post data.


Bng


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



Re: Responding to JSON request

2010-03-19 Thread Boris Goldowsky
It doesn't seem to have any parameter name - I'm looking at the request 
in Firebug and it had just that string.  In the getResourceStream() 
method getParameters().entrySet() always appears to be empty.


The PHP backend that they provide goes through some shenanigans to get 
the raw POST data and parse it.  So perhaps TinyMCE is doing this in a 
non-standard way?


Bng


Igor Vaynberg wrote:

there is no parameter name that it sends it under? the {} string has
to be assigned to something

-igor

On Fri, Mar 19, 2010 at 9:17 AM, Boris Goldowsky bgoldow...@cast.org wrote:
  

I'm trying to make the spellcheck part of the wicketstuff tinymce module
work.  I think the protocol used by the spellchecking plugin may have
changed since this module was written.

TinyMCE sends a POST request to the server; the post data looks something
like this (this is JSON format, right?)

|{id:c0,method:checkWords,params:[en,[text,to,check||]]}|


a Resource is trying to respond to this, but how does it get access to the
post data?  The previous version used getParameters(), but getParamters()
does not seem to see this post data.

Bng


-
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: Wicketstuff versioning

2010-03-18 Thread Boris Goldowsky
Thank you for your thoughts Jeremy -- and your previous work on
WicketStuff.  I am certainly unhappy to hear that it felt like torture
and that junk was being dumped on you rather than getting support from
the community.

I'd volunteer to put a bit of time into this, but I don't have time to
be sole maintainer either.  Maybe there could be a small group who all
helped out - anyone else on this list willing to step up?

I already offered to fix and update the TinyMCE module, but that is
currently stalled since the necessary dependency is not in the
repository and I don't have permissions to add it.

Bng


On Wed, 2010-03-17 at 16:21 -0500, Jeremy Thomerson wrote:

 
 I tried.  I don't have the time it takes.  With the free-for-all access that
 is given to it, people consistently commit inconsistent junk that they don't
 ever intend on maintaining in there.  Feel free to take over - most of the
 reorganization work is already done for you - by me.  You can pick up where
 I left off and carry the torture stake as far as you want.


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



Re: Wicketstuff versioning

2010-03-17 Thread Boris Goldowsky
It sounds like whoever is responsible for wicketstuff needs to make a 
clear choice here.


Is Wicketstuff going to be maintained as a place where lots of useful 
add-ons will live?  If so, it needs someone to take a slightly more 
active role as curator; make sure the releases are done in parallel with 
wicket releases, make sure modules don't get dumped there without at 
least some documentation; and weed out modules that are abandoned, where 
no one volunteers to take on maintenance, or whose function has been 
absorbed into wicket's core.


Alternatively, make it clear that wicketstuff is NOT going to be 
maintained, and people like me who would like to share modules will 
share them in some other way - on Google code, a personal website, or 
whatever.


Either way is ok I think, it just would be useful for those of us who 
are interested in contributing modules to know.


Thanks
Bng


Jeremy Thomerson wrote:

Really, it should match what's at trunk of Wicket, which should be
1.5-SNAPSHOT.  There should be a branch for 1.4.x that is 1.4-SNAPSHOT.
 But, nobody is really maintaining it any more, so it's a free-for-all.
 That's always been the problem with WicketStuff.

--
Jeremy Thomerson
http://www.wickettraining.com



On Tue, Mar 16, 2010 at 1:00 PM, Boris Goldowsky bgoldow...@cast.orgwrote:

  

The wicketstuff-core is calling itself version 1.4.2 in the HEAD of SVN.
Shouldn't this be updated to 1.4.7 now to keep in sync with Wicket?

Bng


-
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



Wicketstuff versioning

2010-03-16 Thread Boris Goldowsky
The wicketstuff-core is calling itself version 1.4.2 in the HEAD of SVN. 
Shouldn't this be updated to 1.4.7 now to keep in sync with Wicket?


Bng


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



Re: TinyMCE components in WicketStuff

2010-03-16 Thread Boris Goldowsky
The TinyMCE package depends on the Jazzy spell checker, which doesn't 
seem to be in any public maven repository.  Would it be reasonable to 
put that jar into the wicketstuff repository?


The latest version appears to be the one at 
https://sourceforge.net/projects/jazzy/files/


Bng

  


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



Re: TinyMCE components in WicketStuff

2010-03-16 Thread Boris Goldowsky
Great.  Can someone with write access to the repository do this?  Or if 
i can do it via my SVN credentials, tell me how.


Thanks!

Bng


Igor Vaynberg wrote:

sure

-igor

On Tue, Mar 16, 2010 at 12:21 PM, Boris Goldowsky bgoldow...@cast.org wrote:
  

The TinyMCE package depends on the Jazzy spell checker, which doesn't seem
to be in any public maven repository.  Would it be reasonable to put that
jar into the wicketstuff repository?

The latest version appears to be the one at
https://sourceforge.net/projects/jazzy/files/

Bng


-

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: Wicket session never expires

2010-03-15 Thread Boris Goldowsky
I once tested when Tomcat sessions actually get expired, and it can be 
very much longer than the given session-timeout value.  Probably if 
there was active traffic the session would be recycled sooner, but I 
think if you need accurate timing then you have to implement something 
yourself rather than depend on the servlet container.


Bng


Martin Asenov wrote:

Hello, everyone!

In web.xml, I've set so:

   session-config
 session-timeout30/session-timeout
   /session-config

However, the session never expires, and typing the app IP this morning I get in 
use the very old session from yesterday evening. And I get some hibernate 
closed connection exceptions...

Would someone give a hint?

Regards,

  


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



Re: TinyMCE components in WicketStuff

2010-03-15 Thread Boris Goldowsky
There's already a jira issue from Feb '09:  
http://wicketstuff.org/jira/browse/WCTINYMCE-6


I can try to put in a patch.  My Sourceforge ID is bgoldowsky if you'd 
like to give me access.


Bng


Igor Vaynberg wrote:

there is a jira instance on wicketstuff where you can report bugs.
however, i dont think the project is maintained so most likely no one
will pay attention to the jira entry.

if you would like to take over the maintenance we can grant you svn access.

-igor

On Fri, Mar 5, 2010 at 9:13 AM, Boris Goldowsky bgoldow...@cast.org wrote:
  

Just curious, is the TinyMCE wicketstuff project abandoned, or are there
plans to update it?
It's using a version of TinyMCE from 2008.

If we updated it, is there someone that we should send patches to?

Boris


-
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



TinyMCE components in WicketStuff

2010-03-05 Thread Boris Goldowsky
Just curious, is the TinyMCE wicketstuff project abandoned, or are there 
plans to update it?

It's using a version of TinyMCE from 2008.

If we updated it, is there someone that we should send patches to?

Boris


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



Question on resource caching

2008-08-19 Thread Boris Goldowsky
Hi,

I have some pages that reference images that are in files external to
the web application and I am serving the images via SharedResources like
so:

public class ExternalImageResource extends WebResource {
  ...
public IResourceStream getResourceStream() {
return new FileResourceStream(file);
}

Note I am never adding these as components to wicket pages -- I just
have HTML that refers to the known shared-resource URLs.

I am puzzled by the fact that if an image is updated on the file system,
the application does not seem to notice this - I get the old version of
the image until the application is shut down and restarted.  It's not
browser or network caching; shift-reload doesn't help.

Am I doing something wrong, or do I need to write my own code to check
the file system periodically for updates?

Thanks

Boris


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]