Re: Bookmarkable ModalWindow

2024-08-02 Thread Martin Terra
Thanks. The question was formulated from the perspective of the old
Modal Window.

However, maybe they are equivalent, and if not, what are the caveats?

If any, what are the relevant differences between new and old in this
respect?

**
Martin

pe 2. elok. 2024 klo 19.06 Ernesto Reinaldo Barreiro (reier...@gmail.com)
kirjoitti:

> Hi,
>
> Does this refer to the Old modal window or the new Modal window?
>
> On Fri, Aug 2, 2024 at 5:58 AM Martin Terra <
> martin.te...@koodaripalvelut.com> wrote:
>
> > Hi!
> >
> > Has anyone made a bookmarkable use case of ModalWindow, are there any
> > caveats?
> >
> > Basically the goal would be that refreshing the page retains its state as
> > if it was a regular panel.
> >
> >
> > **
> > Martin
> >
>
>
> --
> Regards - Ernesto Reinaldo Barreiro
>


Bookmarkable ModalWindow

2024-08-02 Thread Martin Terra
Hi!

Has anyone made a bookmarkable use case of ModalWindow, are there any
caveats?

Basically the goal would be that refreshing the page retains its state as
if it was a regular panel.


**
Martin


Re: ListItemModel is not detaching List-model

2024-07-11 Thread Martin Terra
to 11. heinäk. 2024 klo 16.54 Tobias Gierke
(tobias.gie...@voipfuture.com.invalid) kirjoitti:

>
> On 11.07.24 15:31, Emond Papegaaij wrote:
> > Op do 11 jul 2024 om 15:09 schreef Sven Meier :
> >
> >> the ListItemModel does not hold a reference to the model of the
> >> ListView, so it's not its responsibility to detach it.
> >>
> > IMHO, the implementation of ListItemModel is strange. It does not hold a
> > direct reference to the model of the ListView, but it holds a reference
> to
> > the ListView instead. It also has a dependency on the model object (and
> > hence the model of) the ListView. I don't think models should hold
> > references to components, it should be the other way around. I think
> > ListItemModel should be reworked to take a reference to the model of the
> > ListView.
> >
> > Rule of thumb: if you hold a reference to a model, you have to detach it.
> >
> >
> > I would say: if reading the object of model X requires reading the
> objects
> > of other models, the detach of model X should also detach those other
> > models.
> FWIW, I second this - I also recently came across this somewhat
> surprising behavior.
>

IMO ListItemModel is more of a Lense than a model ;) Rename perhaps?

**
Martin



>
> Regards,
> Tobias
> >
> > Best regards,
> > Emond
> >
> --
> Tobias Gierke
> Software Developer
>
> Voipfuture GmbH   Wendenstr. 4   20097 Hamburg   Germany
> Phone +49 40 688 9001 64   Fax +49 40 688 9001 99
> Managing Directors   Jan Bastian   Eyal Ullert
> Commercial Court AG Hamburg   HRB 109896   VAT ID DE263738086
>
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: ListItemModel is not detaching List-model

2024-07-10 Thread Martin Terra
Normally it's the other way, a component detaches it's model.

The ListItemModel isn't really holding any data, it is relying on the
actual model held by listView.

**
Martin

ke 10. heinäk. 2024 klo 13.53 Hannes Becker (hannes.bec...@proxora.com)
kirjoitti:

> Hi!
>
> I am wondering why org.apache.wicket.markup.html.list.ListItemModel is not
> detaching the ListView's model. Feels to me like a bug...or is there an
> explanation?
>
> Thanks for your help and best regards
> Hannes
>
>


Part-Time Remote Java Wicket Job Opportunity

2024-06-15 Thread Martin Terra
Hi!

We are looking for someone well versed in Java Wicket to implement a
sliced html template as live Wicket pages, according to our coding
conventions and requirements. There might be multiple similar such tasks
along the way (longer term).

We will be paying you via invoice, so you need to be incorporated.

If you are available, please contact me directly. Tell us about your past
experience with implementing sliced html in Wicket. We would also like to
see some work (what your code looks like) that you have done using Wicket.


Yours sincerely,
Martin Terra
martin.te...@koodaripalvelut.com


Re: Wicket on low end hardware

2023-01-03 Thread Martin Terra
MartinG mentioned ComponentRenderer so if you know your pages, you could do
that.

If you need help with ComponentRenderer, please first proceed with it and
maybe a more specific question might help once you have gotten started.

**
Martin

ke 4. tammik. 2023 klo 2.23 Anna Eileen Eileen (shengchehs...@gmail.com)
kirjoitti:

> Dear Martin
>
> I don’t know how to do “pre-touch”, do you have any example?
>
> From: Martin Terra 
> Date: Tuesday, January 3, 2023 at 11:37 PM
> To: s...@stantastic.nl 
> Cc: users@wicket.apache.org 
> Subject: Re: Wicket on low end hardware
> Just a note, you don't need to make the startup "pre-touching" process a
> blocking one so that if a user were to interact with the app, they could do
> so while startup pretouch is doing its thing.
>
> And you could profile whether you want to do the pre-touch in single thread
> or multi-thraded.
>
> **
> Martin
>
> ti 3. tammik. 2023 klo 16.58 s...@stantastic.nl kirjoitti:
>
> > Thanks everyone. I did not expect the amount of feedback that I got. It
> > is much appreciated.
> >
> > I spent most of my day profiling with VisualVM and it strengthened by
> > beliefs that my problems do not appear to be related to anything but
> > Wicket combined with our dated hardware. Please do not consider this a
> > criticism. I understand that not a lot of people run servlet containers
> > on this kind of hardware nowadays.
> >
> > My database queries all run quickly and my domain classes are hardly
> > even touched when the system starts. Our rather simple login page -
> > which is stateless and does not query the database when the form is
> > empty - takes 5-15 seconds to load on the first try. Subsequent requests
> > take about 40-120ms (browser caching disabled). Once logged in, the
> > other pages do not take as long, but they do feel sluggish until they
> > have been requested once.
> >
> > I tried to only load the quickstart example as Martijn suggested. It
> > starts more quickly than our own application but all things considered,
> > its performance did not impress me and that application really is super
> > simple. The first page load of the quickstart took about 2 seconds,
> > after that it normalized to about 30ms per request.
> >
> > When all pages have been loaded once, things are absolutely fine. So I
> > am considering Martin's approach of preloading components. That still
> > leaves me with the considerable startup time but we will learn to live
> > with that. Or we might switch from Tomcat to Jetty eventually.
> >
> > If anyone thinks I might be leaving some stuff on the table, I would be
> > open to hire someone to do some consulting work on this. Please get in
> > touch with me if you are interested.
> >
> > Cheers.
> >
> > Stan
> >
> >
> > Martin Terra schreef op 2023-01-02 04:29:
> >
> > > Anything in wicket can be preloaded,  but as premature optimization is
> > > evil, you should profile your application.
> > >
> > > If you do not have debug access to a real/simulated environment then
> > > the
> > > least you can do is make your own thread logger to log what the threads
> > > are
> > > doing.
> > >
> > > **
> > > Martin
> > >
> > > ma 2. tammik. 2023 klo 3.19 Anna Eileen (shengchehs...@gmail.com)
> > > kirjoitti:
> > >
> > >> Hello
> > >>
> > >> Would you please describe your web application components? Database ?
> > >> What services ran on the device?
> > >>
> > >> From: s...@stantastic.nl 
> > >> Date: Monday, January 2, 2023 at 5:23 AM
> > >> To: users@wicket.apache.org 
> > >> Subject: Wicket on low end hardware
> > >>
> > >> Hi,
> > >>
> > >> My use case for Wicket is a quite unconventional one. I use it as the
> > >> framework for the web interface of an appliance that runs on low end
> > >> hardware. The appliance doesn't have gigabytes of memory to waste or
> > >> tens of CPU cores. It's more like Celeron powered hardware with maybe
> > >> one or two gigabytes of RAM.
> > >>
> > >> I general this all works and customers are happy once the device is
> > >> running. But I find that deployment is quite slow, and so are the
> > >> first
> > >> couple of page loads of the day. Just to be clear: I cannot really
> > >> claim
> > >> that my performance problems are all Wicket related. They may be, but
> > >> they probably also are down to other underlying issues. A badly
> > >> optimized database, or a badly configured servlet container come to
> > >> mind...
> > >>
> > >> However, I was wondering if anyone has experience in using Wicket on
> > >> low
> > >> end hardware. I would be very interested in how to optimize for this.
> > >>
> > >> Thanks,
> > >>
> > >> Stan
> >
>


Re: Wicket on low end hardware

2023-01-03 Thread Martin Terra
Just a note, you don't need to make the startup "pre-touching" process a
blocking one so that if a user were to interact with the app, they could do
so while startup pretouch is doing its thing.

And you could profile whether you want to do the pre-touch in single thread
or multi-thraded.

**
Martin

ti 3. tammik. 2023 klo 16.58 s...@stantastic.nl kirjoitti:

> Thanks everyone. I did not expect the amount of feedback that I got. It
> is much appreciated.
>
> I spent most of my day profiling with VisualVM and it strengthened by
> beliefs that my problems do not appear to be related to anything but
> Wicket combined with our dated hardware. Please do not consider this a
> criticism. I understand that not a lot of people run servlet containers
> on this kind of hardware nowadays.
>
> My database queries all run quickly and my domain classes are hardly
> even touched when the system starts. Our rather simple login page -
> which is stateless and does not query the database when the form is
> empty - takes 5-15 seconds to load on the first try. Subsequent requests
> take about 40-120ms (browser caching disabled). Once logged in, the
> other pages do not take as long, but they do feel sluggish until they
> have been requested once.
>
> I tried to only load the quickstart example as Martijn suggested. It
> starts more quickly than our own application but all things considered,
> its performance did not impress me and that application really is super
> simple. The first page load of the quickstart took about 2 seconds,
> after that it normalized to about 30ms per request.
>
> When all pages have been loaded once, things are absolutely fine. So I
> am considering Martin's approach of preloading components. That still
> leaves me with the considerable startup time but we will learn to live
> with that. Or we might switch from Tomcat to Jetty eventually.
>
> If anyone thinks I might be leaving some stuff on the table, I would be
> open to hire someone to do some consulting work on this. Please get in
> touch with me if you are interested.
>
> Cheers.
>
> Stan
>
>
> Martin Terra schreef op 2023-01-02 04:29:
>
> > Anything in wicket can be preloaded,  but as premature optimization is
> > evil, you should profile your application.
> >
> > If you do not have debug access to a real/simulated environment then
> > the
> > least you can do is make your own thread logger to log what the threads
> > are
> > doing.
> >
> > **
> > Martin
> >
> > ma 2. tammik. 2023 klo 3.19 Anna Eileen (shengchehs...@gmail.com)
> > kirjoitti:
> >
> >> Hello
> >>
> >> Would you please describe your web application components? Database ?
> >> What services ran on the device?
> >>
> >> From: s...@stantastic.nl 
> >> Date: Monday, January 2, 2023 at 5:23 AM
> >> To: users@wicket.apache.org 
> >> Subject: Wicket on low end hardware
> >>
> >> Hi,
> >>
> >> My use case for Wicket is a quite unconventional one. I use it as the
> >> framework for the web interface of an appliance that runs on low end
> >> hardware. The appliance doesn't have gigabytes of memory to waste or
> >> tens of CPU cores. It's more like Celeron powered hardware with maybe
> >> one or two gigabytes of RAM.
> >>
> >> I general this all works and customers are happy once the device is
> >> running. But I find that deployment is quite slow, and so are the
> >> first
> >> couple of page loads of the day. Just to be clear: I cannot really
> >> claim
> >> that my performance problems are all Wicket related. They may be, but
> >> they probably also are down to other underlying issues. A badly
> >> optimized database, or a badly configured servlet container come to
> >> mind...
> >>
> >> However, I was wondering if anyone has experience in using Wicket on
> >> low
> >> end hardware. I would be very interested in how to optimize for this.
> >>
> >> Thanks,
> >>
> >> Stan
>


Re: Wicket on low end hardware

2023-01-01 Thread Martin Terra
Anything in wicket can be preloaded,  but as premature optimization is
evil, you should profile your application.

If you do not have debug access to a real/simulated environment then the
least you can do is make your own thread logger to log what the threads are
doing.

**
Martin

ma 2. tammik. 2023 klo 3.19 Anna Eileen (shengchehs...@gmail.com) kirjoitti:

> Hello
>
> Would you please describe your web application components? Database ?
> What services ran on the device?
>
>
> From: s...@stantastic.nl 
> Date: Monday, January 2, 2023 at 5:23 AM
> To: users@wicket.apache.org 
> Subject: Wicket on low end hardware
>
>
> Hi,
>
> My use case for Wicket is a quite unconventional one. I use it as the
> framework for the web interface of an appliance that runs on low end
> hardware. The appliance doesn't have gigabytes of memory to waste or
> tens of CPU cores. It's more like Celeron powered hardware with maybe
> one or two gigabytes of RAM.
>
> I general this all works and customers are happy once the device is
> running. But I find that deployment is quite slow, and so are the first
> couple of page loads of the day. Just to be clear: I cannot really claim
> that my performance problems are all Wicket related. They may be, but
> they probably also are down to other underlying issues. A badly
> optimized database, or a badly configured servlet container come to
> mind...
>
> However, I was wondering if anyone has experience in using Wicket on low
> end hardware. I would be very interested in how to optimize for this.
>
> Thanks,
>
> Stan
>


Re: Wicket MVVM

2022-11-17 Thread Martin Terra
to 17. marrask. 2022 klo 18.52 Dan Haywood (d...@haywood-associates.co.uk)
kirjoitti:

> Regarding the annotation-heavy soup (nice phrase!) - in theory you could
> remove them because the programming model is completely open for
> customisation ... it consists of a set of so-called FacetFactory's that
> introspect the domain classes (or anywhere else you want to specify the
> semantics) and build up the domain model.  In fact, most folk tend to use
> the associated .layout.xml file for UI hints rather than the @XxxLayout
> annotations, because making changes doesn't require a recompile.  In theory
> this could be done for other annotations too, if that's your preference.
>

xml is my other pet peeve I can live without as long as we exclude xhtml ;)


> Regarding pluggable persistence - we support JDO and JPA and in the past
> someone spiked neo4j and mongodb, so that's definitely doable.
>

I mean custom.


> But this isn't really the forum to talk too much about Apache Isis, we have
> a mailing list or a slack channel if you want to learn more.
>

It might be interesting from wicket perspecive. Anyways, I will kick its
tires and maybe make a quickstart or a reference implementation.

I appreciate these tips.

**
Martin


>
> -- Dan
>
> On Thu, 17 Nov 2022 at 16:28, Martin Terra <
> martin.te...@koodaripalvelut.com>
> wrote:
>
> > Thanks, interesting. First impression it's quite some
> > annotation-heavy-soup. Was hoping for more wicket-like 100% pojo/lambda
> > approach and more clear divide&conquer separation of
> > view<->viewmodel<->persistence in a way that I can implement or plug
> > something else for persistence.
> >
> > Anyways, will have a look if it can be used efficiently.
> >
> > **
> > Martin
> >
> > to 17. marrask. 2022 klo 17.17 Dan Haywood (d...@haywood-associates.co.uk
> )
> > kirjoitti:
> >
> > > There is a plan to add OData support to isis.apache.org, so that a
> > > collection of objects could be opened in (and perhaps edited through)
> > > Excel, say.
> > >
> > > Dan
> > >
> > > On Thu, 17 Nov 2022 at 13:45, Martin Grigorov 
> > > wrote:
> > >
> > > > Hi,
> > > >
> > > > I am not sure how much helpful my answer is to you but
> > > > https://isis.apache.org/ does something similar.
> > > > Isis defines a model based on your naked objects.
> > > > And then different viewers visualize the objectis/collections. Apache
> > > > Wicket is one of the available viewers. REST is another. AFAIK there
> is
> > > no
> > > > POI viewer but there is a plugin for the Wicket viewer that adds
> > "export
> > > to
> > > > Excel" button next to the tables.
> > > >
> > > > On Thu, Nov 17, 2022 at 11:48 AM Martin Terra <
> > > > martin.te...@koodaripalvelut.com> wrote:
> > > >
> > > > > Hi!
> > > > >
> > > > > Is there a library/example/experience for doing MVVM with wicket
> (or
> > > > > something close enough to serve as a useful reference)?
> > > > >
> > > > > A practical goal would be to decouple the Wicket stack from other
> > > layers
> > > > > and automate gui code generation based on predefined patterns &
> > layout
> > > > > design (benefits would be stabilty, testability, predictability,
> > > standard
> > > > > practices, maintainability, upgradeability, code generation/ai code
> > > > > copilot, etc.).
> > > > >
> > > > > Preferably it would work even so far that we could plug/attach
> either
> > > > > jakarta poi or wicket to the same model and get as output (for
> > example)
> > > > > either a html table or excel sheet.
> > > > >
> > > > > How it works is, basically you would have a wicket plugin that
> > > > > "interprets/implements" the model. Alternatively you could have a
> > > jakarta
> > > > > poi plugin as well.
> > > > >
> > > > > You could also have a mix of the two, for example: an instruction
> in
> > > the
> > > > > model for an action (link, button, etc. rendered by the wicket
> > plugin)
> > > > has
> > > > > an "embedded instruction" to further render an excel sheet via (a
> > > > different
> > > > > plugin) jakarta poi as a result of the wicket action (so that when
> > the
> > > > user
> > > > > clicks the link, the user can download the sheet generated by the
> > model
> > > > via
> > > > > a wicket download stream associated with the defined link/action).
> > > > >
> > > > >
> > > > > **
> > > > > Martin
> > > > >
> > > >
> > >
> >
>


Re: Wicket MVVM

2022-11-17 Thread Martin Terra
Thanks, interesting. First impression it's quite some
annotation-heavy-soup. Was hoping for more wicket-like 100% pojo/lambda
approach and more clear divide&conquer separation of
view<->viewmodel<->persistence in a way that I can implement or plug
something else for persistence.

Anyways, will have a look if it can be used efficiently.

**
Martin

to 17. marrask. 2022 klo 17.17 Dan Haywood (d...@haywood-associates.co.uk)
kirjoitti:

> There is a plan to add OData support to isis.apache.org, so that a
> collection of objects could be opened in (and perhaps edited through)
> Excel, say.
>
> Dan
>
> On Thu, 17 Nov 2022 at 13:45, Martin Grigorov 
> wrote:
>
> > Hi,
> >
> > I am not sure how much helpful my answer is to you but
> > https://isis.apache.org/ does something similar.
> > Isis defines a model based on your naked objects.
> > And then different viewers visualize the objectis/collections. Apache
> > Wicket is one of the available viewers. REST is another. AFAIK there is
> no
> > POI viewer but there is a plugin for the Wicket viewer that adds "export
> to
> > Excel" button next to the tables.
> >
> > On Thu, Nov 17, 2022 at 11:48 AM Martin Terra <
> > martin.te...@koodaripalvelut.com> wrote:
> >
> > > Hi!
> > >
> > > Is there a library/example/experience for doing MVVM with wicket (or
> > > something close enough to serve as a useful reference)?
> > >
> > > A practical goal would be to decouple the Wicket stack from other
> layers
> > > and automate gui code generation based on predefined patterns & layout
> > > design (benefits would be stabilty, testability, predictability,
> standard
> > > practices, maintainability, upgradeability, code generation/ai code
> > > copilot, etc.).
> > >
> > > Preferably it would work even so far that we could plug/attach either
> > > jakarta poi or wicket to the same model and get as output (for example)
> > > either a html table or excel sheet.
> > >
> > > How it works is, basically you would have a wicket plugin that
> > > "interprets/implements" the model. Alternatively you could have a
> jakarta
> > > poi plugin as well.
> > >
> > > You could also have a mix of the two, for example: an instruction in
> the
> > > model for an action (link, button, etc. rendered by the wicket plugin)
> > has
> > > an "embedded instruction" to further render an excel sheet via (a
> > different
> > > plugin) jakarta poi as a result of the wicket action (so that when the
> > user
> > > clicks the link, the user can download the sheet generated by the model
> > via
> > > a wicket download stream associated with the defined link/action).
> > >
> > >
> > > **
> > > Martin
> > >
> >
>


Wicket MVVM

2022-11-17 Thread Martin Terra
Hi!

Is there a library/example/experience for doing MVVM with wicket (or
something close enough to serve as a useful reference)?

A practical goal would be to decouple the Wicket stack from other layers
and automate gui code generation based on predefined patterns & layout
design (benefits would be stabilty, testability, predictability, standard
practices, maintainability, upgradeability, code generation/ai code
copilot, etc.).

Preferably it would work even so far that we could plug/attach either
jakarta poi or wicket to the same model and get as output (for example)
either a html table or excel sheet.

How it works is, basically you would have a wicket plugin that
"interprets/implements" the model. Alternatively you could have a jakarta
poi plugin as well.

You could also have a mix of the two, for example: an instruction in the
model for an action (link, button, etc. rendered by the wicket plugin) has
an "embedded instruction" to further render an excel sheet via (a different
plugin) jakarta poi as a result of the wicket action (so that when the user
clicks the link, the user can download the sheet generated by the model via
a wicket download stream associated with the defined link/action).


**
Martin


Re: Blind XPath Injection Solution

2022-11-07 Thread Martin Terra
TL;DR In general wicket app should do server side validation and if client
submits a valid query then it might not be a problem, or you need to add
validation.

Does this ring a bell?

**
Martin

ti 8. marrask. 2022 klo 6.03 Jonathan P. Babie (jba...@osc.ny.gov.invalid)
kirjoitti:

> Hello,
>
> Our Wicket web application went through an app scan.  We understand most
> problems that came back from the report and have solutions, but one that's
> troubling us is:
>
> Blind XPath Injection
> Severity: Medium
> CVSS Score: 6.4
> Entity: regionFormGroup:regionFormGroup_body:regionTextField (Parameter)
> Risk: It is possible to access information stored in a sensitive data
> resource
> Cause: Sanitation of hazardous characters was not performed correctly on
> user input
> Fix: Review possible solutions for hazardous character injection
> Difference:
> Parameter regionFormGroup:regionFormGroup_body:regionTextField manipulated
> from: b to: b%27+and+l​ast%28%29%3Dlast%28%29+or+%27
> Parameter regionFormGroup:regionFormGroup_body:regionTextField manipulated
> from: b to: b%27+and+not%28last%28%29%29%3Dlast%28%29+or%27
> Parameter regionFormGroup:regionFormGroup_body:regionTextField manipulated
> from: b to: b%27+and+position%28%29%3Dposition%28%29+or+%27
> Reasoning: The test result seems to indicate a vulnerability because it
> shows that values can be appended to parameter values, indicating that they
> were embedded in an Xpath query. In this test, four (or sometimes five)
> requests are sent. One of the last two should be logically equal to the
> original, and the request before that is different, and should yield empty
> result or error. Any others are for control purposes. A comparison between
> the responses of the equivalent requests, and those that are not equivalent
> with the first (the equivalent options are similar to it, and the erroneous
> one is different) indicates that the application is vulnerable.
>
> Test Requests and Responses:
> POST
> /lgmm/1EFGhfMAxecfRmNOJXeaL4DEM0H-EW58EQqlsCvFg2CrIQQFX7A73Gb1jkQR1RVAgGv-Ar-xgDmvL9rYCjIxJyUCSoIcSK57hbnGyvGyXBMLG_P37gUxG-gvskBCrGmZDb7eWl9v5shigfUuZPG54Nckxrw3uEsF01z1jdgTzDjsiYMQe_Wp04lViFNHIjn9LpPw9tg8gq5DRvPE2MTYlx82jMU_2xmlJJMYGoOTwwKnJRA94d_aqyTlatMrDzSr/1EFf1/rGm57
> HTTP/1.1
> Host: example.domain.com
> Connection: keep-alive
> sec-ch-ua: "Chromium";v="106", "Google Chrome";v="106",
> "Not;A=Brand";v="99"
> sec-ch-ua-mobile: ?0
> Wicket-FocusedElementId: id87
> User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36
> (KHTML, like Gecko) Chrome/106.0.0.0 Safari/537.36
> Content-Type: application/x-www-form-urlencoded; charset=UTF-8
> Accept: application/xml, text/xml, */*; q=0.01
> Wicket-Ajax-BaseURL:
> 1EFGhfMAxecfRmNOJXeaL4DEM0H-EW58EQqlsCvFg2CrIQQFX7A73Gb1jkQR1RVAgGv-Ar-xgDmvL9rYCjIxJyUCSoIcSK57hbnGyvGyXBMLG_P37gUxG-gvskBCrGmZmajvnhPJ2o8/1EFf1/-gvdb
> X-Requested-With: XMLHttpRequest
> Wicket-Ajax: true
> sec-ch-ua-platform: "Windows"
> Origin: https://example.domain.com
> Sec-Fetch-Site: same-origin
> Sec-Fetch-Mode: cors
> Sec-Fetch-Dest: empty
> Referer:
> https://example.domain.com/lgmm/1EFGhfMAxecfRmNOJXeaL4DEM0H-EW58EQqlsCvFg2CrIQQFX7A73Gb1jkQR1RVAgGv-Ar-xgDmvL9rYCjIxJyUCSoIcSK57hbnGyvGyXBMLG_P37gUxG-gvskBCrGmZmajvnhPJ2o8/1EFf1/-gvdb
> Accept-Language
> :
> en-US
> Content-Length: 58
>
> regionFormGroup%3AregionFormGroup_body%3AregionTextField=b
>
> HTTP/1.1 200 OK
> Date: Fri, 28 Oct 2022 01:26:27 GMT
> X-Powered-By: Servlet/3.1
> Expires: Thu, 01 Jan 1970 00:00:00 GMT
> Pragma: no-cache
> Cache-Control: no-cache, no-store
> Ajax-Location:
> ../../1EFGhfMAxecfRmNOJXeaL4DEM0H-EW58EQqlsCvFg2CrIQQFX7A73Gb1jkQR1RVAgGv-Ar-xgDmvL9rYCjIxJyUCSoIcSK57hbnGyvGyXBMLG_P37gUxG-gvskBCrGmZGxUSqIGs5Tb2rcQ5fnAdfw/1EFf1/rYC7b
> Keep-Alive: timeout=5, max=94
> Connection: Keep-Alive
> Transfer-Encoding: chunked
> Content-Type: text/xml;charset=UTF-8
> Content-Language: en-US
> X-Frame-Options: SAMEORIGIN
> Strict-Transport-Security: max-age=31536000; preload
> 
>
>  
>  ...
> ...
> ...
> Content-Length: 96
>
>
> regionFormGroup%3AregionFormGroup_body%3AregionTextField=b%27+and+last%28%29%3Dlast%28%29+or+%27
>
> HTTP/1.1 200 OK
> Date: Fri, 28 Oct 2022 01:26:27 GMT
> X-Powered-By: Servlet/3.1
> ...
> ...
> ...
> Content-Length: 104
>
>
> regionFormGroup%3AregionFormGroup_body%3AregionTextField=b%27+and+not%28last%28%29%29%3Dlast%28%29+or%27
>
> HTTP/1.1 200 OK
> Date: Fri, 28 Oct 2022 01:26:27 GMT
> X-Powered-By: Servlet/3.1
> ...
> ...
> ...
> Content-Length: 104
>
>
> regionFormGroup%3AregionFormGroup_body%3AregionTextField=b%27+and+position%28%29%3Dposition%28%29+or+%27
>
> HTTP/1.1 200 OK
> Date: Fri, 28 Oct 2022 01:26:27 GMT
> X-Powered-By: Servlet/3.1
>
>
> We're having a hard time understanding what's even happening here or if
> it's a threat

Re: Reg: Integrate Spring REST and OAuth2 in Wicket web Application

2022-09-26 Thread Martin Terra
Hi!

It should be quite straightforward once you start according to standard
practices and best principles.

You can find lots of resources via google, e.g.,
https://support.wicket.io/hc/en-us/articles/4411663172631-Getting-Started-with-SSO-OAuth2-SAML2-

Or have you already tried it and do you have a more specific question?

**
Martin

ma 26. syysk. 2022 klo 9.40 sundar saba (sundarsabapa...@gmail.com)
kirjoitti:

> Hi all,
>
> I would like to use OAuth2 client credentials grant type
> authentication in my Wicket project. Currently I am using spring security
> in my project. But I already implement REST features from Wicketstuff REST
> annotations for internal use. Now I want to create new REST endpoints for
> Third party clients using Spring REST and secured by Spring OAuth2. Could
> you all guide me in right direction
>


Re: Form components in ListView cleared if ListView is refreshed

2022-07-08 Thread Martin Terra
pe 8. heinäk. 2022 klo 11.21 Arunachalam Sibisakkaravarthi (
arunacha...@mcruncher.com) kirjoitti:

> Noted Martin Terra.
> The Mechanism of showing the validation messages is automatic.
>

You might want to debug this functionality, then, maybe there is a bug or
maybe something is not happening which is not apparent on your screen.

Without seeing the code I cannot guess more.

**
Martin

>
>
>
> *Thanks And RegardsSibi.ArunachalammCruncher*
>
>
> On Fri, Jul 8, 2022 at 3:15 PM Martin Terra <
> martin.te...@koodaripalvelut.com> wrote:
>
> > pe 8. heinäk. 2022 klo 10.06 Arunachalam Sibisakkaravarthi (
> > arunacha...@mcruncher.com) kirjoitti:
> >
> > > Hi Martin Terra, thanks for your suggestion.
> > > Yes, currently AjaxLink is used in my case, I should use AjaxSubmitLink
> > to
> > > address the issue where it clears the input.
> > >
> >
> > Probably yes, AjaxSubmitLink aj AjaxButton are interchangeable, remember
> to
> > setDefaultFormSubmitBehavior(false) to avoid actually submitting and
> > processing the form.
> >
> >
> > > I just observed another thing that validation happens for all list
> items,
> > > but the validation message shows only items that present when the
> > listview
> > > is initialized.
> > > but when I refresh the page (pressing F5 on the browser), then all list
> > > items show the validation messages. Any idea on this behavior?
> > >
> >
> > What is your mechanism of showing the validation messages, is it
> automatic?
> >
> > **
> > Martin
> >
> > >
> > >
> > >
> > >
> > > *Thanks And RegardsSibi.ArunachalammCruncher*
> > >
> > >
> > > On Thu, Jul 7, 2022 at 10:44 AM Martin Terra <
> > > martin.te...@koodaripalvelut.com> wrote:
> > >
> > > > to 7. heinäk. 2022 klo 4.45 Arunachalam Sibisakkaravarthi (
> > > > arunacha...@mcruncher.com) kirjoitti:
> > > >
> > > > > Hi Martin Terra,
> > > > > Thanks for your feedback, Yes I already used setReuseItems on
> > > listview. I
> > > > > will look at your suggestion.
> > > > > Data loss happens only when invalid email address is entered (in my
> > > > case).
> > > > > Let say If the form component doesn't have validation, then no data
> > > loss
> > > > > when listview is refreshed.
> > > > > Will data in the form component be validated when listview is
> > > refreshed?
> > > > If
> > > > > yes, then is it possible to stop that behaviour? Then it will be
> > > > validated
> > > > > only when the form is submitted.
> > > > >
> > > >
> > > > When refreshing component via ajax or other submit, you must use
> > > > button.setDefaultFormProcessing(false) to avoid validation.
> > > >
> > > > If you refresh view without button, for example using a Link, a Link
> > does
> > > > not submit the input data to the server and thus values are "lost"
> > > because
> > > > they are never received by the server.
> > > >
> > > > When working with forms, all actions must use a form submitting
> > behavior
> > > > (see AjaxFormSubmitBehavior) in one way or another (ajax or
> otherwise)
> > to
> > > > send the values to server (in order for server to be able to repaint
> > them
> > > > in response).
> > > >
> > > > **
> > > > Martin
> > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > *Thanks And RegardsSibi.ArunachalammCruncher*
> > > > >
> > > > >
> > > > > On Wed, Jul 6, 2022 at 8:01 PM Martin Terra <
> > > > > martin.te...@koodaripalvelut.com> wrote:
> > > > >
> > > > > > You can setReuseItems, but the number of your list items changes
> > you
> > > > will
> > > > > > need to implement some sort of FormComponentReuseManager
> > > > > > <
> > > > > >
> > > > >
> > > >
> > >
> >
> https://users.wicket.apache.narkive.com/UBuknoCl/add-remove-dynamic-formcomponent-in-repeatingview
> > > > > > >
> > > > > >
> > > > > >
> > > > > > **
> > > > > > Martin
> > > > > >
> > > > > > ke 6. heinäk. 2022 klo 13.08 Arunachalam Sibisakkaravarthi (
> > > > > > arunacha...@mcruncher.com) kirjoitti:
> > > > > >
> > > > > > > Hi guys,
> > > > > > > I have a form that has a text field with Email validator in a
> > > > ListView
> > > > > (I
> > > > > > > want get list of email addresses from user)
> > > > > > > When invalid email is entered and listview is refreshed then
> Text
> > > > field
> > > > > > is
> > > > > > > cleared
> > > > > > > whereas Text field is not cleared when valid email is entered
> and
> > > > > > listview
> > > > > > > is refreshed
> > > > > > > I don't want to clear even invalid email addresses when
> listview
> > is
> > > > > > > refreshed.
> > > > > > > I want the form components in the list view to be validated
> only
> > > > when
> > > > > > the
> > > > > > > form is submitted.
> > > > > > > Is it possible to address this concern in list view?
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > *Thanks And RegardsSibi.ArunachalammCruncher*
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>


Re: Form components in ListView cleared if ListView is refreshed

2022-07-08 Thread Martin Terra
pe 8. heinäk. 2022 klo 10.06 Arunachalam Sibisakkaravarthi (
arunacha...@mcruncher.com) kirjoitti:

> Hi Martin Terra, thanks for your suggestion.
> Yes, currently AjaxLink is used in my case, I should use AjaxSubmitLink to
> address the issue where it clears the input.
>

Probably yes, AjaxSubmitLink aj AjaxButton are interchangeable, remember to
setDefaultFormSubmitBehavior(false) to avoid actually submitting and
processing the form.


> I just observed another thing that validation happens for all list items,
> but the validation message shows only items that present when the listview
> is initialized.
> but when I refresh the page (pressing F5 on the browser), then all list
> items show the validation messages. Any idea on this behavior?
>

What is your mechanism of showing the validation messages, is it automatic?

**
Martin

>
>
>
>
> *Thanks And RegardsSibi.ArunachalammCruncher*
>
>
> On Thu, Jul 7, 2022 at 10:44 AM Martin Terra <
> martin.te...@koodaripalvelut.com> wrote:
>
> > to 7. heinäk. 2022 klo 4.45 Arunachalam Sibisakkaravarthi (
> > arunacha...@mcruncher.com) kirjoitti:
> >
> > > Hi Martin Terra,
> > > Thanks for your feedback, Yes I already used setReuseItems on
> listview. I
> > > will look at your suggestion.
> > > Data loss happens only when invalid email address is entered (in my
> > case).
> > > Let say If the form component doesn't have validation, then no data
> loss
> > > when listview is refreshed.
> > > Will data in the form component be validated when listview is
> refreshed?
> > If
> > > yes, then is it possible to stop that behaviour? Then it will be
> > validated
> > > only when the form is submitted.
> > >
> >
> > When refreshing component via ajax or other submit, you must use
> > button.setDefaultFormProcessing(false) to avoid validation.
> >
> > If you refresh view without button, for example using a Link, a Link does
> > not submit the input data to the server and thus values are "lost"
> because
> > they are never received by the server.
> >
> > When working with forms, all actions must use a form submitting behavior
> > (see AjaxFormSubmitBehavior) in one way or another (ajax or otherwise) to
> > send the values to server (in order for server to be able to repaint them
> > in response).
> >
> > **
> > Martin
> >
> > >
> > >
> > >
> > >
> > > *Thanks And RegardsSibi.ArunachalammCruncher*
> > >
> > >
> > > On Wed, Jul 6, 2022 at 8:01 PM Martin Terra <
> > > martin.te...@koodaripalvelut.com> wrote:
> > >
> > > > You can setReuseItems, but the number of your list items changes you
> > will
> > > > need to implement some sort of FormComponentReuseManager
> > > > <
> > > >
> > >
> >
> https://users.wicket.apache.narkive.com/UBuknoCl/add-remove-dynamic-formcomponent-in-repeatingview
> > > > >
> > > >
> > > >
> > > > **
> > > > Martin
> > > >
> > > > ke 6. heinäk. 2022 klo 13.08 Arunachalam Sibisakkaravarthi (
> > > > arunacha...@mcruncher.com) kirjoitti:
> > > >
> > > > > Hi guys,
> > > > > I have a form that has a text field with Email validator in a
> > ListView
> > > (I
> > > > > want get list of email addresses from user)
> > > > > When invalid email is entered and listview is refreshed then Text
> > field
> > > > is
> > > > > cleared
> > > > > whereas Text field is not cleared when valid email is entered and
> > > > listview
> > > > > is refreshed
> > > > > I don't want to clear even invalid email addresses when listview is
> > > > > refreshed.
> > > > > I want the form components in the list view to be validated  only
> > when
> > > > the
> > > > > form is submitted.
> > > > > Is it possible to address this concern in list view?
> > > > >
> > > > >
> > > > >
> > > > > *Thanks And RegardsSibi.ArunachalammCruncher*
> > > > >
> > > >
> > >
> >
>


Re: Form components in ListView cleared if ListView is refreshed

2022-07-06 Thread Martin Terra
to 7. heinäk. 2022 klo 4.45 Arunachalam Sibisakkaravarthi (
arunacha...@mcruncher.com) kirjoitti:

> Hi Martin Terra,
> Thanks for your feedback, Yes I already used setReuseItems on listview. I
> will look at your suggestion.
> Data loss happens only when invalid email address is entered (in my case).
> Let say If the form component doesn't have validation, then no data loss
> when listview is refreshed.
> Will data in the form component be validated when listview is refreshed? If
> yes, then is it possible to stop that behaviour? Then it will be validated
> only when the form is submitted.
>

When refreshing component via ajax or other submit, you must use
button.setDefaultFormProcessing(false) to avoid validation.

If you refresh view without button, for example using a Link, a Link does
not submit the input data to the server and thus values are "lost" because
they are never received by the server.

When working with forms, all actions must use a form submitting behavior
(see AjaxFormSubmitBehavior) in one way or another (ajax or otherwise) to
send the values to server (in order for server to be able to repaint them
in response).

**
Martin

>
>
>
>
> *Thanks And RegardsSibi.ArunachalammCruncher*
>
>
> On Wed, Jul 6, 2022 at 8:01 PM Martin Terra <
> martin.te...@koodaripalvelut.com> wrote:
>
> > You can setReuseItems, but the number of your list items changes you will
> > need to implement some sort of FormComponentReuseManager
> > <
> >
> https://users.wicket.apache.narkive.com/UBuknoCl/add-remove-dynamic-formcomponent-in-repeatingview
> > >
> >
> >
> > **
> > Martin
> >
> > ke 6. heinäk. 2022 klo 13.08 Arunachalam Sibisakkaravarthi (
> > arunacha...@mcruncher.com) kirjoitti:
> >
> > > Hi guys,
> > > I have a form that has a text field with Email validator in a ListView
> (I
> > > want get list of email addresses from user)
> > > When invalid email is entered and listview is refreshed then Text field
> > is
> > > cleared
> > > whereas Text field is not cleared when valid email is entered and
> > listview
> > > is refreshed
> > > I don't want to clear even invalid email addresses when listview is
> > > refreshed.
> > > I want the form components in the list view to be validated  only when
> > the
> > > form is submitted.
> > > Is it possible to address this concern in list view?
> > >
> > >
> > >
> > > *Thanks And RegardsSibi.ArunachalammCruncher*
> > >
> >
>


Re: Form components in ListView cleared if ListView is refreshed

2022-07-06 Thread Martin Terra
You can setReuseItems, but the number of your list items changes you will
need to implement some sort of FormComponentReuseManager



**
Martin

ke 6. heinäk. 2022 klo 13.08 Arunachalam Sibisakkaravarthi (
arunacha...@mcruncher.com) kirjoitti:

> Hi guys,
> I have a form that has a text field with Email validator in a ListView (I
> want get list of email addresses from user)
> When invalid email is entered and listview is refreshed then Text field is
> cleared
> whereas Text field is not cleared when valid email is entered and listview
> is refreshed
> I don't want to clear even invalid email addresses when listview is
> refreshed.
> I want the form components in the list view to be validated  only when the
> form is submitted.
> Is it possible to address this concern in list view?
>
>
>
> *Thanks And RegardsSibi.ArunachalammCruncher*
>


Re: Re: Automatically insert generated html IDs in other places in html file

2022-06-30 Thread Martin Terra
Can you provide more code to clarify your use case? A quickstart would be
helpful.

Without deeper insight into your project, I would simply implement a
reusable panel like this:

 
 
 Lorem ipsum dolor sit amet
 Content ...
 
  

In java you could then use this as an one-line element along the lines of:

new ReusablePanel("panel-id", "header-id");


**
Martin


to 30. kesäk. 2022 klo 13.50 Daniel Radünz (ihmehlm...@gmx.de) kirjoitti:

> Thank you kindly both for your suggestions.
>
> @Martin Terra
> I'm not sure I quite undstand what you mean. My hope was that I don't have
> to add any of the involved components to the Java code of every single
> panel. The example I've given is just one of many. We have many different
> constellation with completly different html fragments but each of them has
> the same problem, that somewhere in there the html ID of one html tag has
> to be put into the html attribute of another html tag.
>
> @Martin Grigorov
> The problem I'm having with doing it on the client with javascript or with
> the IResponseFilter is that by that time I can only work on the fully
> assembled html. If a Wicket page includes the same panel multiple times
> though, I would already have the same html ID and the same reference to it
> multiple times in the final html without a (bullet proof) way to figure out
> which two elements ultimatively belong together.
>
> That's why I was hoping there would be a way to do this on a panel level,
> maybe with a custom attribute. Something like
> 
>   
> 
>
> If I'd then have a page which has the same panel twice in it, Wicket would
> take care of assinging unique IDs and also putting these generated unique
> IDs in the corresponding attributes that reference them, resulting in
> something like this:
> 
>   
> 
> 
>   
> 
>
> If there is something like the IResponseFilter but on a per component base
> which would allow me to inspect and modify only the html fragment of a
> component/panel it might work.
>
> Kind regards,
> Daniel
>
>
> Gesendet: Mittwoch, 29. Juni 2022 um 15:40 Uhr
> Von: "Martin Grigorov" 
> An: users@wicket.apache.org
> Betreff: Re: Automatically insert generated html IDs in other places in
> html file
> Hi,
>
> The easiest way I could imagine is with a short jQuery function that is
> called on domready.
>
> If you need to do it on the server side then maybe with IResponseFilter.
>
> On Wed, Jun 29, 2022, 12:38 Daniel Radünz  wrote:
>
> > Hello everybody,
> >
> > I'm wondering if there is a way in Wicket to generate unique html IDs and
> > to then add them in other places in the html, without having to write any
> > boiler plate code in each panel that I have.
> >
> > For example in the following panel I need the ID of the h1 tag to be put
> > into the aria-labelledby attribute in the section tag.
> > 
> > 
> > Lorem
> > ipsum dolor sit amet
> > Content ...
> > 
> > 
> >
> > Hardwiring it like in this example of course won't work if I use the same
> > panel class multiple times within a page due to duplicate html IDs.
> >
> > While I know I could add WebMarkupContainers for the section and the h1
> to
> > my Java code and manually wire them together with an AttributeModifier in
> > Wicket, I woud prefer to have some application wide code which recognizes
> > this constellation in the html file and automatically generates and
> inserts
> > the IDs.
> >
> > Maybe somebody can push me in the right direction, how I could accomplish
> > this with Wicket, if it's possible at all.
> >
> > Kind regards,
> > Daniel
> >
> > -
> > 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: Automatically insert generated html IDs in other places in html file

2022-06-29 Thread Martin Terra
ke 29. kesäk. 2022 klo 12.38 Daniel Radünz (ihmehlm...@gmx.de) kirjoitti:

> Hello everybody,
>
> I'm wondering if there is a way in Wicket to generate unique html IDs and
> to then add them in other places in the html, without having to write any
> boiler plate code in each panel that I have.
>
> For example in the following panel I need the ID of the h1 tag to be put
> into the aria-labelledby attribute in the section tag.
> 
> 
> Lorem
> ipsum dolor sit amet
> Content ...
> 
> 
>
> Hardwiring it like in this example of course won't work if I use the same
> panel class multiple times within a page due to duplicate html IDs.
>
> While I know I could add WebMarkupContainers for the section and the h1 to
> my Java code and manually wire them together with an AttributeModifier in
> Wicket, I woud prefer to have some application wide code which recognizes
> this constellation in the html file and automatically generates and inserts
> the IDs.
>

You can extend and create your own flavor of WebMarkupContainer which does
all that you need or even a panel if the html is repetitive as well.

**
Martin


> Maybe somebody can push me in the right direction, how I could accomplish
> this with Wicket, if it's possible at all.
>
> Kind regards,
> Daniel
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: Is there any way to get an error message when uploading a file that exceeds the size limit?

2022-06-09 Thread Martin Terra
Hi!

I would assume that you should set the form levele restriction stricter
than application or server level to allow the form to be processed and thus
give way for the onFileUploadException to be invoked.

**
Martin

to 9. kesäk. 2022 klo 14.57 Ryo Tsunoda (try0.developm...@gmail.com)
kirjoitti:

> Hi.
>
> Looking at Form#onFileUploadException, I see that it sets an error message
> (resource key: uploadTooLarge), is there any way to display this error in
> the browser?
>
> I use Form#setMaxSize and ApplicationSettings#setDefaultMaximumUploadSize
> methods.
> When I upload a file that exceeds these settings, I would like to return a
> response with an error message and display it on browser. However, the
> browser displays [ERR_CONNECTION_RESET] now.
>
>
> Regards,
> Ryo Tsunoda.
>


Re: prevent client request being intercepted for attack

2022-05-27 Thread Martin Terra
If you browse with a ZAP associated browser then I assume the https
connection is with ZAP.

You should only be concerned if you browse with a different browser than
one associated ZAP and then same occurs.

**
Martin

pe 27. toukok. 2022 klo 12.46 Arunachalam Sibisakkaravarthi (
arunacha...@mcruncher.com) kirjoitti:

> We Use HTTPS with TLS.
> Our app has login authentication.
> I am not sure whether it is valid concern or not
> I just explain the steps that I followed
>
> 1. Wicket app runs on 8443 with https with tls
> 2. Owasp ZAP tool runs on 8080
> 3. Start a browser from ZAP with configured app url eg:
> https://localhost:8443
> 4. Login page is displayed
> 5. Entered credentials and login successful
> 6. I have a form with a  name text field and an ajax submit button
> 7. Enter a value "Foo" into  name field
> 8. Click the break point in ZAP
> 9. Then click the ajax submit button
> 10. Now the request details shown in clear text on ZAP window (eg:
> _csrf=fc786e60-6be2-5ce3-9f8a-f98679c3bf0d&p%3A%3Aname=Foo)
> 11. I changed the name value to "Bar" in ZAP
> 12. Now I click a button in ZAP to proceed the request
> 13. It is saved successfully with the value "Bar" in the Wicket
> application.
>
> Here the user entered "Foo" whereas in the application "Bar" stored.
>
> Is this a valid concern?
>
>
>
>
> *Thanks And RegardsSibi.ArunachalammCruncher*
>
>
> On Fri, May 27, 2022 at 4:20 PM Korbinian Bachl <
> korbinian.ba...@whiskyworld.de> wrote:
>
> > Use HTTPS with TLS
> >
> > Also note: if you or your service operates within the EU and you dont
> > secure this via encryption you are violating the GDPR!
> >
> >
> > - Ursprüngliche Mail -
> > > Von: "Arunachalam Sibisakkaravarthi" 
> > > An: "users" 
> > > Gesendet: Freitag, 27. Mai 2022 09:27:14
> > > Betreff: prevent client request being intercepted for attack
> >
> > > Hi guys,
> > > Form submission requests can be intercepted using a third party tool
> (eg:
> > > ZAP) to change the data. Is there a way to prevent this attack? How do
> we
> > > validate data integrity?
> > >
> > >
> > >
> > > *Thanks And RegardsSibi.ArunachalammCruncher*
> >
> > -
> > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> > For additional commands, e-mail: users-h...@wicket.apache.org
> >
> >
>


Re: prevent client request being intercepted for attack

2022-05-27 Thread Martin Terra
Use https

pe 27. toukok. 2022 klo 10.27 Arunachalam Sibisakkaravarthi (
arunacha...@mcruncher.com) kirjoitti:

> Hi guys,
> Form submission requests can be intercepted using a third party tool (eg:
> ZAP) to change the data. Is there a way to prevent this attack? How do we
> validate data integrity?
>
>
>
> *Thanks And RegardsSibi.ArunachalammCruncher*
>


Re: fragment

2022-03-19 Thread Martin Terra
la 19. maalisk. 2022 klo 9.16 Martin Terra (martin.te...@koodaripalvelut.com)
kirjoitti:

> la 19. maalisk. 2022 klo 9.09 vahid ghasemi (vahidghasemi...@gmail.com)
> kirjoitti:
>
>> Can you lunch my code and see that, please?
>>
>
> Can you maybe capture it as plain html+css/js and post it online? You can
> get it from the inspect functionality of the browser.
>

Also, does it behave the same on all browsers? Mobile and desktop, safari,
firefox, ie, chrome, opera?

**
Martin


>
> **
> Martin
>
>
>> On Thu, Mar 17, 2022 at 2:29 PM Martin Terra <
>> martin.te...@koodaripalvelut.com> wrote:
>>
>> > to 17. maalisk. 2022 klo 12.42 vahid ghasemi (vahidghasemi...@gmail.com
>> )
>> > kirjoitti:
>> >
>> > > Its not css/js issue.
>> > > Because when I load only HTML haven't any problem and works well.
>> > >
>> >
>> > If zoom affects it, it is a css/js issue.
>> >
>> > **
>> > Martin
>> >
>> > >
>> > > On Thu, Mar 17, 2022 at 11:00 AM Martin Terra <
>> > > martin.te...@koodaripalvelut.com> wrote:
>> > >
>> > > > If it's a css/js issue, stackoveflow.com might lead to faster
>> > solution.
>> > > >
>> > > > to 17. maalisk. 2022 klo 8.49 vahid ghasemi (
>> vahidghasemi...@gmail.com
>> > )
>> > > > kirjoitti:
>> > > >
>> > > > > Hello,
>> > > > > I'm using wicket-fragment in my page, my page has a primitive
>> form,
>> > and
>> > > > > after submit decide to create and show one of the fragments below
>> of
>> > my
>> > > > > primitive form.
>> > > > > I'm using the bootstrap panel.
>> > > > > After creating the fragment the height of the panel-heading in my
>> > > > fragment
>> > > > > contains my primitive form and the height is too large.
>> > > > > I created a sample to show you: (also you can see
>> imageSample1.png &
>> > > > > imageSample2.png)
>> > > > >
>> > > > >
>> > > >
>> > >
>> >
>> https://github.com/vahida1157/wicket-test/tree/master/src/main/java/com/mycompany/problems/fragmentpanelheading
>> > > > > .
>> > > > > .
>> > > > > .
>> > > > > When I decide to zoom in and send a better image, I realized after
>> > > > getting
>> > > > > zoom above 175% the problem was fixed. (you can see
>> imageSample3.png)
>> > > in
>> > > > > Github.
>> > > > >
>> > > > > So why and what is the problem?
>> > > > >
>> > > >
>> > >
>> >
>>
>


Re: fragment

2022-03-19 Thread Martin Terra
la 19. maalisk. 2022 klo 9.09 vahid ghasemi (vahidghasemi...@gmail.com)
kirjoitti:

> Can you lunch my code and see that, please?
>

Can you maybe capture it as plain html+css/js and post it online? You can
get it from the inspect functionality of the browser.

**
Martin


> On Thu, Mar 17, 2022 at 2:29 PM Martin Terra <
> martin.te...@koodaripalvelut.com> wrote:
>
> > to 17. maalisk. 2022 klo 12.42 vahid ghasemi (vahidghasemi...@gmail.com)
> > kirjoitti:
> >
> > > Its not css/js issue.
> > > Because when I load only HTML haven't any problem and works well.
> > >
> >
> > If zoom affects it, it is a css/js issue.
> >
> > **
> > Martin
> >
> > >
> > > On Thu, Mar 17, 2022 at 11:00 AM Martin Terra <
> > > martin.te...@koodaripalvelut.com> wrote:
> > >
> > > > If it's a css/js issue, stackoveflow.com might lead to faster
> > solution.
> > > >
> > > > to 17. maalisk. 2022 klo 8.49 vahid ghasemi (
> vahidghasemi...@gmail.com
> > )
> > > > kirjoitti:
> > > >
> > > > > Hello,
> > > > > I'm using wicket-fragment in my page, my page has a primitive form,
> > and
> > > > > after submit decide to create and show one of the fragments below
> of
> > my
> > > > > primitive form.
> > > > > I'm using the bootstrap panel.
> > > > > After creating the fragment the height of the panel-heading in my
> > > > fragment
> > > > > contains my primitive form and the height is too large.
> > > > > I created a sample to show you: (also you can see imageSample1.png
> &
> > > > > imageSample2.png)
> > > > >
> > > > >
> > > >
> > >
> >
> https://github.com/vahida1157/wicket-test/tree/master/src/main/java/com/mycompany/problems/fragmentpanelheading
> > > > > .
> > > > > .
> > > > > .
> > > > > When I decide to zoom in and send a better image, I realized after
> > > > getting
> > > > > zoom above 175% the problem was fixed. (you can see
> imageSample3.png)
> > > in
> > > > > Github.
> > > > >
> > > > > So why and what is the problem?
> > > > >
> > > >
> > >
> >
>


Re: fragment

2022-03-17 Thread Martin Terra
to 17. maalisk. 2022 klo 12.42 vahid ghasemi (vahidghasemi...@gmail.com)
kirjoitti:

> Its not css/js issue.
> Because when I load only HTML haven't any problem and works well.
>

If zoom affects it, it is a css/js issue.

**
Martin

>
> On Thu, Mar 17, 2022 at 11:00 AM Martin Terra <
> martin.te...@koodaripalvelut.com> wrote:
>
> > If it's a css/js issue, stackoveflow.com might lead to faster solution.
> >
> > to 17. maalisk. 2022 klo 8.49 vahid ghasemi (vahidghasemi...@gmail.com)
> > kirjoitti:
> >
> > > Hello,
> > > I'm using wicket-fragment in my page, my page has a primitive form, and
> > > after submit decide to create and show one of the fragments below of my
> > > primitive form.
> > > I'm using the bootstrap panel.
> > > After creating the fragment the height of the panel-heading in my
> > fragment
> > > contains my primitive form and the height is too large.
> > > I created a sample to show you: (also you can see imageSample1.png &
> > > imageSample2.png)
> > >
> > >
> >
> https://github.com/vahida1157/wicket-test/tree/master/src/main/java/com/mycompany/problems/fragmentpanelheading
> > > .
> > > .
> > > .
> > > When I decide to zoom in and send a better image, I realized after
> > getting
> > > zoom above 175% the problem was fixed. (you can see imageSample3.png)
> in
> > > Github.
> > >
> > > So why and what is the problem?
> > >
> >
>


Re: fragment

2022-03-17 Thread Martin Terra
If it's a css/js issue, stackoveflow.com might lead to faster solution.

to 17. maalisk. 2022 klo 8.49 vahid ghasemi (vahidghasemi...@gmail.com)
kirjoitti:

> Hello,
> I'm using wicket-fragment in my page, my page has a primitive form, and
> after submit decide to create and show one of the fragments below of my
> primitive form.
> I'm using the bootstrap panel.
> After creating the fragment the height of the panel-heading in my fragment
> contains my primitive form and the height is too large.
> I created a sample to show you: (also you can see imageSample1.png &
> imageSample2.png)
>
> https://github.com/vahida1157/wicket-test/tree/master/src/main/java/com/mycompany/problems/fragmentpanelheading
> .
> .
> .
> When I decide to zoom in and send a better image, I realized after getting
> zoom above 175% the problem was fixed. (you can see imageSample3.png) in
> Github.
>
> So why and what is the problem?
>


Re: document and example

2022-02-11 Thread Martin Terra
If you google wicket xsd it leads to https://wicket.apache.org/dtds.data/

Is this maybe the precision what you are looking for?

**
Martin

la 12. helmik. 2022 klo 5.40 vahid ghasemi (vahidghasemi...@gmail.com)
kirjoitti:

> Martin Terra, I read your link, and as you can see It's not a completed
> document. you can see documents about "wicket:unknown" and "wicket-scope"
> that does not write. And document writer just guess about 
> and , And I can't see an example about them in the document (I
> found tag examples In Andrea Del Bene's link).
> Andrea Del Bene, I had seen your link and it answers some questions, but
> yet can't find examples about wicket attributes.
>
> On Fri, Feb 11, 2022 at 8:11 PM Andrea Del Bene 
> wrote:
>
> > You can always go to the user guide
> > https://nightlies.apache.org/wicket/guide/9.x/single.html and search for
> > your favorite tag :-)
> >
> > On Fri, Feb 11, 2022 at 3:57 PM vahid ghasemi  >
> > wrote:
> >
> > > Hello,
> > > I can't find a good document or example about XHTMLs in wicket.
> > > like "wicket:enclosure attribute" or " and 
> > >  tag".
> > > How can I find some examples or descriptions?
> > >
> >
> >
> > --
> > Andrea Del Bene.
> > Apache Wicket committer.
> >
>


Re: document and example

2022-02-11 Thread Martin Terra
Hi!

Do you mean this:
https://cwiki.apache.org/confluence/display/WICKET/Wicket%27s+XHTML+tags

**
Martin

pe 11. helmik. 2022 klo 16.57 vahid ghasemi (vahidghasemi...@gmail.com)
kirjoitti:

> Hello,
> I can't find a good document or example about XHTMLs in wicket.
> like "wicket:enclosure attribute" or " and 
>  tag".
> How can I find some examples or descriptions?
>


Re: Selenium testing

2022-02-01 Thread Martin Terra
ti 1. helmik. 2022 klo 13.32 Wayne W (waynemailingli...@gmail.com)
kirjoitti:

> Thanks all for your replies.
> Food for thought there.
>
> WicketTester seems the 'better' solution, but I'm trying to hand this over
> to a QA person who cannot program. Ernesto - I think it would be a massive
> undertaking for use to get the css paths working well enough so that there
> was some consistency for Selenium.
>

If your "coders" provide all handles, the QA person can probably invoke the
hooks. Anways, your success odds are better if your QA is somewhat code
savvy, for example comfortable with running and debugging from IDE etc.

You might also want to divide and conquer, the QA person manages strategy,
scope and stats of tests and their results, and (delegates)  coders
maintain the actual tests.

**
Martin


>
>
>
> On Mon, Jan 31, 2022 at 2:37 PM Ernesto Reinaldo Barreiro <
> reier...@gmail.com> wrote:
>
> > Hi,
> >
> > Our app contains about 600 selenium tests... They are a pain to maintain
> > even when we are trying to do things "the smart way". By this we mean:
> >
> >- We have some reusable wicket components. E.g. some AJAX table with
> >lateral filtering facets. We roll in component marker CSS classes
> (e.g.
> >.facets, .facet, .date-time-facet) + "use custom key attributes" (e.g
> >facet-category="").
> >- We mirror this component structure at client side selenium tests.
> i.e.
> >we have a FacetsDriver that  hides low level complexity (e.g.
> > FacetDriver
> >xxx = tableWithFacets.getFacteDriverFof("xxx") and xxx.select("aaa")).
> >
> > The above works fine (mostly). Except people sometimes forget to use
> proper
> > ways and reinvent the wheel. Sometimes tests do not pass or are shaky for
> > no clear reason and a lot of time goes into stabilizing those. We are
> using
> > global AJAX blocker div for pages, to prevent component not found issues,
> > this makes very easy to have a global waitForAjaxFinished().
> >
> > In summary. We run our tests on a server running in production mode. Thus
> > we do not use any wicket path or anything similar, we use custom CSS
> > classes + custom element attributes to give a more precise context.
> >
> > Hope this helps?
> >
> >
> > On Mon, Jan 31, 2022 at 8:38 AM Wayne W 
> > wrote:
> >
> > > Hello all,
> > >
> > > Is anyone out there successfully using Selenium to do regression
> testing?
> > > It seems with the latest version of Selenium you cannot add custom
> > > selectors anymore (the idea turning on
> > > getDebugSettings().setComponentPathAttributeName("wicketpath") ). So it
> > > just uses css selectors and xpath now.
> > >
> > > Whilst I can had craft css selectors to use the wicketpath attribute I
> > > cannot get the IDE to use this by default. The problem is I want to
> hand
> > > this over to our QA person but she is not technical nature and would
> > > struggle to understand the correct selector when looking at the code
> and
> > > also it would really slow down the whole process of setting up tests.
> > >
> > > Anyone got Selenium working well, or can recommend another tool for web
> > > regressing testing that works well with Wicket?
> > >
> > > thanks
> > >
> >
> >
> > --
> > Regards - Ernesto Reinaldo Barreiro
> >
>


Re: Selenium testing

2022-01-31 Thread Martin Terra
ma 31. tammik. 2022 klo 15.38 Wayne W (waynemailingli...@gmail.com)
kirjoitti:

> Hello all,
>
> Is anyone out there successfully using Selenium to do regression testing?
> It seems with the latest version of Selenium you cannot add custom
> selectors anymore (the idea turning on
> getDebugSettings().setComponentPathAttributeName("wicketpath") ). So it
> just uses css selectors and xpath now.
>
> Whilst I can had craft css selectors to use the wicketpath attribute I
> cannot get the IDE to use this by default. The problem is I want to hand
> this over to our QA person but she is not technical nature and would
> struggle to understand the correct selector when looking at the code and
> also it would really slow down the whole process of setting up tests.
>
> Anyone got Selenium working well, or can recommend another tool for web
> regressing testing that works well with Wicket?
>

We use WicketTester tests for regression tests and selenium tests for
availability tests.

Here's a hassle free guide to set up type safe testing without using string
property paths:

https://cwiki.apache.org/confluence/display/WICKET/Type-safe+testing+in+wicket

I'd say the overhead of selenium doesn't pay off using it for all tests,
but your mileage might vary.

**
Martin


> thanks
>


Re: Convert to science Number

2022-01-11 Thread Martin Terra
Also, are you using a BigDecimal or arbitrary floating point numbers
? Big
decimals should have a built in converter.

**
Martin

ti 11. tammik. 2022 klo 10.26 Martin Grigorov (mgrigo...@apache.org)
kirjoitti:

> Please give more details
>
> On Tue, Jan 11, 2022 at 9:10 AM vahid ghasemi 
> wrote:
>
> > Hello,
> > In wicket, the number above from 10E7 will convert to science number in
> > input.
> > How can I prevent that?
> >
>


Re: add Dropdown object to List

2021-09-28 Thread Martin Terra
I'd recommend: Keep it simple, implement using dropdownchoice and simply
convert to a list in your selection model if you need a list for domain
model purposes (I cannot comprehend why you would use a list to represent a
single selection).

**
Martin

ti 28. syysk. 2021 klo 10.57 vahid ghasemi (vahidghasemi...@gmail.com)
kirjoitti:

> Can I limit the users' choice number in ListMultipleChoice?
>
> On Mon, Sep 27, 2021 at 9:41 AM Martin Grigorov 
> wrote:
>
> > Hi,
> >
> > On Sun, Sep 26, 2021 at 9:12 PM vahid ghasemi  >
> > wrote:
> >
> > > So it's not any option to handle this issue?
> > > I have list but it's singleton list :(
> > >
> >
> > You need to use ListMultipleChoice instead of DropDownChoice.
> >
> >
> > > On Sun, Sep 26, 2021, 6:17 PM Martin Terra <
> > > martin.te...@koodaripalvelut.com>
> > > wrote:
> > >
> > > > Choices model should be final and the selection model should be one
> > item
> > > > not a list
> > > >
> > > >
> > > >
> > > > On Sun, Sep 26, 2021, 17:36 vahid ghasemi  >
> > > > wrote:
> > > >
> > > > > model class :
> > > > > class User {
> > > > > private List someThing;
> > > > > }
> > > > >
> > > > > Page class :
> > > > > private User user;
> > > > > Dropdown dd = new Dropdown("DropDownSomeThing", new
> > > > > PropertyModel(user,"someThing", );
> > > > >
> > > > > and this is my problem.
> > > > > how can I add the drop-down model to the user property which is
> list,
> > > > with
> > > > > PropertyModel
> > > > >
> > > > >
> > > > > On Sun, Sep 26, 2021 at 7:31 AM Martin Terra <
> > > > > martin.te...@koodaripalvelut.com> wrote:
> > > > >
> > > > > > Hi!
> > > > > >
> > > > > > Can you paste some code with your exact (generic) variables which
> > > > doesn't
> > > > > > work, it might be easier to figure out from code example than
> > verbal
> > > > > > description?
> > > > > >
> > > > > > **
> > > > > > Martin
> > > > > >
> > > > > > la 25. syysk. 2021 klo 19.46 vahid ghasemi (
> > > vahidghasemi...@gmail.com)
> > > > > > kirjoitti:
> > > > > >
> > > > > > > Hello guys.
> > > > > > > I have a dropdown and I want to use CompoundPropertyModel OR
> > > > > > PropertyModel.
> > > > > > > the attribute of my model is List and the wicket can't set the
> > > > > > > drop-down model object to List.
> > > > > > > what is your option to handle this?
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>


Re: add Dropdown object to List

2021-09-26 Thread Martin Terra
Selection is an object. If you want to transform it to a singleton later it
is a separate process. Or you need to build a model that does that, but for
PoC purposes I suggest you keep it simple and do by the book without list
at receiver.

**
Martin

su 26. syysk. 2021 klo 21.12 vahid ghasemi (vahidghasemi...@gmail.com)
kirjoitti:

> So it's not any option to handle this issue?
> I have list but it's singleton list :(
>
> On Sun, Sep 26, 2021, 6:17 PM Martin Terra <
> martin.te...@koodaripalvelut.com>
> wrote:
>
> > Choices model should be final and the selection model should be one item
> > not a list
> >
> >
> >
> > On Sun, Sep 26, 2021, 17:36 vahid ghasemi 
> > wrote:
> >
> > > model class :
> > > class User {
> > > private List someThing;
> > > }
> > >
> > > Page class :
> > > private User user;
> > > Dropdown dd = new Dropdown("DropDownSomeThing", new
> > > PropertyModel(user,"someThing", );
> > >
> > > and this is my problem.
> > > how can I add the drop-down model to the user property which is list,
> > with
> > > PropertyModel
> > >
> > >
> > > On Sun, Sep 26, 2021 at 7:31 AM Martin Terra <
> > > martin.te...@koodaripalvelut.com> wrote:
> > >
> > > > Hi!
> > > >
> > > > Can you paste some code with your exact (generic) variables which
> > doesn't
> > > > work, it might be easier to figure out from code example than verbal
> > > > description?
> > > >
> > > > **
> > > > Martin
> > > >
> > > > la 25. syysk. 2021 klo 19.46 vahid ghasemi (
> vahidghasemi...@gmail.com)
> > > > kirjoitti:
> > > >
> > > > > Hello guys.
> > > > > I have a dropdown and I want to use CompoundPropertyModel OR
> > > > PropertyModel.
> > > > > the attribute of my model is List and the wicket can't set the
> > > > > drop-down model object to List.
> > > > > what is your option to handle this?
> > > > >
> > > >
> > >
> >
>


Re: add Dropdown object to List

2021-09-26 Thread Martin Terra
Choices model should be final and the selection model should be one item
not a list



On Sun, Sep 26, 2021, 17:36 vahid ghasemi  wrote:

> model class :
> class User {
> private List someThing;
> }
>
> Page class :
> private User user;
> Dropdown dd = new Dropdown("DropDownSomeThing", new
> PropertyModel(user,"someThing", );
>
> and this is my problem.
> how can I add the drop-down model to the user property which is list, with
> PropertyModel
>
>
> On Sun, Sep 26, 2021 at 7:31 AM Martin Terra <
> martin.te...@koodaripalvelut.com> wrote:
>
> > Hi!
> >
> > Can you paste some code with your exact (generic) variables which doesn't
> > work, it might be easier to figure out from code example than verbal
> > description?
> >
> > **
> > Martin
> >
> > la 25. syysk. 2021 klo 19.46 vahid ghasemi (vahidghasemi...@gmail.com)
> > kirjoitti:
> >
> > > Hello guys.
> > > I have a dropdown and I want to use CompoundPropertyModel OR
> > PropertyModel.
> > > the attribute of my model is List and the wicket can't set the
> > > drop-down model object to List.
> > > what is your option to handle this?
> > >
> >
>


Re: tag into tag

2021-09-25 Thread Martin Terra
Hi!

To me it looks like you have a webmarkupcontainer and a small label inside
it. Or how do you expect it to render?

If all text is dynamic then I would still make it one label which partly
generates html markup.

**
Martin

la 25. syysk. 2021 klo 15.45 vahid ghasemi (vahidghasemi...@gmail.com)
kirjoitti:

> Hello
> I have a  tag and  tag inside of it:
>
>  wicket:id="panelName">
> Dashboard
> 
> 
> 
> 
>  wicket:id="panelDes">#XRS-45670
> 
>
> my h1 has a Label component.
>
> how I can add Lable into Label?
>


Re: add Dropdown object to List

2021-09-25 Thread Martin Terra
Hi!

Can you paste some code with your exact (generic) variables which doesn't
work, it might be easier to figure out from code example than verbal
description?

**
Martin

la 25. syysk. 2021 klo 19.46 vahid ghasemi (vahidghasemi...@gmail.com)
kirjoitti:

> Hello guys.
> I have a dropdown and I want to use CompoundPropertyModel OR PropertyModel.
> the attribute of my model is List and the wicket can't set the
> drop-down model object to List.
> what is your option to handle this?
>


Re: Page is being lost from Session intermittently

2021-09-02 Thread Martin Terra
to 2. syysk. 2021 klo 15.48 Wayne W (waynemailingli...@gmail.com) kirjoitti:

> Thanks for the replies.
> >
> >
> > Have you logged everything from the servlet container's session manager
> to
> > wicket session management, to identify the logic where loss occurs?
>
>
> Not yet.
>
> For example, did you try with different servlet containers if same
> > problem occurs? Jetty, Tomcat, something else? Just to rule out the
> servlet
> > container.
>
>
> I don't really want to go down that road (at least yet)  - the session is
> not lost, just the page in the session so I would not think it's the
> container. We've been using Tomcat for years in production.
>
>
> Does it fail on the first ping (after 15 minutes) or later ?
>
>
> No - anything from an hour to 15 hours . There does not seem to be any
> rhyme to it.
>
> If you don't do anything (e.g. in another tab) with the application then
> > Wicket should not overwrite/remove the disk store for your session.
>
>
> Yes to confirm we are not interacting with the application whilst the page
> is displayed and uploading elsewhere.
>
>  NotSerializableExceptions
>
>
> Yes we don't have those so not that.
>
>
> As a workaround you may do your ping to a Wicket Resource, or another
> > servlet. This will be enough to keep the http session without the extra
> > logic done in Wicket Ajax requests (resolve a page, resolve the component
> > in the tree, execute the callback method, ...).
>
>
> Thanks for the suggestion. There is a button on the end of the upload that
> interacts with the page, so we would need to rethink the flow to do this.
> It does feel like a bodge though.
>
> Where is the Wicket code is this logic done managing the page in the
> session?
>

In my experience a good trick is to search from wicket source with any
keywords you find from the logs, and work from there, add more debug
logging where necessary.

**
Martin

>
> Many thanks
>
>
>
>
>
>
> On Thu, Sep 2, 2021 at 9:41 AM Martin Grigorov 
> wrote:
>
> > Hi,
> >
> > On Wed, Sep 1, 2021 at 7:31 PM Wayne W 
> > wrote:
> >
> > > Hello there,
> > >
> > > We recently upgraded from Wicket 7.8.0 to 9.4.0 . We are experiencing
> > > intermittent pages that are being lost from the session.
> > >
> > > I can reproduce in production but it takes time and is random. We have
> a
> > > page where some files can be uploaded to another microservice from the
> > > webpage via an API. We have an AbstractDefaultAjaxBehavior in the page
> > > which gets called every 15 minutes to keep the session alive. This has
> > > always worked well.
> > >
> > > I can reproduce by uploading a very large file which can take say 4
> > hours,
> > > during this time I do not touch the page, or open any other tabs. The
> > only
> > > interaction during this process is the AbstractDefaultAjaxBehavior
> being
> > > called every 15 minutes to keep the session alive. We see that
> > > intermittently the page cannot be found in the session and wicket
> > > automatically recreates the page again. This coming  from the call to
> > > the AbstractDefaultAjaxBehavior - we see in the HTTP response headers
> > that
> > > wicket adds 'ajax-location: /the-page-we-are-on' and the wicket ajax JS
> > > does a redirect to recreate the page.
> > >
> >
> > Does it fail on the first ping (after 15 minutes) or later ?
> >
> >
> > >
> > > This kills the upload obviously as the page is refreshed.
> > >
> > > What could be causing this and where can I look in the code to
> understand
> > > when wicket decides to eject the page from the session? FYI we have
> > > setMaxSizePerSession
> > > set at 10MB.
> > >
> >
> > Wicket overwrites the oldest page(s) in the disk store if there are many
> > interactions with other pages.
> > If you don't do anything (e.g. in another tab) with the application then
> > Wicket should not overwrite/remove the disk store for your session.
> >
> >
> > >
> > > When does wicket decide to return the ajax-location header?
> > >
> >
> > Wicket does that when it needs to trigger a redirect in an Ajax response.
> > The Ajax request cannot find the page instance for some reason and (by
> > default) Wicket creates a new instance of the same page class and tells
> the
> > browser to move to it.
> >
> >
> > >
> > > It is possible this issue was happening in 7.8 but was not on our radar
> > so
> > > is unknown.
> > >
> >
> > Most of the time when a page cannot be found in the disk store is because
> > there was a problem with its serialization, i.e. it was not stored on the
> > disk at all. But in this case you should see some
> NotSerializableExceptions
> > in the server logs.
> >
> > As a workaround you may do your ping to a Wicket Resource, or another
> > servlet. This will be enough to keep the http session without the extra
> > logic done in Wicket Ajax requests (resolve a page, resolve the component
> > in the tree, execute the callback method, ...).
> >
> >
> >
> >
> > >
> > > Many thanks
> > > Wayne
> > >
> >
>


Re: Page is being lost from Session intermittently

2021-09-01 Thread Martin Terra
Hi!

Have you logged everything from the servlet container's session manager to
wicket session management, to identify the logic where loss occurs?

If necessary, you could compile a custom version of these from sources, to
add more necessary logging, to trace where the ball drops.

For example, did you try with different servlet containers if same
problem occurs? Jetty, Tomcat, something else? Just to rule out the servlet
container.

**
Martin

ke 1. syysk. 2021 klo 19.31 Wayne W (waynemailingli...@gmail.com) kirjoitti:

> Hello there,
>
> We recently upgraded from Wicket 7.8.0 to 9.4.0 . We are experiencing
> intermittent pages that are being lost from the session.
>
> I can reproduce in production but it takes time and is random. We have a
> page where some files can be uploaded to another microservice from the
> webpage via an API. We have an AbstractDefaultAjaxBehavior in the page
> which gets called every 15 minutes to keep the session alive. This has
> always worked well.
>
> I can reproduce by uploading a very large file which can take say 4 hours,
> during this time I do not touch the page, or open any other tabs. The only
> interaction during this process is the AbstractDefaultAjaxBehavior being
> called every 15 minutes to keep the session alive. We see that
> intermittently the page cannot be found in the session and wicket
> automatically recreates the page again. This coming  from the call to
> the AbstractDefaultAjaxBehavior - we see in the HTTP response headers that
> wicket adds 'ajax-location: /the-page-we-are-on' and the wicket ajax JS
> does a redirect to recreate the page.
>
> This kills the upload obviously as the page is refreshed.
>
> What could be causing this and where can I look in the code to understand
> when wicket decides to eject the page from the session? FYI we have
> setMaxSizePerSession
> set at 10MB.
>
> When does wicket decide to return the ajax-location header?
>
> It is possible this issue was happening in 7.8 but was not on our radar so
> is unknown.
>
> Many thanks
> Wayne
>


Re: Job opening, Wicket developer, full time remote position

2021-07-27 Thread Martin Terra
Hi!

Thanks, please do. You can tweet my message content (copy paste) as the job
description. However, if you feel there is some relevant information
missing, feel free to ask supplemental questions and I will try to fill in
the gaps.

**
Martin

ti 27. heinäk. 2021 klo 12.50 Francois Meillet (francois.meil...@gmail.com)
kirjoitti:

> Hi Martin,
>
> Do you want I tweet about your job on Apache Wicket Twitter account
> @apache_wicket ?
>
> If so please give me the link where users can see the job description.
>
> Best regards
>
> François
>
>
>
> > Le 27 juil. 2021 à 11:44, Martin Terra 
> a écrit :
> >
> > Hi!
> >
> > We are looking for a talented Wicket & UI developer for a full time
> remote
> > position.
> >
> > You would be working with us on an online work time tracking saas
> product.
> >
> > Heavy focus on real world usability and canonical implementation logic.
> >
> > It is an inhouse developed product, not a consulting gig.
> >
> > If you are available, please contact me directly.
> >
> >
> > Yours sincerely,
> > Martin Terra
> > martin.te...@koodaripalvelut.com
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Job opening, Wicket developer, full time remote position

2021-07-27 Thread Martin Terra
Hi!

We are looking for a talented Wicket & UI developer for a full time remote
position.

You would be working with us on an online work time tracking saas product.

Heavy focus on real world usability and canonical implementation logic.

It is an inhouse developed product, not a consulting gig.

If you are available, please contact me directly.


Yours sincerely,
Martin Terra
martin.te...@koodaripalvelut.com


Re: Why aren't setEnabled and setVisible model based?

2021-05-10 Thread Martin Terra
You often need to know overall UI state to determine visibility, and you
would end up with anonymous model classes of some sorts, so my educated
guess is there is not much expected benefit, only caveats. One would expect
a model to work and end up doing twice the work eventually using an
anonymous class or overriding onConfigure.

**
Martin

ma 10. toukok. 2021 klo 17.29 s...@stantastic.nl kirjoitti:

> So I finally took the plunge and joined the mailing list.
>
> I have been using Wicket for well over a year now and am very happy to
> have stumbled across it. There's just one question that I never really
> found an answer to. I have searched the users list a couple of times and
> found that some people are trying to use the 'setVisible' and
> 'setEnabled' methods with a Model-argument. They want do this in order
> to dynamically change visibility or access to a component. This idea has
> also crossed my mind a couple of times.
>
> The thing is... Wicket doesn't appear to work that way.
>
> When I look at the answers, I see two approaches. One is overriding
> 'isVisible', the other is to configure visibility from the 'onConfigure'
> method in the parent component. I tend to use the later.
>
> Because I always like to understand how things work, I would like to ask
> about the reasoning behind this. Why can't 'setVisible' and 'setEnabled'
> be controlled using IModel arguments? Is there a technical
> limitation here? Or is it just a quirk?
>
> Thanks.
>
> Stan
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: Wicket 9 on Java 8

2020-09-23 Thread Martin Terra
yagni ;)

ke 23. syysk. 2020 klo 18.06 Ashley Reed (ashley.r...@systemware.com)
kirjoitti:

> We need better Content-Security-Policy support. Our code and customers
> use Java 8. Wicket 9 with the CSP enhancements only works on Java 11.
> Any chance you can make Wicket 9 work on Java 8? Or backport the CSP
> enhancements to Wicket 8? Java 8 is still the most prevalent version
> used in production:
>
> https://blog.newrelic.com/technology/state-of-java/
> https://www.jrebel.com/blog/2020-java-technology-report
>
> Thanks,
> Ashley
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: Issues with refreshing panel with form

2020-08-12 Thread Martin Terra
Is unclear a) what you are trying to accomplish and b) what is not working
expectedly c) what actions is user supposed to take for the expected
behavior to occur.

**
Martin

ke 12. elok. 2020 klo 13.37 Zimen, Michal (michal.zi...@anasoft.com)
kirjoitti:

> I finally have found a hint what should be done to "properly" refresh
> components after nested form is submitted.
>
> In my onSubmit handler, I created a new component(panel) and set the model
> with values from the dialog. Then replaced it via
> component.replaceWith(newComponent).
>
> protected void onInitialize() {
> ...
> personModel = new Model(ComponentFactory.createPerson());
> if (defaultPerson != null)
> personModel.setObject(defaultPerson.copy());
> ...
> mandatePayerNamePersonPanel = new MandatePayerNamePersonEditPanel(
> "payerNamePersonPanel",
> new PropertyModel(personModel, "personName")
> );
>
>
>
>
>
> Are there any other solutions to do it better? Maybe without replacing the
> components?
>
>
> Thanks,
>
>   M.
>
> -Original Message-
> From: Martin Terra 
> Sent: Tuesday, August 4, 2020 4:45 PM
> To: users@wicket.apache.org
> Subject: POSSIBLY SPOOFED: Re: Issues with refreshing panel with form
>
> Did you debug clearinput and model detach whether they occur expectedly?
> Snipplet is too small to see the big picture, and at the same time it
> seems too complex to get the big picture quickly from code (maybe you could
> share a 15 line pseudocode spec for the form, what it's intended to do)?
>
> **
> Martin
>
> ti 4. elok. 2020 klo 15.43 Zimen, Michal (michal.zi...@anasoft.com)
> kirjoitti:
>
> > Hi,
> >
> >
> >
> > The dialogB(without nested form) of panelB uses this snippet to update
> > the models of the components in the root panel.
> > It works perfectly unless other nested form is submitted in advance.
> >
> >onClose( target) {
> > mandatePayerEditPanel.detachModels(); // this is the
> > reference to the root panels compoent, which needs to be updated.
> >   // It’s passed via
> > constructor in the
> > final Person productIsPerson = (Person)
> > productIsClient.getParty();
> > final PersonImpl person = (PersonImpl)
> > mandatePayerEditPanel.getPersonModel().getObject();
> >
> > person.setPersonName(productIsPerson.getPersonName().copy());
> > // sets the new value
> >
> > final IModel domesticAddressModel =
> > mandatePayerEditPanel.getAddressPersonPanel().getDomesticAddressModel();
> > domesticAddressModel.detach();
> >
> >
> > domesticAddressModel.setObject(productIsPerson.getContact().getAddress
> > ().copy());
> > // sets the new value
> >
> > // now comes the stuff for refreshing components with ajax
> > response
> > target.add(componentsToRefreshOnVerificationFill);
> > List list = new ArrayList();
> >
> > mandatePayerEditPanel.addComponentsToRefreshOnVerificationFill(list);
> > mandatePayerEditPanel.setOutputMarkupId(true);
> > mandatePayerEditPanel.setOutputMarkupPlaceholderTag(true);
> > mandatePayerEditPanel.markRendering(true);
> > mandatePayerEditPanel.setVisibilityAllowed(true);
> > mandatePayerEditPanel.modelChanged();
> > mandatePayerEditPanel.configure();
> > target.add(mandatePayerEditPanel);
> > }
> >
> >
> >
> >
> >
> > m.
> >
> >
> >
> > -Original Message-
> > From: Martin Grigorov 
> > Sent: Tuesday, August 4, 2020 2:25 PM
> > To: users@wicket.apache.org
> > Subject: Re: Issues with refreshing panel with form
> >
> >
> >
> > On Tue, Aug 4, 2020 at 2:53 PM Zimen, Michal  > <mailto:michal.zi...@anasoft.com>>
> >
> > wrote:
> >
> >
> >
> > > Thanks,
> >
> > >
> >
> > >  Well, snippets from source code might come later. My concerns are,
> >
> > > that the issue I’m facing is related to this
> >
> > > https://issues.apache.org/jira/browse/WICKET-6041
> >
> > > None weird logs have been found on both sides.
> >
> > >
> >
> > > DialogA with a nested form uses POST to update its stuff, but the
> >
> > > dialogB handle its work through GET only(no form submissi

Re: Issues with refreshing panel with form

2020-08-04 Thread Martin Terra
Did you debug clearinput and model detach whether they occur expectedly?
Snipplet is too small to see the big picture, and at the same time it seems
too complex to get the big picture quickly from code (maybe you could share
a 15 line pseudocode spec for the form, what it's intended to do)?

**
Martin

ti 4. elok. 2020 klo 15.43 Zimen, Michal (michal.zi...@anasoft.com)
kirjoitti:

> Hi,
>
>
>
> The dialogB(without nested form) of panelB uses this snippet to update the
> models of the components in the root panel.
> It works perfectly unless other nested form is submitted in advance.
>
>onClose( target) {
> mandatePayerEditPanel.detachModels(); // this is the reference
> to the root panels compoent, which needs to be updated.
>   // It’s passed via
> constructor in the
> final Person productIsPerson = (Person)
> productIsClient.getParty();
> final PersonImpl person = (PersonImpl)
> mandatePayerEditPanel.getPersonModel().getObject();
>
> person.setPersonName(productIsPerson.getPersonName().copy());
> // sets the new value
>
> final IModel domesticAddressModel =
> mandatePayerEditPanel.getAddressPersonPanel().getDomesticAddressModel();
> domesticAddressModel.detach();
>
>
> domesticAddressModel.setObject(productIsPerson.getContact().getAddress().copy());
> // sets the new value
>
> // now comes the stuff for refreshing components with ajax
> response
> target.add(componentsToRefreshOnVerificationFill);
> List list = new ArrayList();
>
> mandatePayerEditPanel.addComponentsToRefreshOnVerificationFill(list);
> mandatePayerEditPanel.setOutputMarkupId(true);
> mandatePayerEditPanel.setOutputMarkupPlaceholderTag(true);
> mandatePayerEditPanel.markRendering(true);
> mandatePayerEditPanel.setVisibilityAllowed(true);
> mandatePayerEditPanel.modelChanged();
> mandatePayerEditPanel.configure();
> target.add(mandatePayerEditPanel);
> }
>
>
>
>
>
> m.
>
>
>
> -Original Message-
> From: Martin Grigorov 
> Sent: Tuesday, August 4, 2020 2:25 PM
> To: users@wicket.apache.org
> Subject: Re: Issues with refreshing panel with form
>
>
>
> On Tue, Aug 4, 2020 at 2:53 PM Zimen, Michal  >
>
> wrote:
>
>
>
> > Thanks,
>
> >
>
> >  Well, snippets from source code might come later. My concerns are,
>
> > that the issue I’m facing is related to this
>
> > https://issues.apache.org/jira/browse/WICKET-6041
>
> > None weird logs have been found on both sides.
>
> >
>
> > DialogA with a nested form uses POST to update its stuff, but the
>
> > dialogB handle its work through GET only(no form submission).
>
> >
>
> > I was trying to catch the root form submission in form.onSubmit(), but
>
> > I found out, that this is not called, since the
>
> > wantSubmitOnNestedFormSubmit() returns false.
>
> > Therefore I conclude, that after POST request, other references among
>
> > components are broken.
>
> >
>
>
>
> What do you mean with this ?
>
>
>
>
>
> >
>
> > The question might be: How to "refresh" or keep these references after
>
> > nested form is submitted?
>
> >
>
> > Thanks a lot,
>
> >
>
> >
>
> >  M.
>
> >
>
> > -Original Message-
>
> > From: Martin Grigorov mailto:mgrigo...@apache.org
> >>
>
> > Sent: Tuesday, August 4, 2020 10:31 AM
>
> > To: users@wicket.apache.org
>
> > Subject: Re: Issues with refreshing panel with form
>
> >
>
> > Hi,
>
> >
>
> > On Mon, Aug 3, 2020 at 2:53 PM Zimen, Michal
>
> > mailto:michal.zi...@anasoft.com>>
>
> > wrote:
>
> >
>
> > > Hi Wicket Users,
>
> > >
>
> > >
>
> > >I've just started to learn the Wicket by fixing some issues in
>
> > > our legacy backlog repository.
>
> > >
>
> > > Therefore, I need some clarification to manage my blockpoints.
>
> > > Having spent enough time to fix it by myself, I finally must turn
>
> > > out to this help.
>
> > >
>
> > > The weird problem could be described following:
>
> > >
>
> > >
>
> > >   1.  A base form contains components and links to
>
> > > AbstractFormDialog(Jquery-ui) for user inputs.
>
> > >   2.  When the formDialogA is submitted, some parent components are
>
> > > updated, some remain empty, as it is expected.
>
> > >   3.  Another modal formDialogB is open and submitted and expecting
>
> > > components are not updated.
>
> > >
>
> > > When this procedure is done in swapped sequence - firstly
>
> > > formDialogB and then formDialogA is opened, everything works ok.
>
> > >
>
> > > Seems as if, the submitting formDialogA breaks the references for
>
> > > submission formDialogB.
>
> > >
>
> > > Could you please clarify me, what should be checked to avoid this
>
> > problem?
>
> > >
>
> >
>
> > I'd suggest these two things:
>
> > 1) check for errors both in the server logs and in the browser
>
> > 2) use a FeedbackPanel to

Re: Preventing the ModalWindow from being rendered as iframe

2020-07-07 Thread Martin Terra
Hi!

Javadoc says ... *If the content is a page (iframe)* ..

Can you show your code, if you are using a panel or a page as its content?

**
Martin

ti 7. heinäk. 2020 klo 13.26 Lukas Fülling (lerk@gammel.cloud.invalid)
kirjoitti:

> Hi,
>
> I'm currently trying to get Javascript callbacks from/to a Wicket
> ModalWindow to work.
> Currently, the WebPage the ModalWindow consis of is being redered as an
> iframe.
>
> The Wicket documentation states the following:
>
> > Modal window is a draggable window (with either div or iframe content)
> > that prevent user from interacting the rest of page (using a mask)
> > until the window is closed.
> (
> https://ci.apache.org/projects/wicket/apidocs/org/apache/wicket/extensions/ajax/markup/html/modal/ModalWindow.html
> )
>
> Unfortunately I can't find any info on how to make the ModalWindow being
> rendered as a div instead of an iframe and I wondered if someone on this
> list knows how to do it.
>
> Thanks for you help
>
> Lukas
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: Page locked for a long time

2020-07-05 Thread Martin Terra
Maybe something along the lines of a stateless page&upload form without a
session or something, so the user can continue with a session separately.

**
Martin

su 5. heinäk. 2020 klo 21.16 Sven Meier (s...@meiers.net) kirjoitti:

> Hi Maxim,
>
> you'll have to upload these files to a resource separately.
>
> I'm not aware of a reusable solution for that.
>
> Have fun
> Sven
>
>
> On 05.07.20 17:20, Maxim Solodovnik wrote:
> > Hello All,
> >
> > our app allows huge file uploads
> > I have noticed the page is locked while incoming input stream is being
> > copied
> > (might take more than an hour)
> >
> >   at java.base@11.0.7/java.io.InputStream.read(InputStream.java:205)
> > at org.apache.commons.fileupload.util.Streams.copy(Streams.java:98)
> > at org.apache.commons.fileupload.util.Streams.copy(Streams.java:68)
> > at
> >
> org.apache.commons.fileupload.FileUploadBase.parseRequest(FileUploadBase.java:346)
> > at
> >
> org.apache.wicket.protocol.http.servlet.MultipartServletWebRequestImpl.parseFileParts(MultipartServletWebRequestImpl.java:196)
> > at
> org.apache.wicket.markup.html.form.Form.handleMultiPart(Form.java:1470)
> >
> > Are there any options to prevent page lock?
> >
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: setHeaderResponseDecorator cause problem logging into my app

2020-04-13 Thread Martin Terra
Then you could try to debug it using browser developer tools (inspect
element, debugger etc.).

Usually there is an issue like conflicting js or missing dependencies
(throws exception on js), or something along those lines. Also could be
that dependencies are injected in wrong order, or you might accidentally
override some default js you are normally providing.

I would maybe start by taking a diff between a browser page
(source) without the change and a browser page (source) with the change,
maybe it will point you to some direction.

**
Martin

ti 14. huhtik. 2020 klo 7.05 LSomefun (oyesomefunla...@gmail.com) kirjoitti:

> No notification on console/browser log.
>
> --
> Sent from:
> http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: setHeaderResponseDecorator cause problem logging into my app

2020-04-13 Thread Martin Terra
Did you check both console log and browser (developer tools) logs?

**
Martin

ma 13. huhtik. 2020 klo 19.56 LSomefun (oyesomefunla...@gmail.com)
kirjoitti:

> I am having problem with inserting JavaScript into a Html body tag. Once I
> use the following code as shown in the tutorial into my
> AuthenticatedWebapplication, I can no longer login to my application.
>
> setHeaderResponseDecorator(response -> {
> return new ResourceAggregator(new
> JavaScriptFilteredIntoFooterHeaderResponse(response, "footercontainer"));
> });
>
> Once I remove the above codes. I am able to log in. The weird thing
> noticed,
> there is no error messages, nothing my log. I am on Wicket 8.7.0.
>
>
> --
> Sent from:
> http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: About XML Injection

2020-04-10 Thread Martin Terra
la 11. huhtik. 2020 klo 5.58 Shengche Hsiao (shengchehs...@gmail.com)
kirjoitti:

> Thanks Martin, I might misunderstand the report, and  I'll validate the
> submitted values to prevent xml injection.
>

You're welcome. To clarify: validation can prevent any malicious effects of
injected values, but it cannot prevent the injection itself. Therefore,
validation could cure the issue found in the report. This should
ofcourse be verified by reproducing the issue before fix and confirming
that applying the fix successfully mitigates the issue.

**
Martin


> On Thu, Apr 9, 2020 at 8:07 PM Martin Grigorov 
> wrote:
>
> > I still do not understand what exactly is the issue here.
> >
> > The client/browser submits the values as key/value pairs
> > (application/x-www-form-urlencoded).
> > The server responds with XML that is processed by wicket-ajax.js.
> > How validation of the submit values could help with the XML injection ?!
> >
> >
> > On Thu, Apr 9, 2020 at 2:52 PM Shengche Hsiao 
> > wrote:
> >
> > > Thank you, I'll do that and see if works
> > >
> > > On Thu, Apr 9, 2020 at 6:35 PM Martin Terra <
> > > martin.te...@koodaripalvelut.com> wrote:
> > >
> > > > Can you solve this by simple validation if submitted values are
> legal?
> > > This
> > > > way it does not matter if client tries to override the submit.
> > > >
> > > > **
> > > > Martin
> > > >
> > > > to 9. huhtik. 2020 klo 12.22 Shengche Hsiao (shengchehs...@gmail.com
> )
> > > > kirjoitti:
> > > >
> > > > > I got a report , it suggest our web site to deal with xml injection
> > > > issue.
> > > > > We use DropDownChoice with OnChangeAjaxBehavior to invoke another
> > > > > DropDownChoice via wicket-ajax buit-in xml payload, and the
> reporters
> > > > > used Burpsuite
> > > > > to inject xml on xmlpayload, such as inject &xxe;
> > > > >
> > > > >
> > > > >  image.png
> > > > > <
> > > > >
> > > >
> > >
> >
> https://drive.google.com/file/d/1U9nls1Z7tfs_zqEvbLLYsef89BFMopeY/view?usp=drive_web
> > > > > >
> > > > >
> > > > >
> > > > > and resulted in some abnormal response
> > > > >
> > > > >
> > > > >  image.png
> > > > > <
> > > > >
> > > >
> > >
> >
> https://drive.google.com/file/d/1RcAegoREfmkdPNm1DCw9ouUyfI20lh7K/view?usp=drive_web
> > > > > >
> > > > >
> > > > >
> > > > > As a result, I have to prevent the xml injection, do I check the
> > entire
> > > > > payload or only check there value we need ?
> > > > >
> > > > > On Thu, Apr 9, 2020 at 4:57 PM Martin Grigorov <
> mgrigo...@apache.org
> > >
> > > > > wrote:
> > > > >
> > > > > > The images didn't make it to the mailing list.
> > > > > > Please use some online image paste bin.
> > > > > >
> > > > > > On Thu, Apr 9, 2020 at 11:33 AM Shengche Hsiao <
> > > > shengchehs...@gmail.com>
> > > > > > wrote:
> > > > > >
> > > > > > > I got a report , it suggest our web site to deal with xml
> > injection
> > > > > > issue.
> > > > > > > We use DropDownChoice with OnChangeAjaxBehavior to invoke
> another
> > > > > > > DropDownChoice via wicket-ajax buit-in xml payload, and the
> > > reporters
> > > > > > used
> > > > > > >  Burpsuite to inject xml on xmlpayload, such as inject &xxe;
> > > > > > >
> > > > > > > [image: image.png]
> > > > > > >
> > > > > > > and resulted in some abnormal response
> > > > > > >
> > > > > > > [image: image.png]
> > > > > > >
> > > > > > > As a result, I have to prevent the xml injection, do I check
> the
> > > > entire
> > > > > > > payload or only check there value we need ?
> &

Re: About XML Injection

2020-04-09 Thread Martin Terra
So long as you are able to reproduce the issue and evaluate if you can
confirm the fix, it should be ok. You can then finetune the solution.

**
Martin

to 9. huhtik. 2020 klo 15.07 Martin Grigorov (mgrigo...@apache.org)
kirjoitti:

> I still do not understand what exactly is the issue here.
>
> The client/browser submits the values as key/value pairs
> (application/x-www-form-urlencoded).
> The server responds with XML that is processed by wicket-ajax.js.
> How validation of the submit values could help with the XML injection ?!
>
>
> On Thu, Apr 9, 2020 at 2:52 PM Shengche Hsiao 
> wrote:
>
> > Thank you, I'll do that and see if works
> >
> > On Thu, Apr 9, 2020 at 6:35 PM Martin Terra <
> > martin.te...@koodaripalvelut.com> wrote:
> >
> > > Can you solve this by simple validation if submitted values are legal?
> > This
> > > way it does not matter if client tries to override the submit.
> > >
> > > **
> > > Martin
> > >
> > > to 9. huhtik. 2020 klo 12.22 Shengche Hsiao (shengchehs...@gmail.com)
> > > kirjoitti:
> > >
> > > > I got a report , it suggest our web site to deal with xml injection
> > > issue.
> > > > We use DropDownChoice with OnChangeAjaxBehavior to invoke another
> > > > DropDownChoice via wicket-ajax buit-in xml payload, and the reporters
> > > > used Burpsuite
> > > > to inject xml on xmlpayload, such as inject &xxe;
> > > >
> > > >
> > > >  image.png
> > > > <
> > > >
> > >
> >
> https://drive.google.com/file/d/1U9nls1Z7tfs_zqEvbLLYsef89BFMopeY/view?usp=drive_web
> > > > >
> > > >
> > > >
> > > > and resulted in some abnormal response
> > > >
> > > >
> > > >  image.png
> > > > <
> > > >
> > >
> >
> https://drive.google.com/file/d/1RcAegoREfmkdPNm1DCw9ouUyfI20lh7K/view?usp=drive_web
> > > > >
> > > >
> > > >
> > > > As a result, I have to prevent the xml injection, do I check the
> entire
> > > > payload or only check there value we need ?
> > > >
> > > > On Thu, Apr 9, 2020 at 4:57 PM Martin Grigorov  >
> > > > wrote:
> > > >
> > > > > The images didn't make it to the mailing list.
> > > > > Please use some online image paste bin.
> > > > >
> > > > > On Thu, Apr 9, 2020 at 11:33 AM Shengche Hsiao <
> > > shengchehs...@gmail.com>
> > > > > wrote:
> > > > >
> > > > > > I got a report , it suggest our web site to deal with xml
> injection
> > > > > issue.
> > > > > > We use DropDownChoice with OnChangeAjaxBehavior to invoke another
> > > > > > DropDownChoice via wicket-ajax buit-in xml payload, and the
> > reporters
> > > > > used
> > > > > >  Burpsuite to inject xml on xmlpayload, such as inject &xxe;
> > > > > >
> > > > > > [image: image.png]
> > > > > >
> > > > > > and resulted in some abnormal response
> > > > > >
> > > > > > [image: image.png]
> > > > > >
> > > > > > As a result, I have to prevent the xml injection, do I check the
> > > entire
> > > > > > payload or only check there value we need ?
> > > > > >
> > > > > > On Thu, Apr 9, 2020 at 4:11 PM Martin Grigorov <
> > mgrigo...@apache.org
> > > >
> > > > > > wrote:
> > > > > >
> > > > > >> On Thu, Apr 9, 2020 at 11:09 AM Shengche Hsiao <
> > > > shengchehs...@gmail.com
> > > > > >
> > > > > >> wrote:
> > > > > >>
> > > > > >> > Yes, I need to know overriding which methods
> > > > > >> >
> > > > > >>
> > > > > >> I still do not understand what exactly you need to accomplish.
> > > > > >> Please be more specific!
> > > > > >>
> > > > > >>
> > > > > >> >
> > > > > >> > On Thu, Apr 9, 2020 at 16:03 Martin Grigorov <
> > > mgrigo...@apache.org>
> > > >

Re: About XML Injection

2020-04-09 Thread Martin Terra
Can you solve this by simple validation if submitted values are legal? This
way it does not matter if client tries to override the submit.

**
Martin

to 9. huhtik. 2020 klo 12.22 Shengche Hsiao (shengchehs...@gmail.com)
kirjoitti:

> I got a report , it suggest our web site to deal with xml injection issue.
> We use DropDownChoice with OnChangeAjaxBehavior to invoke another
> DropDownChoice via wicket-ajax buit-in xml payload, and the reporters
> used Burpsuite
> to inject xml on xmlpayload, such as inject &xxe;
>
>
>  image.png
> <
> https://drive.google.com/file/d/1U9nls1Z7tfs_zqEvbLLYsef89BFMopeY/view?usp=drive_web
> >
>
>
> and resulted in some abnormal response
>
>
>  image.png
> <
> https://drive.google.com/file/d/1RcAegoREfmkdPNm1DCw9ouUyfI20lh7K/view?usp=drive_web
> >
>
>
> As a result, I have to prevent the xml injection, do I check the entire
> payload or only check there value we need ?
>
> On Thu, Apr 9, 2020 at 4:57 PM Martin Grigorov 
> wrote:
>
> > The images didn't make it to the mailing list.
> > Please use some online image paste bin.
> >
> > On Thu, Apr 9, 2020 at 11:33 AM Shengche Hsiao 
> > wrote:
> >
> > > I got a report , it suggest our web site to deal with xml injection
> > issue.
> > > We use DropDownChoice with OnChangeAjaxBehavior to invoke another
> > > DropDownChoice via wicket-ajax buit-in xml payload, and the reporters
> > used
> > >  Burpsuite to inject xml on xmlpayload, such as inject &xxe;
> > >
> > > [image: image.png]
> > >
> > > and resulted in some abnormal response
> > >
> > > [image: image.png]
> > >
> > > As a result, I have to prevent the xml injection, do I check the entire
> > > payload or only check there value we need ?
> > >
> > > On Thu, Apr 9, 2020 at 4:11 PM Martin Grigorov 
> > > wrote:
> > >
> > >> On Thu, Apr 9, 2020 at 11:09 AM Shengche Hsiao <
> shengchehs...@gmail.com
> > >
> > >> wrote:
> > >>
> > >> > Yes, I need to know overriding which methods
> > >> >
> > >>
> > >> I still do not understand what exactly you need to accomplish.
> > >> Please be more specific!
> > >>
> > >>
> > >> >
> > >> > On Thu, Apr 9, 2020 at 16:03 Martin Grigorov 
> > >> wrote:
> > >> >
> > >> > > Hi,
> > >> > >
> > >> > > On Thu, Apr 9, 2020 at 10:27 AM ShengChe Hsiao <
> front...@gmail.com>
> > >> > wrote:
> > >> > >
> > >> > > > Dear all
> > >> > > >
> > >> > > > I use built-in ajax dropdownchoice component, it's default
> payload
> > >> is
> > >> > xml
> > >> > > > entity, but if I need to prevent xml injection ,how can i do?
> > >> > > >
> > >> > >
> > >> > > Could you please give some more information what exactly you need?
> > >> > >
> > >> > >
> > >> > > >
> > >> > > >
> > >> > > >
> > 
> > >> > > > --->
> > >> > > > To boldly go where no man has gone before.
> > >> > > >
> > 
> > >> > > > --->
> > >> > > > We do this not because it is easy. We do this because it is
> hard.
> > >> > > >
> -
> > >> > > > -->
> > >> > > > If I have seen further it is by standing on the shoulders of
> > giants.
> > >> > > > --
> > >> > > > ->
> > >> > > > front...@gmail.com
> > >> > > >
> > >> > > >
> > >> > >
> > >> >
> > >>
> >
> ->
> > >> > > >
> > >> > >
> > >> > --
> > >> >
> > >> >
> > --->
> > >> > We do this not because it is easy. We do this because it is hard.
> > >> >
> > --->
> > >> > ShengChe Hsiao
> > >> >
> > --->
> > >> > front...@gmail.com
> > >> > front...@tc.edu.tw
> > >> >
> > --->
> > >> > VoIP : 070-910-2450
> > >> >
> > --->
> > >> >
> > >>
> > >
> > >
> > > --
> > >
> > >
> --->
> > > We do this not because it is easy. We do this because it is hard.
> > >
> --->
> > > ShengChe Hsiao
> > >
> --->
> > > front...@gmail.com
> > > front...@tc.edu.tw
> > >
> --->
> > > VoIP : 070-910-2450
> > >
> --->
> > >
> >
>
>
> --
>
> --->
> We do this not becau

Re: About XML Injection

2020-04-09 Thread Martin Terra
I'd recommend you simply include it with maven options into your IDE this
way it is always there with you.

You can googe it, and there are some recent previous wicket threads about
it too:
http://apache-wicket.1842946.n4.nabble.com/Where-to-download-Javadoc-for-Wicket-8-x-td4683643.html#a4683654

**
Martin

to 9. huhtik. 2020 klo 10.55 Shengche Hsiao (shengchehs...@gmail.com)
kirjoitti:

> I can checkout source from github, but I need some advise to start, thanks
>
> On Thu, Apr 9, 2020 at 3:36 PM Martin Terra <
> martin.te...@koodaripalvelut.com> wrote:
>
> > You could override some of the methods that do the injecting. Do you have
> > the wicket sources?
> >
> > **
> > Martin
> >
> > to 9. huhtik. 2020 klo 10.27 ShengChe Hsiao (front...@gmail.com)
> > kirjoitti:
> >
> > > Dear all
> > >
> > > I use built-in ajax dropdownchoice component, it's default payload is
> xml
> > > entity, but if I need to prevent xml injection ,how can i do?
> > >
> > >
> > > 
> > > --->
> > > To boldly go where no man has gone before.
> > > 
> > > --->
> > > We do this not because it is easy. We do this because it is hard.
> > > -
> > > -->
> > > If I have seen further it is by standing on the shoulders of giants.
> > > --
> > > ->
> > > front...@gmail.com
> > >
> > >
> >
> ->
> > >
> >
>
>
> --
>
> --->
> We do this not because it is easy. We do this because it is hard.
> --->
> ShengChe Hsiao
> --->
> front...@gmail.com
> front...@tc.edu.tw
> --->
> VoIP : 070-910-2450
> --->
>


Re: About XML Injection

2020-04-09 Thread Martin Terra
You could override some of the methods that do the injecting. Do you have
the wicket sources?

**
Martin

to 9. huhtik. 2020 klo 10.27 ShengChe Hsiao (front...@gmail.com) kirjoitti:

> Dear all
>
> I use built-in ajax dropdownchoice component, it's default payload is xml
> entity, but if I need to prevent xml injection ,how can i do?
>
>
> 
> --->
> To boldly go where no man has gone before.
> 
> --->
> We do this not because it is easy. We do this because it is hard.
> -
> -->
> If I have seen further it is by standing on the shoulders of giants.
> --
> ->
> front...@gmail.com
>
> ->
>


Re: Where to download Javadoc for Wicket 8.x?

2020-03-02 Thread Martin Terra
ma 2. maalisk. 2020 klo 13.43 SB (progscriptcl...@gmail.com) kirjoitti:

> > ... plug in the libraries with maven together with the source option ...
>
> Sorry, I don't understand. Could you explain what you mean by this?
>

Depending on which IDE you use, try something like:
https://stackoverflow.com/questions/310720/get-source-jar-files-attached-to-eclipse-for-maven-managed-dependencies

**
Martin


>
> On Mon, Mar 2, 2020 at 11:35 AM Martin Terra <
> martin.te...@koodaripalvelut.com> wrote:
>
> > I would recommend to plug in the libraries with maven together with the
> > source option, this way you have both the wicket source code and the
> > javadoc.
> >
> > **
> > Martin
> >
> > ma 2. maalisk. 2020 klo 2.01 SB (progscriptcl...@gmail.com) kirjoitti:
> >
> > > I usually work offline, and I need to refer to the Javadocs. Is there a
> > > place where I can download Wicket's Javadocs for offline use?
> > >
> >
>


Re: Where to download Javadoc for Wicket 8.x?

2020-03-01 Thread Martin Terra
I would recommend to plug in the libraries with maven together with the
source option, this way you have both the wicket source code and the
javadoc.

**
Martin

ma 2. maalisk. 2020 klo 2.01 SB (progscriptcl...@gmail.com) kirjoitti:

> I usually work offline, and I need to refer to the Javadocs. Is there a
> place where I can download Wicket's Javadocs for offline use?
>


Re: Converters for Date/Time

2020-01-13 Thread Martin Terra
How about feedback messages etc.?

**
Martin

ma 13. tammik. 2020 klo 18.46 Sven Meier (s...@meiers.net) kirjoitti:

> Hi,
>
> adapting to the client timezone can be done in the component, a
> converter or a model. e.g.
>
>
> https://github.com/apache/wicket/blob/master/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/ZonedToLocalDateTimeModel.java
>
> Whatever fits your use-case. Maybe you want everything to be displayed
> in the client timeZone -> register a global converter.
>
> Have fun
> Sven
>
>
> On 13.01.20 06:05, Илья Нарыжный wrote:
> > Hello,
> >
> > I have some fundamental question about Wicket:)
> > For users it's convenient when date-time has shown in their timezone.
> > So most of wicket devs, do that somehow like we did it here:
> >
> https://github.com/OrienteerBAP/Orienteer/blob/master/orienteer-core/src/main/java/org/orienteer/core/component/property/date/ODateLabel.java
> > But question is: does it make sense to put conversion per time-zone
> > into DateConverter or that might broke something wicket
> > best-practices?
> >
> > Thanks,
> > Ilya
> > -
> > Orienteer(http://orienteer.org) - open source Business Application
> Platform
> >
> > -
> > 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: Retrieve user's page on the site

2019-12-29 Thread Martin Terra
In our experience these can be a mixed bag of expired requests, expired
links, incorrect back button presses (and links from stale pages), session
timeouts, etc.

We haven't been able to trace them either, if a solution exists, I wish it
was part of wicket core.

Using more human readable urls might help, identifying session and clicked
button and maybe page state, which could be later backtraced to determine
any inconsistencies.

**
Martin


ma 30. jouluk. 2019 klo 6.24 Илья Нарыжный (phan...@ydn.ru) kirjoitti:

> Hello,
>
> We have pretty widely used software with thousands of visits per day.
> And from time to time we observe pretty weird  Wicket related errors
> in logs. Commonly it's something about components structure: no such
> child, there is already such element and etc. But the problem is that
> commonly we can't reproduce the problem right away: page is working as
> expected. So such mysterious problems just lie in logs and not being
> fixed.
> And here is the question: is there some good way to retrieve and log
> previous user actions and etc.? Theoretically everything should be in
> PageStore. What can you recommend to handle such problems properly?
>
> P.S. To be able to catch such problems we even build a system for
> gathering all logs on a central server and correlate them with each
> other according to some correlation logic. But still - no big luck -
> so we really believe that problem is in fact that we know only current
> user page/location and do not know historical aspect.
>
> Thanks,
> Ilia
>
> -
> Orienteer(http://orienteer.org) - open source Business Application
> Platform
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: Application not seri

2019-12-20 Thread Martin Terra
Follow the stacktrace, looks like there is a reference to
ava.lang.Object org.apache.wicket.Component.data
[class=[Ljava.lang.Object;]

maybe anonymous class? If you need an Object, you need to make a
SerializableObject extends Object implements Serializabe ...

Just study the stacktrace, it will become clear.

**
Martin

la 21. jouluk. 2019 klo 8.03 ShengChe Hsiao (front...@gmail.com) kirjoitti:

> Dear all
> I faced a strange exception, the error message:
>
> A problem occurred while checking object with type:
> info.sls.WicketApplication
>
> Field hierarchy is:
>
>   1 [class=info.sls.MapPage, path=1]
>
> private java.lang.Object org.apache.wicket.MarkupContainer.children
> [class=java.util.ArrayList]
>
>   private java.lang.Object
> org.apache.wicket.MarkupContainer.children[write:27][write:28]
> [class=org.apache.wicket.markup.html.form.StatelessForm,
> path=1:formGMapSelect]
>
> private java.lang.Object org.apache.wicket.MarkupContainer.children
> [class=java.util.ArrayList]
>
>   private final java.lang.String
>
> org.apache.wicket.markup.html.form.ChoiceRenderer.idExpression[write:8][write:11]
> [class=org.apache.wicket.ajax.markup.html.form.AjaxSubmitLink,
> path=1:formGMapSelect:btnSelect]
>
> final info.sls.GMapPanel info.sls.MapPage$1.val$gMapPanel
> [class=info.sls.GMapPanel, path=1:gmaps]
>
>   java.lang.Object org.apache.wicket.Component.data
> [class=[Ljava.lang.Object;]
>
> java.lang.Object org.apache.wicket.Component.data[0]
> [class=org.apache.wicket.model.LoadableDetachableModel]
>
>   final info.sls.WicketApplication
> info.sls.WicketApplication$3.this$0 [class=info.sls.WicketApplication]
> <- field that is causing the problem
>
>
> I use transient with WicketApplication in my BasePage, but the issue
> continued.
>
>
> private transient WicketApplication wicketApplication;
>
>
>
> Any suggestions?
> 
> --->
> To boldly go where no man has gone before.
> 
> --->
> We do this not because it is easy. We do this because it is hard.
> -
> -->
> If I have seen further it is by standing on the shoulders of giants.
> --
> ->
> front...@gmail.com
>
> ->
>


Re: Programmatic creation of messages with nested components

2019-07-24 Thread Martin Terra
Hi!

Can you show an example of solution now vs. solution after change, what are
the benefits of such visibility change to your case? Maybe there is another
way to accomplish your goal?

**
Martin

ke 24. heinäk. 2019 klo 22.25 Thomas Heigl (tho...@umschalt.com) kirjoitti:

> Hi all,
>
> I'd like to create Wicket messages with child components programatically.
> Currently, this is only possible by using the  tag and
> nesting components inside of it.
>
> For most use cases this is sufficient, but I sometimes come across cases
> where I'd like to programatically define the message key instead of
> hard-coding it in the template.
>
> The class that does all the interpolation is currently
> private:
> org.apache.wicket.markup.resolver.WicketMessageResolver.MessageContainer
>
> Would it be possible to make this a public (top-level) class in Wicket 9?
> If I understand correctly, this would solve my requirement without any
> other code changes.
>
> Best regards,
>
> Thomas
>


Re: US: Wicket Dev hourly consulting fee

2018-11-07 Thread Martin Terra
$15

per hour

ke 7. marrask. 2018 klo 22.46 Paul Bors (p...@bors.ws) kirjoitti:

> Hey Wicketers,
>
> For those of you located in US, what's the fair market hourly consulting
> fee you charge in 2018 / 2019?
>


Re: Question about IChoiceRenderer

2018-10-30 Thread Martin Terra
I would definitely recommend leveraging the class hierarcy
of DropDownChoice/AbstractSingleSelectChoice in case you are using a single
select, and if it is multi select then respective ListMultipleChoice.

This way you can leverage the existing implementation of isSelected etc.

**
Martin

ti 30. lokak. 2018 klo 20.54 Claudia Hirt (hirt-clau...@gmx.de) kirjoitti:

> Thanks for the tip Martin Terra!
>
> And thank you for the example code Martin Grigorov! Good to know I'm on
> the right track.
>
> I still have one proplem left, I know it really is a minor thing. I
> developed a framework component for a group selectbox which takes a
> HashMap containing the optgroups and their corresponding
> options. Working with generic option objects I use a ChoiceRenderer to
> give the user the possiblity to map the id- and display-value from the
> object. This works fine so far, until you get to
> isSelected(IModel model)
> In AbstractChoice you can set an object as selected which does not have
> to be the same object as the one in the choices. It compares the objects
> id using the given choice renderer.
> But Select only does an object equals compare. And there's no way to use
> the choice renderer in isSelected correctly because there is no index in
> the method signature.
> As I said this is really a minor thing, but the inconsistency with
> AbstractChoice annoys me ;)
> How would you suggest to solve this?
>
> Best regards,
> Claudia Hirt
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: Question about IChoiceRenderer

2018-10-30 Thread Martin Terra
Also, if you need optrgoups and styling while needing to keep it simple,
you can implement IStyledChoiceRenderer

and
extend DropDownChoice with some subtle changes.

**
Martin

ti 30. lokak. 2018 klo 17.04 Martin Grigorov (mgrigo...@apache.org)
kirjoitti:

> Hi,
>
> DropDownChoice component should be used when you have a list of objects
> which you want to render in an HTML select element without fancy things
> like option grouping and styling.
> If you need to do grouping and/or styling then you need to use Select and
> add SelectOption for each of your objects.
> See
>
> https://github.com/apache/wicket/blob/master/wicket-examples/src/main/java/org/apache/wicket/examples/compref/SelectPage.java
> for an example.
> The grouping is only in the HTML in this example (
>
> https://github.com/apache/wicket/blob/master/wicket-examples/src/main/java/org/apache/wicket/examples/compref/SelectPage.html#L23
> )
> but you can use WebMarkupContainer on the optgroup elements to set its
> attributes dynamically.
>
> On Tue, Oct 30, 2018 at 4:49 PM Claudia Hirt  wrote:
>
> > Hi,
> > I use select to create a selectbox containing optgroups which is not
> > possible with abstractchoice as far as i know. And i want to also use
> > choice renderer for this “groupselectbox component” to have the same
> > behaviour as in abstract choice.
> > Maybe I’m wrong with the whole concept. What is your recommendation for
> > how to create a group selectbox?
> >
> > Best regards,
> > Claudia
> >
> > > Am 30.10.2018 um 12:02 schrieb Martin Grigorov :
> > >
> > > Hi Claudia,
> > >
> > > I do not quite understand your question/suggestion.
> > >
> > > IChoiceRenderer is used by AbstractChoice and its specializations.
> > > "T object" is your type, so you should decide how to construct a stable
> > id
> > > out of it. In case you cannot get such id then you may use the passed
> > > index, but in this case you have to make sure that the same index is
> > always
> > > used for this object instance (as the javadoc explains).
> > >
> > > Wicket-Extensions' Select doesn't use IChoiceRenderer at all, so I
> don't
> > > see what is the relation to the first part of your question.
> > >
> > >> On Fri, Oct 26, 2018 at 2:54 PM Claudia Hirt 
> > wrote:
> > >>
> > >> Hi all,
> > >>
> > >> i have a question about IChoiceRenderer used for Selectboxes.
> > >>
> > >> There is a method String getIdValue(Tobject, int index) to get the
> > unique
> > >> id value of an option object.
> > >> The javadoc says the following:
> > >>
> > >> "This method is called to get the id value of an object (used as the
> > value
> > >> attribute of a choice element) The id can be extracted from the object
> > like
> > >> a primary key, or if the list is stable you could just return a
> > toString of
> > >> the index."
> > >>
> > >> I wonder if it's a good idea to have the object and the index as
> > >> parameters in this method. If the id value should be kind of a primary
> > key
> > >> of the object, it should not depend on the index, which has nothing to
> > do
> > >> with the object.
> > >> I cannot use this method in my case to check if an object which is not
> > in
> > >> the choices list has the same id value than the selected one in my
> > >> selectbox. I tried to do this with wicket-extensions Select, which
> does
> > not
> > >> have a choice renderer by default and I only have the object in
> > >> isSelectedmethod of Select, but not the index.
> > >>
> > >> Best regards,
> > >> Claudia
> > >>
> >
> >
> > -
> > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> > For additional commands, e-mail: users-h...@wicket.apache.org
> >
> >
>


Re: HTML & CSS implementation

2018-10-06 Thread Martin Terra
Hi! Did you look at wicket examples?

https://wicket.apache.org/learn/examples/index.html
http://examples8x.wicket.apache.org/index.html

Should get you going quite fast.

**
Martin

su 7. lokak. 2018 klo 9.38 athag...@csd.auth.gr kirjoitti:

>
> Hello there community!
> So I have decided to use Apache Wicket for my bachelor's thesis! :)
> I'm very new here.
> I have written a Java program, whose input is two (2) Strings (two
> names). The ouptut is
> certain arraylists, not quite relevant here.
> So far I've managed to print the output in a blank internet page using
> localhost.
>
> I have created a fairly simple UI using HTML and CSS. Much like a
> login screen requires username and password, this menu requires
> String1 and String2.
> What I wish to do is the following:
> I want the values of the two Strings, that are manualy assigned in the
> Java code, to be the values entered in the
> two boxes of the UI, and when the "Run" button is pressed, the user is
> redirected to another page, where the output for the two Strings is
> printed.
>
> I would like some advice as to how this is implemented and where to look.
> If anyone is willing to provide more specific info, I can of course
> provide you with the code (only the few bits mentioned above are of
> any importance, no need to waste your time by having you look into it
> in detail.)
>
> I would greatly appericiate any help I can get!!
> Thanks in advance everyone! And thank you community for being
> extremely helpful in the past!
>
> Cheers,
> George
>
>
>
>
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: How to add Jetty server classes to Eclipse project?

2018-10-04 Thread Martin Terra
Typically something like


org.eclipse.jetty
jetty-webapp
${jetty.version}


**
Martin

to 4. lokak. 2018 klo 9.49 Rolf Schumacher (r...@august.de) kirjoitti:

> I was trying to start learning about Apache Wicket (as it looked like an
> easy to use UI for Java) and because I like to work with Eclipse and
> Maven. I also like to work with Tomcat, however, Wicket seems to prefer
> Jetty at least in its tutorials. I do not know nothing about Jetty,
> however should not take ages to learn.
>
> I tried the Wicket Quick Start
>  and successfully
> imported the generated Maven project to Eclipse workspace.
>
> But errors appear: e.g.
>
> import org.eclipse.jetty.server.HttpConfiguration;
>
> *It seems Eclipse cannot find the jetty server classes. How to add these
> to the Eclipse project?*
>
> Does the creater of the Wicket Quick Start assumed that Jetty is already
> installed on the machine?
> /I installed it. However: what is the recommended way to make what jar
> file available to a maven project to have jetty server classes
> available? I would assume via the pom.xml but I doubt that is the case
> here - the given pom.xml would contain it./
>
> Or is there some special plugin for Eclipse (Photon)?
> /Run-Jetty-Run?. I wasn't brave enough to try that./
>
> I would love to get the Wicket Quick Start running.
>
> I also tried Eclipse + Tomcat + Apache Wicket Maven Setup with Hello
> World Example
> <
> http://digitalappconsultancy.com/site/eclipse-tomcat-apache-wicket-maven-setup-with-hello-world-example/>
>
> but it seems that it is outdated. I was not able to install qwickie to
> Eclipse as described.
>
> I am using Eclipse Proton with Java 10.0.2 on Debian Stretch.
>
> Any help appreciated
>
> Rolf
>
>