Re: PackageResourceReference, MetaInfStaticResourceReference and timestamps

2011-03-23 Thread Attila Király
2011/3/24 hok 
>
> 2. In the Servlet 3.0 specification it's possible to have static resources
> under META-INF/resources and I noticed that wicket has
> MetaInfStaticResourceReference, which is better for serving static
> resources. In my case for some components I have css files which are loaded
> like:
>
>response.renderCSSReference(new PackageResourceReference(getClass(),
> getClass().getSimpleName() + ".css"));
>
> So, it should be better to move all those css files under
> META-INF/resources. However, this somehow contradicts with the wicket
> philosophy of having everything in one place and requires maintaining a
> parallel package folder structure under META-INF/resources. Do you think
> it's worth it?
>

Hi,

In my tests I found that Tomcat 7 serves static files from
META-INF/resources directory 2-3 times faster than wicket. So if performance
is important I think it is worth it. I am pragmatic about it: maybe it is
bad to not hold everything in the same directory but this is a feature that
fits wicket pretty well (bundling static files in jars) so it would be worse
to not use it.

Attila


Re: How do I construct criteria using a SQL expression?

2011-03-23 Thread Igor Vaynberg
wrong list dude :)

-igor

On Wed, Mar 23, 2011 at 5:22 PM, Russell Morrisey
 wrote:
> How can I construct a criteria query (or even HQL) with a restriction like 
> the following?
>
> select *
> from item
> inner join program on program.unique_id = item.program_id
> where item.name + ' (' + program.name + ')' like ?
>
> I would like to use Restrictions.sqlRestriction() for the where clause, but I 
> can't figure out how to get the correct SQL alias for the "program" entity.
>
> Thanks,
> 
>
> RUSSELL E. MORRISEY
> Programmer Analyst Professional
> Mission Solutions Engineering, LLC
>
> | russell.morri...@missionse.com | 
> www.missionse.com
> 304 West Route 38, Moorestown, NJ 08057-3212
>
>
> 
> This is a PRIVATE message. If you are not the intended recipient, please 
> delete without copying and kindly advise us by e-mail of the mistake in 
> delivery.
> NOTE: Regardless of content, this e-mail shall not operate to bind MSE to any 
> order or other contract unless pursuant to explicit written agreement or 
> government initiative expressly permitting the use of e-mail for such purpose.
>

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



How do I construct criteria using a SQL expression?

2011-03-23 Thread Russell Morrisey
How can I construct a criteria query (or even HQL) with a restriction like the 
following?

select *
from item
inner join program on program.unique_id = item.program_id
where item.name + ' (' + program.name + ')' like ?

I would like to use Restrictions.sqlRestriction() for the where clause, but I 
can't figure out how to get the correct SQL alias for the "program" entity.

Thanks,


RUSSELL E. MORRISEY
Programmer Analyst Professional
Mission Solutions Engineering, LLC

| russell.morri...@missionse.com | www.missionse.com
304 West Route 38, Moorestown, NJ 08057-3212



This is a PRIVATE message. If you are not the intended recipient, please delete 
without copying and kindly advise us by e-mail of the mistake in delivery.
NOTE: Regardless of content, this e-mail shall not operate to bind MSE to any 
order or other contract unless pursuant to explicit written agreement or 
government initiative expressly permitting the use of e-mail for such purpose.


PackageResourceReference, MetaInfStaticResourceReference and timestamps

2011-03-23 Thread hok
Hello, 
I have two questions:
1. Currently it's possible to have: 

@Override
public void renderHead(final IHeaderResponse response) {
super.renderHead(response);

response.renderCSSReference(new 
PackageResourceReference(getClass(),
getClass().getSimpleName() + ".css"));
response.renderCSSReference("css/root.css");
}

Using a PackageResourceReference has the advantage of adding a last modified
timestamp to the filename (if enabled). Is it possible to have the same
thing for root.css, which resides in the root of the webapp ?

2. In the Servlet 3.0 specification it's possible to have static resources
under META-INF/resources and I noticed that wicket has
MetaInfStaticResourceReference, which is better for serving static
resources. In my case for some components I have css files which are loaded
like: 

response.renderCSSReference(new PackageResourceReference(getClass(),
getClass().getSimpleName() + ".css"));

So, it should be better to move all those css files under
META-INF/resources. However, this somehow contradicts with the wicket
philosophy of having everything in one place and requires maintaining a 
parallel package folder structure under META-INF/resources. Do you think
it's worth it?

Thanks.


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/PackageResourceReference-MetaInfStaticResourceReference-and-timestamps-tp3401055p3401055.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Nested Forms and Multipart Fileupload Issue

2011-03-23 Thread Martin Grigorov
Create a ticket please.
And attach the quickstart.

On Wed, Mar 23, 2011 at 12:19 PM, Stijn Maller wrote:

> Alexander,
>
> I'm facing the same issue and I'm convinced it is a bug.
>
> When a FileUploadField in a nested form causes an error, then:
>
>   - The ErrorMessage is registered on the outer form (instead of the inner
>   form)
>   - The outer form's onError method is called (instead of that of the inner
>   form)
>   - The outer form is considered not valid
>
> This goes against https://cwiki.apache.org/WICKET/nested-forms.html and
> it's
> also the opposite of what happens when the FileUploadField is submitted
> without error. (Only the inner form's onSubmit is called)
>
> As a sidenote, I also find it a bit strange that:
> 1) the FileUploadField itself is considered valid and the error message is
> not registered to this component.
> 2) the onSubmit method of the AjaxButton is called instead of the onError
> method.
>
> Sorry, but I have not found a workaround yet.
>
> Kind regards,
> Stijn
>
>
> On 17 January 2011 17:59, Alexander Morozov
> wrote:
>
> >
> > Hi,
> >
> > I have faced with another problem, related to nested forms and
> > FileUploadField (wicket-1.4.15).
> > The nested form have FileUploadField instance and defined
> setMaxSize(100K).
> > In case of submitting thru Ajax file more than 100K, hasError() on the
> > nested form return false. But I expect here 'true' - because of
> setMaxSize
> > constraint violation. Is this expected behavior ?
> >
> > Quickstart is attached.
> >
> http://apache-wicket.1842946.n4.nabble.com/file/n3221235/modalproject2.zip
> > modalproject2.zip
> >
> > Thanks
> >
> > --
> > View this message in context:
> >
> http://apache-wicket.1842946.n4.nabble.com/Nested-Forms-and-Multipart-Fileupload-Issue-tp1844365p3221235.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 


[wicket 1.5] problems with frontend-proxy (apache)

2011-03-23 Thread Jens Zastrow

Hi experts,
i' migrating to 1.5 version and have problems with my working (1.4) 
apache-configuration.


ProxyPass / http://a.b.c.d:11003/xxx/
ProxyPassReverse / http://a.b.c.d:11003/xxx/
ProxyPassReverseCookiePath /xxx/ /

On my page i have a AbstractAjaxTimerBehavior.
The first access to the page works and the page is shown.
But if the AbstractAjaxTimerBehavior respons comes back,
it contains a redirect to my internal tomcat url.

http://a.b.c.d:11003/xxx/wicket/bookmarkable/org.apache.wicket.markup.html.pages.PageExpiredErrorPage

Any ideas?

Regards
Jens

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



Re: Attribute Inheritance or Copying?

2011-03-23 Thread MattyDE
Thanks Yves, your suggestion works really well.

But i worry about copying attributes like "wicket:id" ... are my worries
eligible?

Any possibilities to exclude this "special" attributes from copying?

Thanks :)

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Attribute-Inheritance-or-Copying-tp3332828p3399490.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Nested Forms and Multipart Fileupload Issue

2011-03-23 Thread Stijn Maller
Alexander,

I'm facing the same issue and I'm convinced it is a bug.

When a FileUploadField in a nested form causes an error, then:

   - The ErrorMessage is registered on the outer form (instead of the inner
   form)
   - The outer form's onError method is called (instead of that of the inner
   form)
   - The outer form is considered not valid

This goes against https://cwiki.apache.org/WICKET/nested-forms.html and it's
also the opposite of what happens when the FileUploadField is submitted
without error. (Only the inner form's onSubmit is called)

As a sidenote, I also find it a bit strange that:
1) the FileUploadField itself is considered valid and the error message is
not registered to this component.
2) the onSubmit method of the AjaxButton is called instead of the onError
method.

Sorry, but I have not found a workaround yet.

Kind regards,
Stijn


On 17 January 2011 17:59, Alexander Morozov
wrote:

>
> Hi,
>
> I have faced with another problem, related to nested forms and
> FileUploadField (wicket-1.4.15).
> The nested form have FileUploadField instance and defined setMaxSize(100K).
> In case of submitting thru Ajax file more than 100K, hasError() on the
> nested form return false. But I expect here 'true' - because of setMaxSize
> constraint violation. Is this expected behavior ?
>
> Quickstart is attached.
> http://apache-wicket.1842946.n4.nabble.com/file/n3221235/modalproject2.zip
> modalproject2.zip
>
> Thanks
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Nested-Forms-and-Multipart-Fileupload-Issue-tp1844365p3221235.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
>
>