Wicket Job Opportunity

2021-12-17 Thread Lon Varscsak
Hey all,

We’re hiring a full-time Apache Wicket/Apache Cayenne developer.  Check it
out here:

https://workforcenow.adp.com/mascsr/default/mdf/recruitment/recruitment.html?cid=894daef4-3a35-4b13-96b7-a3003f6a8cb3=19000101_01=MP=en_US=431036

Ideally the candidate would be willing to relocate to Phoenix, AZ, but
we’re open to other options.

Thanks!

Lon


Re: Page Storage and serialization

2019-09-05 Thread Lon Varscsak
Thanks, I was getting hung up on page store and data stores.  I switched to
wicket 9 for this project and I'm using InSessionPageStore and that seems
to do what I want.  Thanks!


On Wed, Sep 4, 2019 at 10:50 PM Sven Meier  wrote:

> Hi,
>
> you can use a custom page store:
>
>
> https://stackoverflow.com/questions/14823293/how-can-i-disable-serialization-in-wicket-1-5
>
> In Wicket 9 this becomes a little easier.
>
> Have fun
> Sven
>
> Am 4. September 2019 22:04:07 MESZ schrieb Lon Varscsak <
> lon.varsc...@gmail.com>:
> >Hey there,
> >
> >I'm in a bit of a situation and could use some guidance.  I work with a
> >framework where I have problems with deserialization.  So I'm trying to
> >basically just make my app store pages in a cache that doesn't rely on
> >Serializable.  Is there some way to pull this off with stock Wicket?
> >I'm
> >looking at the page storing mechanisms and they all seem to be built
> >off of
> >serialization.  What I'm thinking is just store pages in a memory cache
> >(no
> >serialization/deserialization)...I know this isn't as efficient, but
> >it's
> >what I'm used to in my old web framework and I can't find a good way to
> >get
> >this other framework to deserialize the way I want (hard to explain).
> >
> >Any tips would be appreciated.
> >
> >Thanks,
> >
> >Lon
>


Page Storage and serialization

2019-09-04 Thread Lon Varscsak
Hey there,

I'm in a bit of a situation and could use some guidance.  I work with a
framework where I have problems with deserialization.  So I'm trying to
basically just make my app store pages in a cache that doesn't rely on
Serializable.  Is there some way to pull this off with stock Wicket?  I'm
looking at the page storing mechanisms and they all seem to be built off of
serialization.  What I'm thinking is just store pages in a memory cache (no
serialization/deserialization)...I know this isn't as efficient, but it's
what I'm used to in my old web framework and I can't find a good way to get
this other framework to deserialize the way I want (hard to explain).

Any tips would be appreciated.

Thanks,

Lon


Re: Streaming a PDF into an iFrame

2019-08-28 Thread Lon Varscsak
If it's closing the connection on the PDF pre-maturely, are you getting the
FULL PDF downloaded?

-Lon

On Wed, Aug 28, 2019 at 10:14 AM Benjamin Chew 
wrote:

> Hi Sven,
>
> Hmm... so this seems to be a problem only on specific browsers.
>
> I'm seeing this on:
> - Google Chrome Version 76.0.3809.100 (OS X Mojave & Win 7)
> - Safari Version 12.1.2 (OS X Mojave)
> - IE 11 Version 11.0.135 (Win 7)
>
> And not seeing this on:
> - Firefox Quantum 68.0.2 (OS X Mojave)
> - Firefox Quantum 68.0.1 (Win 7)
>
> Knowing this, I'm going to move on from this issue (for now), but thanks
> for all your help!
>
> Ben
>
>
> On Wed, Aug 28, 2019 at 9:32 AM Sven Meier  wrote:
>
> > Hi Ben,
> >
> > which browser?
> >
> > We had long time problems with IE stopping requests an re-requesting
> > resources without reason.
> >
> > Sven
> >
> > Am 28. August 2019 16:18:23 MESZ schrieb Benjamin Chew <
> > bc...@smarthealth.com>:
> > >Thanks, Sven.
> > >
> > >The weird thing is that this is happening during my testing, and I’m
> > >not navigating away from the page at all...
> > >
> > >Ben
> > >
> > >> On Aug 27, 2019, at 11:34 AM, Sven Meier  wrote:
> > >>
> > >> Hi Benjamin,
> > >>
> > >> this just means that the browser closed the connection before the pdf
> > >was fully loaded from the server, e.g. if the user switches to a
> > >different page before the iframe has finished loading.
> > >>
> > >> Nothing you need/can do about it.
> > >>
> > >> Have fun
> > >> Sven
> > >>
> > >>
> > >>> On 27.08.19 02:13, Benjamin Chew wrote:
> > >>> I said thanks too soon. ;)
> > >>>
> > >>> Now I'm seeing this warning intermittently:
> > >>> org.apache.wicket.protocol.http.servlet.ResponseIOException:
> > >>> org.eclipse.jetty.io.EofException
> > >>> Caused by: org.eclipse.jetty.io.EofException
> > >>> Caused by: java.io.IOException: Broken pipe
> > >>>
> > >>> Is there anything in the DocumentInlineFrame class or the way I'm
> > >using it
> > >>> that would cause this problem?
> > >>>
> > >>> Thanks,
> > >>> Ben
> > >>>
> > >>> /*** Calling Class ***/
> > >>> queue(new DocumentInlineFrame("ticketsIFrame", new
> > >ResourceStreamResource()
> > >>> {
> > >>>@Override
> > >>>protected IResourceStream getResourceStream(Attributes
> > >attributes) {
> > >>>return
> > >>> pdfStream(getReports().get(SHTicketUtils.TICKET_REPORT_STRING));
> > >>>}
> > >>>
> >
> >
> >}.setCacheDuration(Duration.NONE).setContentDisposition(ContentDisposition.INLINE).setFileName("Tickets.pdf")));
> > >>>
> > >>>
> > >>>
> > >>> /*** DocumentInlineFrame Class ***/
> > >>> public class DocumentInlineFrame extends WebMarkupContainer
> > >implements
> > >>> IRequestListener {
> > >>> private static final long serialVersionUID = 1 L;
> > >>> private IResource documentResource;
> > >>>
> > >>> /**
> > >>>  * Constructor receiving an IResourceStream..
> > >>>  *
> > >>>  * @param id
> > >>>  * @param stream
> > >>>  */
> > >>> public DocumentInlineFrame(String id, IResourceStream stream) {
> > >>> this(id, new ResourceStreamResource(stream));
> > >>> }
> > >>>
> > >>> /**
> > >>>  * Constructor receiving an IResource..
> > >>>  *
> > >>>  * @param id
> > >>>  * @param resourceListener
> > >>>  */
> > >>> public DocumentInlineFrame(final String id, IResource
> > >documentResource)
> > >>> {
> > >>> super(id);
> > >>> this.documentResource = documentResource;
> > >>> }
> > >>>
> > >>> /**
> > >>>  * Gets the url to use for this link.
> > >>>  *
> > >>>  * @return The URL that this link links to
> > >>>  */
> > >>> protected CharSequence getURL() {
> > >>> return urlForListener(null);
> > >>> }
> > >>>
> > >>> /**
> > >>>  * Handles this frame's tag.
> > >>>  *
> > >>>  * @param tag the component tag
> > >>>  * @see org.apache.wicket.Component#onComponentTag(ComponentTag)
> > >>>  */
> > >>> @Override
> > >>> protected void onComponentTag(final ComponentTag tag) {
> > >>> checkComponentTag(tag, "iframe");
> > >>>
> > >>> // Set href to link to this frame's frameRequested method
> > >>> CharSequence url = getURL();
> > >>>
> > >>> // Generate the src attribute
> > >>> tag.put("src", Strings.replaceAll(url, "&", ""));
> > >>>
> > >>> super.onComponentTag(tag);
> > >>> }
> > >>>
> > >>> @Override
> > >>> protected boolean getStatelessHint() {
> > >>> return false;
> > >>> }
> > >>>
> > >>> @Override
> > >>> public boolean rendersPage() {
> > >>> return false;
> > >>> }
> > >>>
> > >>> @Override
> > >>> public void onRequest() {
> > >>> RequestCycle requestCycle = RequestCycle.get();
> > >>> Attributes attributes = new
> > >Attributes(requestCycle.getRequest(),
> > >>> requestCycle.getResponse(), null);
> > >>>
> > >>> this.documentResource.respond(attributes);
> > >>> }
> > >>> 

Re: Cayenne firing faults when it shouldn’t be (or at least I don’t think it should be)

2018-05-12 Thread Lon Varscsak
Oh my, sorry about that.  No it was for Apache Cayenne (which is awesome
btw :P)

On Fri, May 11, 2018 at 1:11 AM, Maxim Solodovnik <solomax...@gmail.com>
wrote:

> Was it for OpenJpa?
>
> On Fri, May 11, 2018 at 2:43 PM, Martin Grigorov <mgrigo...@apache.org>
> wrote:
>
> > Hey Lon,
> >
> > I think you've sent you message to the wrong users@ mailing list.
> > I've done this mistake several times ! :-)
> >
> > On Fri, May 11, 2018 at 5:48 AM, Lon Varscsak <lon.varsc...@gmail.com>
> > wrote:
> >
> > > I have a situation where I fetched a large amount of objects (50k) and
> > > prefetched a bunch of relationships…this all worked as expected
> > (although I
> > > didn’t realize that this set of data was that large at the time)…but
> what
> > > caught my eye is that even though it pre-fetched the relationships it
> was
> > > firing some of the those same relationship’s faults.  I _think_ they
> were
> > > all to-one (not sure that matters), but something that I thought of.
> > >
> > > Is faulting in any way tied to object cache and since the result set is
> > so
> > > large that some things have fallen out of cache and get re-faulted?
> > >
> > > -Lon
> > >
> >
>
>
>
> --
> WBR
> Maxim aka solomax
>


Cayenne firing faults when it shouldn’t be (or at least I don’t think it should be)

2018-05-10 Thread Lon Varscsak
I have a situation where I fetched a large amount of objects (50k) and
prefetched a bunch of relationships…this all worked as expected (although I
didn’t realize that this set of data was that large at the time)…but what
caught my eye is that even though it pre-fetched the relationships it was
firing some of the those same relationship’s faults.  I _think_ they were
all to-one (not sure that matters), but something that I thought of.

Is faulting in any way tied to object cache and since the result set is so
large that some things have fallen out of cache and get re-faulted?

-Lon


Re: ResourceStreamRequestHandler and page refresh

2018-04-19 Thread Lon Varscsak
Okay, cool.  I did see this, but one of the things I was perplexed about is
how to get an IResource into the AjaxDownloadBehavior at the time of
onClick.  I guess in onClick I could set an ivar to some resource and model
load from there.  Any other ideas?

-Lon

On Wed, Apr 18, 2018 at 9:53 PM, Sven Meier <s...@meiers.net> wrote:

> Hi,
>
> you'll have to update your page first and then initiate the download.
>
> For Ajax you can use:
>  https://github.com/apache/wicket/blob/master/wicket-
> extensions/src/main/java/org/apache/wicket/extensions/ajax/
> AjaxDownloadBehavior.java
>
> For Wicket<8 you'll find its predecessor  AjaxDownload on the web.
>
> Have fun
> Sven
>
> Am 19. April 2018 02:20:25 MESZ schrieb Lon Varscsak <
> lon.varsc...@gmail.com>:
> >Hey all,
> >
> >I've got a Link that I use to generate and download a report.  I'm
> >using a
> >ResourceStreamRequestHandler and
> >getRequestCycle().scheduleRequestHandlerAfterCurrent which works fine,
> >except that I was expecting my current request to finish as if it were
> >a
> >regular link.  In this case, I'd want it to refresh the page I'm on,
> >but it
> >doesn't do that.
> >
> >Anyway to accomplish this?
> >
> >-Lon
>


ResourceStreamRequestHandler and page refresh

2018-04-18 Thread Lon Varscsak
Hey all,

I've got a Link that I use to generate and download a report.  I'm using a
ResourceStreamRequestHandler and
getRequestCycle().scheduleRequestHandlerAfterCurrent which works fine,
except that I was expecting my current request to finish as if it were a
regular link.  In this case, I'd want it to refresh the page I'm on, but it
doesn't do that.

Anyway to accomplish this?

-Lon


Re: IP Authentication

2018-04-11 Thread Lon Varscsak
Perfect, this is what I was looking for.  So if I wanted to hijack the
whole response (for other purposes), I would do the same thing, but with a
custom request handler?

On Tue, Apr 10, 2018 at 11:24 PM, Martin Grigorov <mgrigo...@apache.org>
wrote:

> Hi,
>
> On Tue, Apr 10, 2018 at 11:49 PM, Lon Varscsak <lon.varsc...@gmail.com>
> wrote:
>
> > I have a need to build some apps (or mount points) to check if the source
> > is coming from an internal IP and if not, present the user with an
> > "unauthorized" request.  I know how to check client IP and what not, but
> > I'm not sure how to generate programmatically a simple WebResponse that
> is
> > just some text with a status code.
> >
> > 1) I'm currently using IRequestCycleListener to listen and then hijack
> the
> > response.  Not sure if this is the appropriate place.
> >
>
> This is the Wicket way.
> You can also use plain Servlet Filter to do it even before Wicket has a
> chance to see the request.
>
>
> > 2) How do you programmatically generate a response without implementing
> all
> > the methods of WebResponse.  At the point that the IRequestCycleListener
> > the response that is in the cycle already has content.  Basically I want
> to
> > throw that away and return "Unauthorized"/401.
> >
>
> requestCycle.replaceAllRequestHandlers(new ErrorCodeRequestHandler(401,
> "Unauthorized"))
>
>
> >
> > Any thoughts or suggestions?
> >
> > Thanks!
> >
> > Lon
> >
>


IP Authentication

2018-04-10 Thread Lon Varscsak
I have a need to build some apps (or mount points) to check if the source
is coming from an internal IP and if not, present the user with an
"unauthorized" request.  I know how to check client IP and what not, but
I'm not sure how to generate programmatically a simple WebResponse that is
just some text with a status code.

1) I'm currently using IRequestCycleListener to listen and then hijack the
response.  Not sure if this is the appropriate place.
2) How do you programmatically generate a response without implementing all
the methods of WebResponse.  At the point that the IRequestCycleListener
the response that is in the cycle already has content.  Basically I want to
throw that away and return "Unauthorized"/401.

Any thoughts or suggestions?

Thanks!

Lon


Re: Performance issue (possible bug since 7.2.0…up to and including 8.0.0-M8)

2017-12-13 Thread Lon Varscsak
Thanks guys, I filed WICKET-6506.

-Lon

On Wed, Dec 13, 2017 at 2:15 AM, Emond Papegaaij <emond.papega...@topicus.nl
> wrote:

> Martin is right. It seems like you found a regression in the changes made
> for
> WICKET-6021. In general, the performance was increased by those changes,
> but
> evidently not in this case. Please create a JIRA issue and attach a
> quickstart
> that shows the problem. That should help us debug this regression.
>
> Best regards,
> Emond
>
> On woensdag 13 december 2017 05:39:15 CET Martin Makundi wrote:
> > Performance is no joking mantter =)
> >
> > 2017-12-13 3:56 GMT+02:00 Lon Varscsak <lon.varsc...@gmail.com>:
> > > Haha, sure…I was sure someone was going to argue with me. :P
> > >
> > > -Lon
> > >
> > > On Tue, Dec 12, 2017 at 6:23 PM, Martin Makundi <
> > >
> > > martin.maku...@koodaripalvelut.com> wrote:
> > > > Good find! Sounds like a bug, file to jira?
> > > >
> > > > 2017-12-12 23:38 GMT+02:00 Lon Varscsak <lon.varsc...@gmail.com>:
> > > > > Okay, so here's the situation, I have a component where an Ajax
> > > > > request
> > > > > displays a large table (1000ish rows).  It display fast, no
> problem,
> > >
> > > not
> > >
> > > > a
> > > >
> > > > > great use of resources (not paginating), but ignore that for now.
> I
> > >
> > > then
> > >
> > > > > have another Ajax request where I tell the wicket component to not
> be
> > > > > visible and refresh an area.  No problem so far (although slightly
> > >
> > > slow,
> > >
> > > > > since it's not generating much html, should be faster).  Now EVERY
> > > > > Ajax
> > > > > request that updates the same area (with the component not in the
> > > > > html)
> > > > > takes a long time to respond (half second), even though it should
> be
> > > > > returning in ms, because the html is pretty minimal.
> > > > >
> > > > > I hooked it up to a profiler and found that it's spending a large
> > >
> > > amount
> > >
> > > > of
> > > >
> > > > > CPU time in
> > > > > MarkupContainer$MarkupChildIterator.refreshInternalIteratorIfNeede
> d().
> > > >
> > > > I'm
> > > >
> > > > > not sure why it would be traversing the component hierarchy of the
> > >
> > > table
> > >
> > > > > that's not even visible…but I don't know enough of the
> architecture of
> > > > > wicket to really say…which is why I've come here. :)
> > > > >
> > > > > I've gone back to 7.1.0 and can confirm that in that version this
> > > >
> > > > "problem"
> > > >
> > > > > does not exist.  The Ajax request is as fast as if I've never
> loaded
> > >
> > > the
> > >
> > > > > large table.
> > > > >
> > > > > So I've attached a link to a Quickstart showing the problem
> (currently
> > > > > configured for 8.0.0-M8, but can be complied down to 7.0.0).  When
> > > >
> > > > loading
> > > >
> > > > > the page, first click the refresh link…this will essentially
> refresh
> > >
> > > all
> > >
> > > > > the contents in an Ajax request and give you a sense of how fast it
> > > > > _should_ be.  The table has not been visible yet, so there have
> been
> > > > > no
> > > > > ListView items created yet.  Then click "show table", this will
> > >
> > > generate
> > >
> > > > 2k
> > > >
> > > > > dummy rows and redisplay the area.  It's obviously slower because
> it's
> > > > > generating 350k of html (but surprisingly fast :P).  Then click
> hide
> > > > > table.  It takes about the same amount of time to hide the table
> as it
> > > >
> > > > does
> > > >
> > > > > to show it, which is odd, because the html being regenerated is the
> > >
> > > same
> > >
> > > > as
> > > >
> > > > > if there were no table displayed.  Then go ahead and click
> "refresh"
> > >
> > > and
> > >
> > > > > you'll see that refreshing a basically empty component is slow
> because
> > > >
> > > > it's
> > > >
> > > > > referencing all the components in the wicket hierarchy (
> > > > > MarkupChildIterator.refreshInternalIteratorIfNeeded)even though
> > >
> > > they're
> > >
> > > > > not
> > > > > visible.
> > > > >
> > > > > Thoughts?  I recognize that the first response will be "don't
> display
> > > >
> > > > 1000
> > > >
> > > > > rows", but lets ignore that for now.
> > > > >
> > > > > Thanks!
> > > > >
> > > > > -Lon
> > > > >
> > > > > Here's the link to the Quickstart:
> > > > > https://www.dropbox.com/s/l0uxsibmh24nsoh/slownesstest.tar.gz?dl=0
>
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: Performance issue (possible bug since 7.2.0…up to and including 8.0.0-M8)

2017-12-12 Thread Lon Varscsak
Haha, sure…I was sure someone was going to argue with me. :P

-Lon

On Tue, Dec 12, 2017 at 6:23 PM, Martin Makundi <
martin.maku...@koodaripalvelut.com> wrote:

> Good find! Sounds like a bug, file to jira?
>
> 2017-12-12 23:38 GMT+02:00 Lon Varscsak <lon.varsc...@gmail.com>:
>
> > Okay, so here's the situation, I have a component where an Ajax request
> > displays a large table (1000ish rows).  It display fast, no problem, not
> a
> > great use of resources (not paginating), but ignore that for now.  I then
> > have another Ajax request where I tell the wicket component to not be
> > visible and refresh an area.  No problem so far (although slightly slow,
> > since it's not generating much html, should be faster).  Now EVERY Ajax
> > request that updates the same area (with the component not in the html)
> > takes a long time to respond (half second), even though it should be
> > returning in ms, because the html is pretty minimal.
> >
> > I hooked it up to a profiler and found that it's spending a large amount
> of
> > CPU time in
> > MarkupContainer$MarkupChildIterator.refreshInternalIteratorIfNeeded().
> I'm
> > not sure why it would be traversing the component hierarchy of the table
> > that's not even visible…but I don't know enough of the architecture of
> > wicket to really say…which is why I've come here. :)
> >
> > I've gone back to 7.1.0 and can confirm that in that version this
> "problem"
> > does not exist.  The Ajax request is as fast as if I've never loaded the
> > large table.
> >
> > So I've attached a link to a Quickstart showing the problem (currently
> > configured for 8.0.0-M8, but can be complied down to 7.0.0).  When
> loading
> > the page, first click the refresh link…this will essentially refresh all
> > the contents in an Ajax request and give you a sense of how fast it
> > _should_ be.  The table has not been visible yet, so there have been no
> > ListView items created yet.  Then click "show table", this will generate
> 2k
> > dummy rows and redisplay the area.  It's obviously slower because it's
> > generating 350k of html (but surprisingly fast :P).  Then click hide
> > table.  It takes about the same amount of time to hide the table as it
> does
> > to show it, which is odd, because the html being regenerated is the same
> as
> > if there were no table displayed.  Then go ahead and click "refresh" and
> > you'll see that refreshing a basically empty component is slow because
> it's
> > referencing all the components in the wicket hierarchy (
> > MarkupChildIterator.refreshInternalIteratorIfNeeded)even though they're
> > not
> > visible.
> >
> > Thoughts?  I recognize that the first response will be "don't display
> 1000
> > rows", but lets ignore that for now.
> >
> > Thanks!
> >
> > -Lon
> >
> > Here's the link to the Quickstart:
> > https://www.dropbox.com/s/l0uxsibmh24nsoh/slownesstest.tar.gz?dl=0
> >
>


Performance issue (possible bug since 7.2.0…up to and including 8.0.0-M8)

2017-12-12 Thread Lon Varscsak
Okay, so here's the situation, I have a component where an Ajax request
displays a large table (1000ish rows).  It display fast, no problem, not a
great use of resources (not paginating), but ignore that for now.  I then
have another Ajax request where I tell the wicket component to not be
visible and refresh an area.  No problem so far (although slightly slow,
since it's not generating much html, should be faster).  Now EVERY Ajax
request that updates the same area (with the component not in the html)
takes a long time to respond (half second), even though it should be
returning in ms, because the html is pretty minimal.

I hooked it up to a profiler and found that it's spending a large amount of
CPU time in
MarkupContainer$MarkupChildIterator.refreshInternalIteratorIfNeeded(). I'm
not sure why it would be traversing the component hierarchy of the table
that's not even visible…but I don't know enough of the architecture of
wicket to really say…which is why I've come here. :)

I've gone back to 7.1.0 and can confirm that in that version this "problem"
does not exist.  The Ajax request is as fast as if I've never loaded the
large table.

So I've attached a link to a Quickstart showing the problem (currently
configured for 8.0.0-M8, but can be complied down to 7.0.0).  When loading
the page, first click the refresh link…this will essentially refresh all
the contents in an Ajax request and give you a sense of how fast it
_should_ be.  The table has not been visible yet, so there have been no
ListView items created yet.  Then click "show table", this will generate 2k
dummy rows and redisplay the area.  It's obviously slower because it's
generating 350k of html (but surprisingly fast :P).  Then click hide
table.  It takes about the same amount of time to hide the table as it does
to show it, which is odd, because the html being regenerated is the same as
if there were no table displayed.  Then go ahead and click "refresh" and
you'll see that refreshing a basically empty component is slow because it's
referencing all the components in the wicket hierarchy (
MarkupChildIterator.refreshInternalIteratorIfNeeded)even though they're not
visible.

Thoughts?  I recognize that the first response will be "don't display 1000
rows", but lets ignore that for now.

Thanks!

-Lon

Here's the link to the Quickstart:
https://www.dropbox.com/s/l0uxsibmh24nsoh/slownesstest.tar.gz?dl=0


Re: Wicket 8 GA for production

2017-10-11 Thread Lon Varscsak
I agree with this wholeheartedly…I was just having this discussion with my
boss yesterday.  I do not understand (mostly) this drive to push stateless
frameworks (client or server).  Obviously your framework needs to support
stateless as to not waste resources, but almost every application I write
is complex enough that without servers side state, I’d spend more time
trying to figure out how to store state.

It’s one of the things I loved about Apple’s WebObjects and one of the
reasons I’ve moved to Wicket over other more “popular” java frameworks.

-Lon

On Wed, Oct 11, 2017 at 3:35 AM, Andrea Del Bene 
wrote:

> Obviously I 101% agree :-). In addition to security issue I usually have to
> struggle against the "big lie" of modern front-end libs which is "if you
> follow us your application can be stateless". Non-trivial applications are
> never stateless. If you have some sort of login mechanism you application
> must handle a state somewhere! I've always seen these "modern" js
> applications suffering of performance issues because they have
> unconsciously  moved state to database and they end up over-stressing it
> because they want the application level to be "stateless". That's pure
> madness to me!


Re: DiskDataStore error

2017-08-24 Thread Lon Varscsak
Hey Martin, yeah the file is owned by me and it’s a file not a directory.
I upgraded to M7 and I don’t seem to get the error anymore.

-Lon

On Wed, Aug 23, 2017 at 11:11 PM, Martin Grigorov <mgrigo...@apache.org>
wrote:

> Hi,
>
> The same error can happen if the Tomcat/Jetty process doesn't have
> permissions to read/write this file.
> Check that this file is owned by the Tomcat user and that it is a file, not
> a directory.
>
> Martin Grigorov
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
>
> On Thu, Aug 24, 2017 at 1:38 AM, Lon Varscsak <lon.varsc...@gmail.com>
> wrote:
>
> > As always, I forgot to include the version. :)* 8.0.0-M6*
> >
> > On Wed, Aug 23, 2017 at 2:58 PM, Lon Varscsak <lon.varsc...@gmail.com>
> > wrote:
> >
> > > Hey guys, I’m getting this error on an app (on my dev/Mac machine):
> > >
> > > java.io.FileNotFoundException: /var/folders/3g/
> > > vcn2yyls05q249yzkbp457qmgn/T/wicket-filestore/8289/6329/
> > > 1rjb8e27m1orf1mnxttof0qy22/data (No such file or directory)
> > >
> > > at java.io.RandomAccessFile.open0(Native Method)
> > >
> > > at java.io.RandomAccessFile.open(RandomAccessFile.java:316)
> > >
> > > at java.io.RandomAccessFile.(RandomAccessFile.java:243)
> > >
> > > at org.apache.wicket.pageStore.DiskDataStore$SessionEntry.
> > getFileChannel(
> > > DiskDataStore.java:432)
> > >
> > > at org.apache.wicket.pageStore.DiskDataStore$SessionEntry.savePage(
> > > DiskDataStore.java:350)
> > >
> > > at org.apache.wicket.pageStore.DiskDataStore.storeData(DiskDa
> > > taStore.java:188)
> > >
> > > at org.apache.wicket.pageStore.AsynchronousDataStore$
> > > PageSavingRunnable.run(AsynchronousDataStore.java:340)
> > >
> > > at java.lang.Thread.run(Thread.java:745)
> > >
> > >
> > > That file does exist which means it must be locked, but I don’t know
> why
> > I
> > > would be getting this error.  I’m not really sure what I’d be doing in
> > this
> > > application to trigger this error.  Thoughts?
> > >
> > > Thanks!
> > >
> > > -Lon
> > >
> >
>


Re: DiskDataStore error

2017-08-23 Thread Lon Varscsak
As always, I forgot to include the version. :)* 8.0.0-M6*

On Wed, Aug 23, 2017 at 2:58 PM, Lon Varscsak <lon.varsc...@gmail.com>
wrote:

> Hey guys, I’m getting this error on an app (on my dev/Mac machine):
>
> java.io.FileNotFoundException: /var/folders/3g/
> vcn2yyls05q249yzkbp457qmgn/T/wicket-filestore/8289/6329/
> 1rjb8e27m1orf1mnxttof0qy22/data (No such file or directory)
>
> at java.io.RandomAccessFile.open0(Native Method)
>
> at java.io.RandomAccessFile.open(RandomAccessFile.java:316)
>
> at java.io.RandomAccessFile.(RandomAccessFile.java:243)
>
> at org.apache.wicket.pageStore.DiskDataStore$SessionEntry.getFileChannel(
> DiskDataStore.java:432)
>
> at org.apache.wicket.pageStore.DiskDataStore$SessionEntry.savePage(
> DiskDataStore.java:350)
>
> at org.apache.wicket.pageStore.DiskDataStore.storeData(DiskDa
> taStore.java:188)
>
> at org.apache.wicket.pageStore.AsynchronousDataStore$
> PageSavingRunnable.run(AsynchronousDataStore.java:340)
>
> at java.lang.Thread.run(Thread.java:745)
>
>
> That file does exist which means it must be locked, but I don’t know why I
> would be getting this error.  I’m not really sure what I’d be doing in this
> application to trigger this error.  Thoughts?
>
> Thanks!
>
> -Lon
>


DiskDataStore error

2017-08-23 Thread Lon Varscsak
Hey guys, I’m getting this error on an app (on my dev/Mac machine):

java.io.FileNotFoundException:
/var/folders/3g/vcn2yyls05q249yzkbp457qmgn/T/wicket-filestore/8289/6329/1rjb8e27m1orf1mnxttof0qy22/data
(No such file or directory)

at java.io.RandomAccessFile.open0(Native Method)

at java.io.RandomAccessFile.open(RandomAccessFile.java:316)

at java.io.RandomAccessFile.(RandomAccessFile.java:243)

at org.apache.wicket.pageStore.DiskDataStore$SessionEntry.getFileChannel(
DiskDataStore.java:432)

at org.apache.wicket.pageStore.DiskDataStore$SessionEntry.savePage(
DiskDataStore.java:350)

at org.apache.wicket.pageStore.DiskDataStore.storeData(
DiskDataStore.java:188)

at org.apache.wicket.pageStore.AsynchronousDataStore$PageSavingRunnable.run(
AsynchronousDataStore.java:340)

at java.lang.Thread.run(Thread.java:745)


That file does exist which means it must be locked, but I don’t know why I
would be getting this error.  I’m not really sure what I’d be doing in this
application to trigger this error.  Thoughts?

Thanks!

-Lon


Re: Stateless page to return JSON data

2017-08-14 Thread Lon Varscsak
Thanks Andrea, I’ll check it out.

-Lon

On Sun, Aug 13, 2017 at 5:03 AM, Andrea Del Bene <an.delb...@gmail.com>
wrote:

> Hi,
>
> consider also to use resources (interface IResource) instead of pages when
> you have to build a REST API. WicketStuff project offers Wicket Rest
> Annotations module to write such kind of resources and since you are using
> Wicket 8 you can also consider to choose Lambda Rest Module:
> https://dzone.com/articles/rest-with-lamdas-and-wicket-8
>
>
> On 13/08/2017 07:16, Lon Varscsak wrote:
>
>> Never mind…I didn’t realize that Session objects could be temporary
>> (generated for 1 request only). :D
>>
>> On Sat, Aug 12, 2017 at 9:02 PM, Lon Varscsak <lon.varsc...@gmail.com>
>> wrote:
>>
>> Sorry, missed the version:  *8.0.0-M7*
>>>
>>> On Sat, Aug 12, 2017 at 9:01 PM, Lon Varscsak <lon.varsc...@gmail.com>
>>> wrote:
>>>
>>> So I was building a simple WebPage to return JSON data, but I’m surprised
>>>> that it’s creating a session.  The code is pretty simple, I’m just using
>>>> scheduleRequestHandlerAfterCurrent to return JSON content.  No real
>>>> components on the page and I set stateless hint to true in the
>>>> constructor.
>>>>
>>>> But when init() on the page is called, it ends up calling dirty(true)
>>>> which ends up creating a session to get the page manager.
>>>>
>>>> I’m sure I’m missing something obvious…any thoughts?
>>>>
>>>> -Lon
>>>>
>>>>
>>>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: Stateless page to return JSON data

2017-08-12 Thread Lon Varscsak
Never mind…I didn’t realize that Session objects could be temporary
(generated for 1 request only). :D

On Sat, Aug 12, 2017 at 9:02 PM, Lon Varscsak <lon.varsc...@gmail.com>
wrote:

> Sorry, missed the version:  *8.0.0-M7*
>
> On Sat, Aug 12, 2017 at 9:01 PM, Lon Varscsak <lon.varsc...@gmail.com>
> wrote:
>
>> So I was building a simple WebPage to return JSON data, but I’m surprised
>> that it’s creating a session.  The code is pretty simple, I’m just using
>> scheduleRequestHandlerAfterCurrent to return JSON content.  No real
>> components on the page and I set stateless hint to true in the constructor.
>>
>> But when init() on the page is called, it ends up calling dirty(true)
>> which ends up creating a session to get the page manager.
>>
>> I’m sure I’m missing something obvious…any thoughts?
>>
>> -Lon
>>
>
>


Re: Stateless page to return JSON data

2017-08-12 Thread Lon Varscsak
Sorry, missed the version:  *8.0.0-M7*

On Sat, Aug 12, 2017 at 9:01 PM, Lon Varscsak <lon.varsc...@gmail.com>
wrote:

> So I was building a simple WebPage to return JSON data, but I’m surprised
> that it’s creating a session.  The code is pretty simple, I’m just using
> scheduleRequestHandlerAfterCurrent to return JSON content.  No real
> components on the page and I set stateless hint to true in the constructor.
>
> But when init() on the page is called, it ends up calling dirty(true)
> which ends up creating a session to get the page manager.
>
> I’m sure I’m missing something obvious…any thoughts?
>
> -Lon
>


Stateless page to return JSON data

2017-08-12 Thread Lon Varscsak
So I was building a simple WebPage to return JSON data, but I’m surprised
that it’s creating a session.  The code is pretty simple, I’m just using
scheduleRequestHandlerAfterCurrent to return JSON content.  No real
components on the page and I set stateless hint to true in the constructor.

But when init() on the page is called, it ends up calling dirty(true) which
ends up creating a session to get the page manager.

I’m sure I’m missing something obvious…any thoughts?

-Lon


Form validation and model objects not getting updated on failure

2017-06-27 Thread Lon Varscsak
Hey there, so I have a form with many textfields all of which have
validators on them.  In a situation where I’m creating a “new” record, all
the fields are blank.  I also have a DropDownChoice object with an
AjaxFormSubmitBehavior (“change”) attached.

If the user clicks “save” prematurely, obviously there will be a lot of
errors on the form.  Also if the first thing they do is choose an option in
the DropDownChoice some of the form values are invalid.  The problem that I
have is that it seems like even though some of the values (in this case the
form component bound to the drop down choice) are valid, those values don’t
make it into the model because of the other invalid values.

Is there a way to circumvent this?  I’m okay with fields that have invalid
values not making it into their model objects (makes sense most of the
time), but in this case I want some to not update and some to update.

Thanks for your time,

Lon


Re: Refreshing form after model objects changed

2017-06-22 Thread Lon Varscsak
It’s really not that complex.  The form has invalid input, something
happens and the model object changes the state of said input, the form does
not reflect the new model changes.  I was just hoping for something
automatic.

-Lon

On Wed, Jun 21, 2017 at 9:53 PM, Sven Meier <s...@meiers.net> wrote:

> Hi Lon,
>
> whatever you are trying to do, it's sounds too complicated.
>
> FormComponents keep invalid input. That's an essential feature. Clear the
> input when you no longer want it.
> You can use your own implementation that clears invisible components too.
>
> I fail to see what that has to do with models. Yes, modelchanged clears
> the input too, but I wouldn't mix these two aspects.
>
> Have fun
> Sven
>
>
>
> Am 21. Juni 2017, 22:54, um 22:54, Lon Varscsak <lon.varsc...@gmail.com>
> schrieb:
> >Digging in a little deeper, I learned that if my data comes from the
> >forms
> >model (which is not how I’m currently doing things), and then create a
> >new
> >model, everything works as I’d expect.
> >
> >So in my case, I have a bunch of FormComponents that use a
> >PropertyModel to
> >do their work.  Rather than visiting all of the FormComponents and
> >calling
> >modelChanged() is there a better way to do this?  I’m not so keen on
> >CompoundPropertyModel (although I can’t articulate why yet :P)…probably
> >because I may have more than one model for a given page.
> >
> >So I’m thinking of a nested model for my object(s) storing them in
> >ivars,
> >and then replacing those when I show.  I’m just not sure if there’s an
> >existing class that will let me use a model as a basis for another
> >model
> >(not that that seems hard to write).  So I’m looking for what others
> >are
> >doing.
> >
> >Thanks!
> >
> >-Lon
> >
> >On Wed, Jun 21, 2017 at 1:04 PM, Lon Varscsak <lon.varsc...@gmail.com>
> >wrote:
> >
> >> Yeah, I had convinced myself on the way home that it was a feature
> >> too…until I thought about the model data having changed.
> >>
> >> So I looked into the form.clearInput() (thanks for that tip) and the
> >model
> >> object is in a particular state that has field is hidden at the time
> >I do
> >> the clear.  So it’s that my model object has changed and my UI
> >doesn’t
> >> reflect the current state (because of this feature) once they make
> >the
> >> field visible.
> >>
> >> It just feels like a little bit of an odd case (not that I know how
> >it
> >> would be better).  I guess I’ll switch to not reusing the component
> >(which
> >> is fine), I just think I’m going to bit by this more than once. :)
> >>
> >> -Lon
> >>
> >> On Wed, Jun 21, 2017 at 10:44 AM, Sven Meier <s...@meiers.net> wrote:
> >>
> >>> Hi,
> >>>
> >>> if you reuse a component after a submit with validation errors,
> >you'll
> >>> have to reset all form components.
> >>> Otherwise the form components will render their previous invalid
> >input -
> >>> this is an intended feature, to give the user the ability to edit
> >his
> >>> previous input.
> >>>
> >>> Calling clearInput() on the form itself has no impact (which also
> >>>> surprised me).
> >>>>
> >>>
> >>> That surprises me too, as this should work. Please check
> >>> Form#clearInput()'s source: your components have to be visible,
> >otherwise
> >>> this call does nothing.
> >>>
> >>> Have fun
> >>> Sven
> >>>
> >>>
> >>>
> >>> Am 21.06.2017 um 19:29 schrieb Lon Varscsak:
> >>>
> >>>> I have a scenario where I have a form and the user puts in a bad
> >value in
> >>>> FieldA, and then also puts in proper values in FieldB and FieldC.
> >FieldB
> >>>> and FieldC never receive their values (in the model object), I’m
> >assuming
> >>>> because the form processing stops at the error for FieldA.  The
> >user
> >>>> dismisses the model (which just makes the component not visible and
> >does
> >>>> an
> >>>> Ajax refresh).
> >>>>
> >>>> The user then goes in to edit the data again (same component, just
> >made
> >>>> visible and refreshed with an Ajax reques

Re: Refreshing form after model objects changed

2017-06-21 Thread Lon Varscsak
Digging in a little deeper, I learned that if my data comes from the forms
model (which is not how I’m currently doing things), and then create a new
model, everything works as I’d expect.

So in my case, I have a bunch of FormComponents that use a PropertyModel to
do their work.  Rather than visiting all of the FormComponents and calling
modelChanged() is there a better way to do this?  I’m not so keen on
CompoundPropertyModel (although I can’t articulate why yet :P)…probably
because I may have more than one model for a given page.

So I’m thinking of a nested model for my object(s) storing them in ivars,
and then replacing those when I show.  I’m just not sure if there’s an
existing class that will let me use a model as a basis for another model
(not that that seems hard to write).  So I’m looking for what others are
doing.

Thanks!

-Lon

On Wed, Jun 21, 2017 at 1:04 PM, Lon Varscsak <lon.varsc...@gmail.com>
wrote:

> Yeah, I had convinced myself on the way home that it was a feature
> too…until I thought about the model data having changed.
>
> So I looked into the form.clearInput() (thanks for that tip) and the model
> object is in a particular state that has field is hidden at the time I do
> the clear.  So it’s that my model object has changed and my UI doesn’t
> reflect the current state (because of this feature) once they make the
> field visible.
>
> It just feels like a little bit of an odd case (not that I know how it
> would be better).  I guess I’ll switch to not reusing the component (which
> is fine), I just think I’m going to bit by this more than once. :)
>
> -Lon
>
> On Wed, Jun 21, 2017 at 10:44 AM, Sven Meier <s...@meiers.net> wrote:
>
>> Hi,
>>
>> if you reuse a component after a submit with validation errors, you'll
>> have to reset all form components.
>> Otherwise the form components will render their previous invalid input -
>> this is an intended feature, to give the user the ability to edit his
>> previous input.
>>
>> Calling clearInput() on the form itself has no impact (which also
>>> surprised me).
>>>
>>
>> That surprises me too, as this should work. Please check
>> Form#clearInput()'s source: your components have to be visible, otherwise
>> this call does nothing.
>>
>> Have fun
>> Sven
>>
>>
>>
>> Am 21.06.2017 um 19:29 schrieb Lon Varscsak:
>>
>>> I have a scenario where I have a form and the user puts in a bad value in
>>> FieldA, and then also puts in proper values in FieldB and FieldC.  FieldB
>>> and FieldC never receive their values (in the model object), I’m assuming
>>> because the form processing stops at the error for FieldA.  The user
>>> dismisses the model (which just makes the component not visible and does
>>> an
>>> Ajax refresh).
>>>
>>> The user then goes in to edit the data again (same component, just made
>>> visible and refreshed with an Ajax request).  Before the panel is shown
>>> the
>>> underlying model object is swapped out with a new one (that has no values
>>> in all 3 fields), however, when it appears the data is as it was
>>> previously, including the unsaved values in FieldB and FieldC (from the
>>> first pass).
>>>
>>> This surprised me a bit (not that I’m anywhere near a wicket expert), I
>>> would have assumed that since the model object changed that the form
>>> components would refresh.  So in hacking around, I found that if I visit
>>> all the FormComponents and call clearInput() on them, the form will
>>> display
>>> the correct values (blank in this case).  Calling clearInput() on the
>>> form
>>> itself has no impact (which also surprised me).
>>>
>>> What’s the proper way to handle this case? I feel like while I have a
>>> working case, it’s a little clunky.
>>>
>>> -Lon
>>>
>>>
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
>>
>


Re: Refreshing form after model objects changed

2017-06-21 Thread Lon Varscsak
Yeah, I had convinced myself on the way home that it was a feature
too…until I thought about the model data having changed.

So I looked into the form.clearInput() (thanks for that tip) and the model
object is in a particular state that has field is hidden at the time I do
the clear.  So it’s that my model object has changed and my UI doesn’t
reflect the current state (because of this feature) once they make the
field visible.

It just feels like a little bit of an odd case (not that I know how it
would be better).  I guess I’ll switch to not reusing the component (which
is fine), I just think I’m going to bit by this more than once. :)

-Lon

On Wed, Jun 21, 2017 at 10:44 AM, Sven Meier <s...@meiers.net> wrote:

> Hi,
>
> if you reuse a component after a submit with validation errors, you'll
> have to reset all form components.
> Otherwise the form components will render their previous invalid input -
> this is an intended feature, to give the user the ability to edit his
> previous input.
>
> Calling clearInput() on the form itself has no impact (which also
>> surprised me).
>>
>
> That surprises me too, as this should work. Please check
> Form#clearInput()'s source: your components have to be visible, otherwise
> this call does nothing.
>
> Have fun
> Sven
>
>
>
> Am 21.06.2017 um 19:29 schrieb Lon Varscsak:
>
>> I have a scenario where I have a form and the user puts in a bad value in
>> FieldA, and then also puts in proper values in FieldB and FieldC.  FieldB
>> and FieldC never receive their values (in the model object), I’m assuming
>> because the form processing stops at the error for FieldA.  The user
>> dismisses the model (which just makes the component not visible and does
>> an
>> Ajax refresh).
>>
>> The user then goes in to edit the data again (same component, just made
>> visible and refreshed with an Ajax request).  Before the panel is shown
>> the
>> underlying model object is swapped out with a new one (that has no values
>> in all 3 fields), however, when it appears the data is as it was
>> previously, including the unsaved values in FieldB and FieldC (from the
>> first pass).
>>
>> This surprised me a bit (not that I’m anywhere near a wicket expert), I
>> would have assumed that since the model object changed that the form
>> components would refresh.  So in hacking around, I found that if I visit
>> all the FormComponents and call clearInput() on them, the form will
>> display
>> the correct values (blank in this case).  Calling clearInput() on the form
>> itself has no impact (which also surprised me).
>>
>> What’s the proper way to handle this case? I feel like while I have a
>> working case, it’s a little clunky.
>>
>> -Lon
>>
>>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Refreshing form after model objects changed

2017-06-21 Thread Lon Varscsak
I have a scenario where I have a form and the user puts in a bad value in
FieldA, and then also puts in proper values in FieldB and FieldC.  FieldB
and FieldC never receive their values (in the model object), I’m assuming
because the form processing stops at the error for FieldA.  The user
dismisses the model (which just makes the component not visible and does an
Ajax refresh).

The user then goes in to edit the data again (same component, just made
visible and refreshed with an Ajax request).  Before the panel is shown the
underlying model object is swapped out with a new one (that has no values
in all 3 fields), however, when it appears the data is as it was
previously, including the unsaved values in FieldB and FieldC (from the
first pass).

This surprised me a bit (not that I’m anywhere near a wicket expert), I
would have assumed that since the model object changed that the form
components would refresh.  So in hacking around, I found that if I visit
all the FormComponents and call clearInput() on them, the form will display
the correct values (blank in this case).  Calling clearInput() on the form
itself has no impact (which also surprised me).

What’s the proper way to handle this case? I feel like while I have a
working case, it’s a little clunky.

-Lon


Re: DropDownChoice with a different choice class than model class

2017-06-19 Thread Lon Varscsak
Yeah, I already had a renderer that was taking care of the conversion for
me, it’s just I was subclassing DropDownChoice whose generics are only 1
type (both choices and model value).  I ended up subclassing AbstractChoice
and copying methods (and modifying them to support model values and choices
being different) from AbstractSingleSelectChoice, which kind of sucks, but
does what I need. :)

-Lon

On Thu, Jun 15, 2017 at 12:52 AM, Sven Meier <s...@meiers.net> wrote:
>
> Hi,
>
> for Wicket's choice components the model object type (possibly wrapped in
a collection) and the type for each choice has to be identical. That is
intended.
>
> >In my case, the model object may be a string, but my choices
> >and renderer are rendering from a complex class.
>
> You have two options:
>
> - use an 'adapter' model, that adapts the string to your complex class
and back
>
> - let your choices and renderer operate on strings, where the renderer
just retrieves your complex objects to do the rendering
>
> Have fun
> Sven
>
>
>
>
> Am 15.06.2017 um 01:22 schrieb Lon Varscsak:
>>
>> Am I wrong to assume that DropDownChoice (and a few of it’s superclasses)
>> should be using the generic of <T, E> that AbstractChoice defines where T
>> is the class of the model object and E is the class of choice object?
>>
>> It seems that from AbstractSingleSelectChoice up, it assumes that the
value
>> from the model is the same as the choice.
>>
>> In my case, the model object may be a string, but my choices and renderer
>> are rendering from a complex class.
>>
>> Thoughts?
>>
>> -Lon
>>
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>


DropDownChoice with a different choice class than model class

2017-06-14 Thread Lon Varscsak
Am I wrong to assume that DropDownChoice (and a few of it’s superclasses)
should be using the generic of  that AbstractChoice defines where T
is the class of the model object and E is the class of choice object?

It seems that from AbstractSingleSelectChoice up, it assumes that the value
from the model is the same as the choice.

In my case, the model object may be a string, but my choices and renderer
are rendering from a complex class.

Thoughts?

-Lon


Re: Localizer in bundle

2016-10-05 Thread Lon Varscsak
Yeah, the properties file aren’t in the application’s package.  It would be
handy if Localizer just used a Class instead of a Component.  However, your
info was enough of a push to get me where I needed (in combination with
ConvertingPropertyVariableInterpolator).

Thanks!

-Lon

On Wed, Oct 5, 2016 at 7:38 PM, Martin Grigorov <martin.grigo...@gmail.com>
wrote:

> Hi,
>
> The component could be null. In this case it will fallback to
> YourApplication.properties.
> I guess this won't work for you too.
>
> Why don't you just use ResourceBundle?
>
> On Oct 6, 2016 5:29 AM, "Lon Varscsak" <lon.varsc...@gmail.com> wrote:
>
> > Hey all,
> >
> > How can I get a localized string (from a properties file) inside of a
> > library I have without the use of a Component.  I have a controller class
> > (nothing to do with components), but I’d like to have this class (In a
> > non-application jar) return an error message to the application localized
> > (with dynamic values), but I can’t see how to do it.  Localizer only
> allows
> > passing in a component (and not just any class).
> >
> > Ideas?
> >
> > Thanks!
> >
> > -Lon
> >
>


Localizer in bundle

2016-10-05 Thread Lon Varscsak
Hey all,

How can I get a localized string (from a properties file) inside of a
library I have without the use of a Component.  I have a controller class
(nothing to do with components), but I’d like to have this class (In a
non-application jar) return an error message to the application localized
(with dynamic values), but I can’t see how to do it.  Localizer only allows
passing in a component (and not just any class).

Ideas?

Thanks!

-Lon


“Duplicate” objects on a page

2016-08-10 Thread Lon Varscsak
I have a situation where I have a Save/Cancel button up at the top of the
page and also one at the bottom.  I’d love to reference the same wicket:id,
but I gather that’s not possible.  I attempted to clone the object
(WicketObjects.cloneObject), but then I think I’d have duplicate ids (can’t
set id outside of the class).

Any solutions to this problem?  I’d really rather not duplicate the
onClick’s (even though they mostly share common logic) if possible.

Thanks,

Lon


Re: Trouble updating component when using markup inheritance

2016-08-06 Thread Lon Varscsak
Perfect!  Thank you so much for getting me situated!

-Lon

On Sat, Aug 6, 2016 at 3:03 AM, Sven Meier <s...@meiers.net> wrote:

> Hi,
>
> this is a known problem with TransparentWebMarkupContainers, see
> WICKET-5479
>
> You should use a WebMarkupContainer and #queue() instead.
>
> Regards
> Sven
>
>
>
> On 04.08.2016 01:49, Lon Varscsak wrote:
>
>> Hey guys,
>>
>> I’ve got a component (ComponentB) that subclasses from another component
>> (ComponentA).  In ComponentB I call a method on ComponentA that updates a
>> div (ajax) that wraps some content on ComponentA in addition to the
>>  (which is ComponentB’s content).  While this updates
>> correctly, if I have any links in the Child, no Ajax handlers are returned
>> in the ajax call, so the updated values are correct, but none of the links
>> work anymore.
>>
>> If there are any links in ComponentA’s html, they will have the proper
>> handlers regenerated and called.
>>
>> I have a quick start here that demonstrates the problem:
>> https://dl.dropboxusercontent.com/u/549221/test.zip
>>
>> Any thoughts?
>>
>> Thanks,
>>
>> Lon
>>
>>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Trouble updating component when using markup inheritance

2016-08-03 Thread Lon Varscsak
Hey guys,

I’ve got a component (ComponentB) that subclasses from another component
(ComponentA).  In ComponentB I call a method on ComponentA that updates a
div (ajax) that wraps some content on ComponentA in addition to the
 (which is ComponentB’s content).  While this updates
correctly, if I have any links in the Child, no Ajax handlers are returned
in the ajax call, so the updated values are correct, but none of the links
work anymore.

If there are any links in ComponentA’s html, they will have the proper
handlers regenerated and called.

I have a quick start here that demonstrates the problem:
https://dl.dropboxusercontent.com/u/549221/test.zip

Any thoughts?

Thanks,

Lon


Re: Approach to changing value in input field before validation

2016-07-26 Thread Lon Varscsak
Well, the user is entering a part number (SKU) and there are times where
we’ve specified replacement SKUs.  If I find only 1, then I want to replace
and continue, but if I don’t, I want to continue the existing validation
and maybe it finds a valid part or maybe it gives the user a message.   But
if I replace the 1 and it’s now in a discontinued state, I need to fail
validation and let the user know.  It’s not a typical e-commerce app,
actually it’s a large CRM system, so there are times where I have to do
unusual things to meet the users needs.

The current application (desktop) leaves SKUA in the textfield, but gives
you the validation messages for SKUB (assuming it fails).  I felt that this
was more confusing that swapping the input and then showing the user the
replaced value along with the validation message that belongs to the new
SKU (B)

-Lon

On Tue, Jul 26, 2016 at 8:07 AM, Martin Grigorov <mgrigo...@apache.org>
wrote:

> Hi,
>
> I find it confusing that the user enters "A" and if the validation fails
> (s)he sees "B".
> Me, as a user, I'd ask myself: I've entered "A", why it tells me that "B"
> is incorrect?!
>
> Maybe a better way is to use better error feedback messages than replacing
> the user input ?!
>
> Martin Grigorov
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
>
> On Tue, Jul 26, 2016 at 5:00 PM, Lon Varscsak <lon.varsc...@gmail.com>
> wrote:
>
> > Okay, that works.  Do you think my approach to use a converter is
> > appropriate or should I do it in another place (like validation)?
> >
> > Thanks for your input,
> >
> > Lon
> >
> > On Mon, Jul 25, 2016 at 9:46 PM, Martin Makundi <
> > martin.maku...@koodaripalvelut.com> wrote:
> >
> > > We have made an utility method that uses reflection to set rawinput,
> and
> > > have found this very useful.
> > >
> > > You set both rawInput and rawInputArray
> > >
> > > **
> > > Martin
> > >
> > > 2016-07-26 1:18 GMT+03:00 Lon Varscsak <lon.varsc...@gmail.com>:
> > >
> > > > Okay, so I have a need…I’m sure I’m going to get “why are you doing
> > > that?”,
> > > > but I have this need regardless and here’s what it is… :D
> > > >
> > > > User inputs “VALUEA”, I want to look up something in the database for
> > > > “VALUEA”, and if conditions are met, replace that with “VALUEB” and
> > > > continue with validation for the new value.  However, the only way I
> > can
> > > > see to do this would be to update the *rawInput* value, which I do
> not
> > > have
> > > > access to as a subclass (it’s private).
> > > >
> > > > So instead, I tried writing a converter, and it generally behaves as
> I
> > > want
> > > > (it validates “VALUEB”), however if there’s a validation error on
> > > “VALUEB”
> > > > the rawInput is still “VALUEA”…so it’s a little confusing to the
> user.
> > > >
> > > > I’m not sure that using a converter is the “right” approach, but it’s
> > the
> > > > closest I’ve come to a solution.
> > > >
> > > > Thoughts?
> > > >
> > > > Thanks,
> > > >
> > > > Lon
> > > >
> > >
> >
>


Re: Approach to changing value in input field before validation

2016-07-26 Thread Lon Varscsak
Okay, that works.  Do you think my approach to use a converter is
appropriate or should I do it in another place (like validation)?

Thanks for your input,

Lon

On Mon, Jul 25, 2016 at 9:46 PM, Martin Makundi <
martin.maku...@koodaripalvelut.com> wrote:

> We have made an utility method that uses reflection to set rawinput, and
> have found this very useful.
>
> You set both rawInput and rawInputArray
>
> **
> Martin
>
> 2016-07-26 1:18 GMT+03:00 Lon Varscsak <lon.varsc...@gmail.com>:
>
> > Okay, so I have a need…I’m sure I’m going to get “why are you doing
> that?”,
> > but I have this need regardless and here’s what it is… :D
> >
> > User inputs “VALUEA”, I want to look up something in the database for
> > “VALUEA”, and if conditions are met, replace that with “VALUEB” and
> > continue with validation for the new value.  However, the only way I can
> > see to do this would be to update the *rawInput* value, which I do not
> have
> > access to as a subclass (it’s private).
> >
> > So instead, I tried writing a converter, and it generally behaves as I
> want
> > (it validates “VALUEB”), however if there’s a validation error on
> “VALUEB”
> > the rawInput is still “VALUEA”…so it’s a little confusing to the user.
> >
> > I’m not sure that using a converter is the “right” approach, but it’s the
> > closest I’ve come to a solution.
> >
> > Thoughts?
> >
> > Thanks,
> >
> > Lon
> >
>


Approach to changing value in input field before validation

2016-07-25 Thread Lon Varscsak
Okay, so I have a need…I’m sure I’m going to get “why are you doing that?”,
but I have this need regardless and here’s what it is… :D

User inputs “VALUEA”, I want to look up something in the database for
“VALUEA”, and if conditions are met, replace that with “VALUEB” and
continue with validation for the new value.  However, the only way I can
see to do this would be to update the *rawInput* value, which I do not have
access to as a subclass (it’s private).

So instead, I tried writing a converter, and it generally behaves as I want
(it validates “VALUEB”), however if there’s a validation error on “VALUEB”
the rawInput is still “VALUEA”…so it’s a little confusing to the user.

I’m not sure that using a converter is the “right” approach, but it’s the
closest I’ve come to a solution.

Thoughts?

Thanks,

Lon


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

2016-07-06 Thread Lon Varscsak
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: Wicket Validation

2016-05-19 Thread Lon Varscsak
Ah cool, I’ll give that a whirl.

-Lon

On Thu, May 19, 2016 at 9:55 AM, Ernesto Reinaldo Barreiro <
reier...@gmail.com> wrote:

> IComponentAssignedModel?
>
> On Thu, May 19, 2016 at 6:52 PM, Lon Varscsak <lon.varsc...@gmail.com>
> wrote:
>
> > Hey Sven, I considered this, but realized that models don’t have access
> to
> > the component, so I wasn’t sure how I would report the errors.  Any tips
> > would be appreciated.
> >
> > -Lon
> >
> > On Thu, May 19, 2016 at 7:08 AM, Sven Meier <s...@meiers.net> wrote:
> >
> > > Hi,
> > >
> > > you could use a custom model wrapper catching your exceptions and
> > > reporting them as error messages.
> > >
> > > Have fun
> > > Sven
> > >
> > >
> > >
> > > On 19.05.2016 00:23, Lon Varscsak wrote:
> > >
> > >> Hey guys,
> > >>
> > >> I have some business logic where when the set method is called, it
> first
> > >> validates the value.  In finding a “bad” value, it then throws a
> custom
> > >> validation exception.  We use this pattern all over the place.
> > >>
> > >> Is there some way to handle this situation so that it’s a valid wicket
> > >> validation error?
> > >>
> > >> Thanks for any tips.
> > >>
> > >> -Lon (Wicket Newb :D)
> > >>
> > >>
> > >
> > > -
> > > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> > > For additional commands, e-mail: users-h...@wicket.apache.org
> > >
> > >
> >
>
>
>
> --
> Regards - Ernesto Reinaldo Barreiro
>


Re: Wicket Validation

2016-05-19 Thread Lon Varscsak
Hey Martin, well the exception is being thrown during the form submit
processing, but it just ends up as a big error on the page.

On Thu, May 19, 2016 at 12:00 AM, Martin Grigorov <mgrigo...@apache.org>
wrote:

> Hi,
>
> Wicket cares about validation errors only during form submit processing.
> In your case you could throw ConversionException during the 'convertInput'
> phase.
> I.e. in the beginning of the form submit processing Wicket will try to
> convert the String input to the backend object (e.g. a String to Integer,
> or to a Date, or to something custom).
> If the setters are used at that time and the input is not valid then throw
> ConversionException.
>
> Martin Grigorov
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
>
> On Thu, May 19, 2016 at 12:23 AM, Lon Varscsak <lon.varsc...@gmail.com>
> wrote:
>
> > Hey guys,
> >
> > I have some business logic where when the set method is called, it first
> > validates the value.  In finding a “bad” value, it then throws a custom
> > validation exception.  We use this pattern all over the place.
> >
> > Is there some way to handle this situation so that it’s a valid wicket
> > validation error?
> >
> > Thanks for any tips.
> >
> > -Lon (Wicket Newb :D)
> >
>


Re: Wicket Validation

2016-05-19 Thread Lon Varscsak
Hey Sven, I considered this, but realized that models don’t have access to
the component, so I wasn’t sure how I would report the errors.  Any tips
would be appreciated.

-Lon

On Thu, May 19, 2016 at 7:08 AM, Sven Meier <s...@meiers.net> wrote:

> Hi,
>
> you could use a custom model wrapper catching your exceptions and
> reporting them as error messages.
>
> Have fun
> Sven
>
>
>
> On 19.05.2016 00:23, Lon Varscsak wrote:
>
>> Hey guys,
>>
>> I have some business logic where when the set method is called, it first
>> validates the value.  In finding a “bad” value, it then throws a custom
>> validation exception.  We use this pattern all over the place.
>>
>> Is there some way to handle this situation so that it’s a valid wicket
>> validation error?
>>
>> Thanks for any tips.
>>
>> -Lon (Wicket Newb :D)
>>
>>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Wicket Validation

2016-05-18 Thread Lon Varscsak
Hey guys,

I have some business logic where when the set method is called, it first
validates the value.  In finding a “bad” value, it then throws a custom
validation exception.  We use this pattern all over the place.

Is there some way to handle this situation so that it’s a valid wicket
validation error?

Thanks for any tips.

-Lon (Wicket Newb :D)


Re: AjaxFormValidatingBehavior on component

2016-05-18 Thread Lon Varscsak
@Bas, I was originally adding it to the form (which is in a parent
component), but it just wasn’t working.  I’m sure I’m missing something
about the nature of parent/child components.

@Sven Can you elaborate for me a little more (still a Wicket newb).  Can I
use a AjaxEventBehavior with a Form?

Thanks!

-Lon

On Wed, May 18, 2016 at 5:31 AM, Sven Meier <s...@meiers.net> wrote:

> Thanks Bas!
>
> I see, this is new in Wicket 7.x (WICKET-5196).
>
> We could delay the check for the parental form into #onConfigure().
>
> IMHO a better solution would be to use a bubbling event instead (e.g.
> "focusout") and attaching a single listener to the form (instead of adding
> a behaviors to each contained formComponent).
>
> Sven
>
>
>
> On 18.05.2016 13:23, Bas Gooren wrote:
>
>> Uhh, that error message is right there on the AFVB’s onBind():
>>
>>
>> https://github.com/apache/wicket/blob/master/wicket-core/src/main/java/org/apache/wicket/ajax/form/AjaxFormValidatingBehavior.java#L102
>>
>> The problem is that the check for a parent form is happening in onBind(),
>> so when the behavior is attached to a component.
>> In other words: you can only add AFVB to a component _after_ you have
>> added that component to a Form.
>>
>> I suspect that the main reason for this is that this behavior is meant to
>> be used on a whole form, not a single form component.
>> Even when you attach it to a single component, it will always validate
>> _all_ components in the form.
>> See
>> https://github.com/apache/wicket/blob/master/wicket-core/src/main/java/org/apache/wicket/ajax/form/AjaxFormValidatingBehavior.java#L117
>>
>> The OP should probably be using a AjaxFormComponentUpdatingBehavior,
>> adding any feedback panels in onUpdate() and onError().
>>
>> Met vriendelijke groet,
>> Kind regards,
>>
>> Bas Gooren
>>
>> Op 18 mei 2016 bij 11:29:26, Sven Meier (s...@meiers.net) schreef:
>>
>> Hi,
>>
>> I cannot find that error message in Wicket's source.
>>
>> Are you using org.apache.wicket.ajax.form.AjaxFormValidatingBehavior or
>> some subclass or alternative?
>>
>> Have fun
>> Sven
>>
>>
>> On 18.05.2016 02:37, Lon Varscsak wrote:
>>
>>> Hey guys, I may be missing something here, but if I do:
>>>   TextField textField = new TextField("keyCode", new
>>> PropertyModel<>(
>>> order, OrderHeader.SOURCE_KEY_KEY));
>>>   textField.add(new AjaxFormValidatingBehavior("blur"));
>>> * add(textField);*
>>>   I get an error “*AjaxFormValidatingBehavior should be bound to a Form
>>> component or a component that is inside a form!*”
>>>   If I change it to:
>>>   TextField textField = new TextField(“keyCode", new
>>> PropertyModel<>(
>>> order, OrderHeader.SOURCE_KEY_KEY));
>>> * add(textField);*
>>>   textField.add(new AjaxFormValidatingBehavior("blur"));
>>>   It works. Basically the AjaxFormValidatingBehavior is expecting to
>>> find a
>>> form in it’s parent, but it’s parent hasn’t been assigned yet.
>>>   Is this expected behavior?
>>>   Thanks,
>>>   Lon
>>>
>>>
>>
>> -
>> 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
>
>


AjaxFormValidatingBehavior on component

2016-05-17 Thread Lon Varscsak
Hey guys, I may be missing something here, but if I do:

TextField textField = new TextField("keyCode", new PropertyModel<>(
order, OrderHeader.SOURCE_KEY_KEY));

textField.add(new AjaxFormValidatingBehavior("blur"));


*  add(textField);*

I get an error “*AjaxFormValidatingBehavior should be bound to a Form
component or a component that is inside a form!*”

If I change it to:

TextField textField = new TextField(“keyCode", new PropertyModel<>(
order, OrderHeader.SOURCE_KEY_KEY));


*  add(textField);*

textField.add(new AjaxFormValidatingBehavior("blur"));

It works.  Basically the AjaxFormValidatingBehavior is expecting to find a
form in it’s parent, but it’s parent hasn’t been assigned yet.

Is this expected behavior?

Thanks,

Lon


Re: DropDownChoice and Object/Property

2016-05-05 Thread Lon Varscsak
haha, sorry…here’s another pass:

So the objects that are in the list are called ShipMethod and it has a
“description” which I want to use for display, and an “id” which is the
thing I want stored in the Order object.  But with the property model and
ChoiceRenderer as I have it, it’s expecting to push a ShipMethod object
into the Order object’s “shipMethod” attribute, but it’s not modeled that
way.  In the Order object I just want to store the “id” from ShipMethod in
“shipMethod”.

On Wed, May 4, 2016 at 11:45 PM, Martin Grigorov <mgrigo...@apache.org>
wrote:

> Hi,
>
>
> On Thu, May 5, 2016 at 2:28 AM, Lon Varscsak <lon.varsc...@gmail.com>
> wrote:
>
> > Hey all,
> >
> > Is there a way to have a DropDownChoice use a complex object (think ORM
> > class) as it’s list, but get/set the Model’s value as the ID instead of
> the
> > complex object?
> >
> > So for:
> >
> > new DropDownChoice<>(“shipMethod”, new PropertyModel<>(OrderPage.this
> > .getOrderController().order().shippingHeader(), “shipMethod"), new
> > ListModel<>(shipMethods), new ChoiceRenderer<>("description", "id"))
> >
> > It puts in the ORM object’s toString into the “shipMethod” column and I
> > want it to put in the value for “id” from the renderer.  Additionally, I
> > want it to get it’s initial value from the “id” value instead and convert
> > it to the ORM object (from shipMethods list).
> >
> > Hopefully this makes sense. :P
> >
>
> Not much :p
> You missed to show us ShipMethod class.
> Does it have "description" and "id" properties ?
>
>
> >
> > -Lon (Wicket Newb, WebObjects Refugee)
> >
>


DropDownChoice and Object/Property

2016-05-04 Thread Lon Varscsak
Hey all,

Is there a way to have a DropDownChoice use a complex object (think ORM
class) as it’s list, but get/set the Model’s value as the ID instead of the
complex object?

So for:

new DropDownChoice<>(“shipMethod”, new PropertyModel<>(OrderPage.this
.getOrderController().order().shippingHeader(), “shipMethod"), new
ListModel<>(shipMethods), new ChoiceRenderer<>("description", "id"))

It puts in the ORM object’s toString into the “shipMethod” column and I
want it to put in the value for “id” from the renderer.  Additionally, I
want it to get it’s initial value from the “id” value instead and convert
it to the ORM object (from shipMethods list).

Hopefully this makes sense. :P

-Lon (Wicket Newb, WebObjects Refugee)


Re: wicket-datetime DateLabel

2016-05-03 Thread Lon Varscsak
Ah, okay, thanks!

On Tue, May 3, 2016 at 2:38 PM, Martin Grigorov <mgrigo...@apache.org>
wrote:

> There is a task for Wicket 8 for this.
> On May 4, 2016 12:32 AM, "Lon Varscsak" <lon.varsc...@gmail.com> wrote:
>
> > Shouldn’t DateLabel allow Joda dates to be used in addition to
> > java.util.Date?
> >
> > Thanks,
> >
> > Lon (Wicket Newb :D)
> >
>


wicket-datetime DateLabel

2016-05-03 Thread Lon Varscsak
Shouldn’t DateLabel allow Joda dates to be used in addition to
java.util.Date?

Thanks,

Lon (Wicket Newb :D)


Re: Storing Pages

2016-04-26 Thread Lon Varscsak
To be clearer, I just basically want to take a page that the user is on,
keep a reference to it, and return the user back to it at some point in the
future.  It seems to work fine (I’m used to doing this since Apple’s
WebObjects is similar), but I just wanted to make sure I didn’t paint
myself into a corner. :P

On Tue, Apr 26, 2016 at 1:25 PM, Lon Varscsak <lon.varsc...@gmail.com>
wrote:

> So by sending me there are you suggesting that storing an iVar to a page
> object is bad?
>
> On Tue, Apr 26, 2016 at 1:00 PM, Martin Grigorov <mgrigo...@apache.org>
> wrote:
>
>> Hi,
>>
>> Take a look at https://github.com/martin-g/single-page-instance and the
>> discussion about it at http://markmail.org/message/ofyvgybcjp5cvf75
>> Might be useful for you!
>>
>> Martin Grigorov
>> Wicket Training and Consulting
>> https://twitter.com/mtgrigorov
>>
>> On Tue, Apr 26, 2016 at 6:22 PM, Lon Varscsak <lon.varsc...@gmail.com>
>> wrote:
>>
>> > Is it bad to store pages in the session for re-use?  The idea being that
>> > for a given page, I only want one instance per session.
>> >
>> > -Lon (Wicket Newb)
>> >
>>
>
>


Re: Storing Pages

2016-04-26 Thread Lon Varscsak
So by sending me there are you suggesting that storing an iVar to a page
object is bad?

On Tue, Apr 26, 2016 at 1:00 PM, Martin Grigorov <mgrigo...@apache.org>
wrote:

> Hi,
>
> Take a look at https://github.com/martin-g/single-page-instance and the
> discussion about it at http://markmail.org/message/ofyvgybcjp5cvf75
> Might be useful for you!
>
> Martin Grigorov
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
>
> On Tue, Apr 26, 2016 at 6:22 PM, Lon Varscsak <lon.varsc...@gmail.com>
> wrote:
>
> > Is it bad to store pages in the session for re-use?  The idea being that
> > for a given page, I only want one instance per session.
> >
> > -Lon (Wicket Newb)
> >
>


Storing Pages

2016-04-26 Thread Lon Varscsak
Is it bad to store pages in the session for re-use?  The idea being that
for a given page, I only want one instance per session.

-Lon (Wicket Newb)


Re: HTTP ERROR:500

2016-04-21 Thread Lon Varscsak
Hey Martin, actually I’m not running in Prod mode, but development.  The
behavior for the output is different between 7.1 and 7.2 (which is the
error message I sent).  In 7.1, I don’t see an error message on the page at
all, but only in the console.

I definitely saw the exception, I guess it wasn’t clear to me what I had
done wrong…where a lot of other Wicket errors suggest what the problem
might be.

-Lon

On Wed, Apr 20, 2016 at 11:16 PM, Martin Grigorov <mgrigo...@apache.org>
wrote:

> Hi Lon,
>
> Welcome to Wicket!
>
> It seems you run your application in Production mode and that's why it
> shows this almost empty page. In Production it is recommended to not show
> detailed information about your application problems to your audience.
> If you change the configuration type to Development then the exception with
> its stacktrace is being shown also in the browser.
> I say "also" because in both cases the exception is logged in the server
> logs too. Always consult with the server logs because there might be some
> hints when you do something that is not optimal! ;-)
>
> Have fun and let us know if you face any issues!
>
> Martin Grigorov
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
>
> On Thu, Apr 21, 2016 at 3:22 AM, Lon Varscsak <lon.varsc...@gmail.com>
> wrote:
>
> > Hey all, I’m new to wicket and I got this horrendous error earlier today:
> >
> >
> > I had NO idea what it meant. :P  I was able to debug it and see what was
> > left in queue, and that reminded me that I hadn’t finished the html for a
> > new component I had added in the constructor.  My question is, isn’t
> there
> > a better way to explain to the developer what’s going on?  It would be
> > super helpful to newbs like me. ;D
> >
> > Just a thought.
> >
> > Thanks,
> >
> > Lon
> >
>


HTTP ERROR:500

2016-04-20 Thread Lon Varscsak
Hey all, I’m new to wicket and I got this horrendous error earlier today:


I had NO idea what it meant. :P  I was able to debug it and see what was
left in queue, and that reminded me that I hadn’t finished the html for a
new component I had added in the constructor.  My question is, isn’t there
a better way to explain to the developer what’s going on?  It would be
super helpful to newbs like me. ;D

Just a thought.

Thanks,

Lon


How to include resources from project (jar)

2016-04-14 Thread Lon Varscsak
Hey guys,

I’m new here and I’m trying to get a URL for a resource (css) located in
/src/main/resources/.  I can across CssResourceReference, but if I use
“resources/whatever.css” or “/resources/whatever.css” the file isn’t
found.  If I use "../../../../whatever.css” it works.  I’m assuming because
it’s located in the default package I’ve got to drop down into that.  Is
there 1) a better way to do this? or 2) a way to do it that’s more
predictable, like something that says start at the root package?

Thanks for any insights!

-Lon

P.S. — I’m not deploying with a war, but as a jar with embedded Jetty.


Re: Wicket need Votes! :-)

2016-02-18 Thread Lon Varscsak
I’m new…but I voted. :D

On Wed, Feb 17, 2016 at 1:05 PM, ndongo yaya  wrote:

> Done !
>
> --
> Yaya Ndongo
>
> 2016-02-17 7:47 GMT+02:00 Anup Gokhale :
>
> > + 1
> >
> > Anup Gokhale
> >
> > -Original Message-
> > From: Francois Meillet [mailto:francois.meil...@gmail.com]
> > Sent: 16 February 2016 18:38
> > To: users@wicket.apache.org
> > Subject: Re: Wicket need Votes! :-)
> >
> > +1
> >
> > François
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > Le 16 févr. 2016 à 14:06, andrea del bene  a
> écrit :
> >
> > >
> > >
> > > No need to say it :)
> > >> Done too!
> > >>
> > >> On Tue, Feb 16, 2016 at 1:25 PM, Thomas Jarnot 
> > wrote:
> > >>
> > >>> Am 16.02.2016 10:10, schrieb Tobias Soloschenko:
> > >>>
> >  Hi all,
> > 
> >  take some minutes and vote for Apache Wicket! :-)
> > 
> >  (German)
> > 
> > 
> >  https://jaxenter.de/jaxenter-umfrage-diese-web-frameworks-liegen-20
> >  16-im-fokus-34892
> > 
> >  (English)
> > 
> >  https://jaxenter.de/survey-32999
> > 
> >  The survey is in english.
> > 
> > >>> done ;-)
> > >>>
> > >>>
> > >>>
> > >>> 
> > >>> - 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
> >
> >
> >
> > ---
> > This email has been checked for viruses by Avast antivirus software.
> > https://www.avast.com/antivirus
> >
> >
> > -
> > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> > For additional commands, e-mail: users-h...@wicket.apache.org
> >
> >
>
>
> --
> Yaya NDONGO
>