Re: CryptoMapper clears feedback messages

2015-01-20 Thread guy . wuyts

Hi,

ticket https://issues.apache.org/jira/browse/WICKET-5814 created.

regards,
Guy

On 2015-01-20 09:57, Martin Grigorov wrote:

Hi,

Please create a ticket and attach the quickstart there.
It may get lost here ...
Thanks!

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

On Thu, Jan 15, 2015 at 1:05 PM, guy.wu...@sensirius.com wrote:


Hi,

please find attached a quickstart project.

regards,
Guy


On 2015-01-15 10:39, guy.wu...@sensirius.com wrote:


Hi,

Wicket 6.18 seems to break the behaviour when using a CryptoMapper:
the feedback messages are cleared for pages that don't use the
CryptoMapper.

This was added to WicketApplication.init():

  mountPage(page1, Page1.class);
  setRootRequestMapper(new CryptoMapper(getRootRequestMapper(), 
this));

  mountPage(page2,Page2.class);

Both pages contain a form and a FeedbackPanel.
With Wicket 6.17 there are no problems. When using Wicket 6.18, no
feedback messages are displayed on Page2.

Regards,
Guy


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




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



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



Re: CryptoMapper clears feedback messages

2015-01-20 Thread Martin Grigorov
Hi,

Please create a ticket and attach the quickstart there.
It may get lost here ...
Thanks!

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

On Thu, Jan 15, 2015 at 1:05 PM, guy.wu...@sensirius.com wrote:

 Hi,

 please find attached a quickstart project.

 regards,
 Guy


 On 2015-01-15 10:39, guy.wu...@sensirius.com wrote:

 Hi,

 Wicket 6.18 seems to break the behaviour when using a CryptoMapper:
 the feedback messages are cleared for pages that don't use the
 CryptoMapper.

 This was added to WicketApplication.init():

   mountPage(page1, Page1.class);
   setRootRequestMapper(new CryptoMapper(getRootRequestMapper(), this));
   mountPage(page2,Page2.class);

 Both pages contain a form and a FeedbackPanel.
 With Wicket 6.17 there are no problems. When using Wicket 6.18, no
 feedback messages are displayed on Page2.

 Regards,
 Guy


 -
 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: replacing panels using replaceWith in wicket

2015-01-20 Thread K
Hi i have been strugguling with this for a while. could you please suggest
changes.

   

Scenario: when i search for a job, if a job exists job is displayed in this
panel and if the job does not exist it is redirected back to the search
panel. i am unable to redirect back to the search panel.


-
K
--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/replacing-panels-using-replaceWith-in-wicket-tp4669020p4669056.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Use application.setName to set a custom name?

2015-01-20 Thread Martin Grigorov
Hi,

This is by design (
https://github.com/apache/wicket/blob/master/wicket-core/src/main/java/org/apache/wicket/Application.java#L944-L945
).
The application name is used for internal caches, keys, etc. and it must be
something stable and unique.
If it was allowed to change it at any time then many things may break.

I think the easiest thing to do is to export yet another JMX ObjectName
with the custom name. See
https://github.com/apache/wicket/blob/master/wicket-jmx/src/main/java/org/apache/wicket/jmx/Initializer.java#L109


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

On Tue, Jan 20, 2015 at 8:05 PM, Thorsten Schöning tschoen...@am-soft.de
wrote:

 Hi all,

 I have an application which gets deployed into different web app
 contexts of a Tomcat simply be naming the folder of the context
 differently. So application is hosted as application1,
 application2 etc. simply by copying the generic folder of
 application into a new target and do some minor configuration
 changes. The point is, that web.xml keeps the same for all
 installations within one Tomcat.

 Today I had a look at using JMX with Wicket and recognized, that the
 name of the application by default is set to the name the Wicket
 filter gets in web.xml. Because that's generic in my case I'm unable
 to distinguish what the JMX console shows me, it's always called the
 same and I can't see to which application it belongs.

 Two options now: Either one has to change web.xml for each folder or
 provide some logic to set the application name on runtime, e.g.
 depending on the folder name.

 I would prefer the latter and tested a bit around Application.setName,
 but this doesn't seem to work, because setName can only be called
 once and WicketFilter currently always calls it. So regardless if
 someone wants to call it earlier or afterwards, it will always result
 in an error.

 Is that expected behavior, should no application be able to provide
 another name at all? Or is there any other way to set the name on my
 own without WicketFilter trying to do the same?

 The relevant code in WicketFilter is the following:

  public void init(final boolean isServlet, final FilterConfig
 filterConfig)
 [...]
 // locate application instance unless it was
 already specified during construction
 if (application == null)
 {
 applicationFactory =
 getApplicationFactory();
 application =
 applicationFactory.createApplication(this);
 }
 
 application.setName(filterConfig.getFilterName());
 application.setWicketFilter(this);

 This looks to me as if setName is effectively useless for anyone
 except WicketFilter, because it's always called there.

 Thanks for your help!

 Mit freundlichen Grüßen,

 Thorsten Schöning

 --
 Thorsten Schöning   E-Mail: thorsten.schoen...@am-soft.de
 AM-SoFT IT-Systeme  http://www.AM-SoFT.de/

 Telefon...05151-  9468- 55
 Fax...05151-  9468- 88
 Mobil..0178-8 9468- 04

 AM-SoFT GmbH IT-Systeme, Brandenburger Str. 7c, 31789 Hameln
 AG Hannover HRB 207 694 - Geschäftsführer: Andreas Muchow


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




Use application.setName to set a custom name?

2015-01-20 Thread Thorsten Schöning
Hi all,

I have an application which gets deployed into different web app
contexts of a Tomcat simply be naming the folder of the context
differently. So application is hosted as application1,
application2 etc. simply by copying the generic folder of
application into a new target and do some minor configuration
changes. The point is, that web.xml keeps the same for all
installations within one Tomcat.

Today I had a look at using JMX with Wicket and recognized, that the
name of the application by default is set to the name the Wicket
filter gets in web.xml. Because that's generic in my case I'm unable
to distinguish what the JMX console shows me, it's always called the
same and I can't see to which application it belongs.

Two options now: Either one has to change web.xml for each folder or
provide some logic to set the application name on runtime, e.g.
depending on the folder name.

I would prefer the latter and tested a bit around Application.setName,
but this doesn't seem to work, because setName can only be called
once and WicketFilter currently always calls it. So regardless if
someone wants to call it earlier or afterwards, it will always result
in an error.

Is that expected behavior, should no application be able to provide
another name at all? Or is there any other way to set the name on my
own without WicketFilter trying to do the same?

The relevant code in WicketFilter is the following:

 public void init(final boolean isServlet, final FilterConfig filterConfig)
[...]
// locate application instance unless it was already 
 specified during construction
if (application == null)
{
applicationFactory = getApplicationFactory();
application = 
 applicationFactory.createApplication(this);
}

application.setName(filterConfig.getFilterName());
application.setWicketFilter(this);

This looks to me as if setName is effectively useless for anyone
except WicketFilter, because it's always called there.

Thanks for your help!

Mit freundlichen Grüßen,

Thorsten Schöning

-- 
Thorsten Schöning   E-Mail: thorsten.schoen...@am-soft.de
AM-SoFT IT-Systeme  http://www.AM-SoFT.de/

Telefon...05151-  9468- 55
Fax...05151-  9468- 88
Mobil..0178-8 9468- 04

AM-SoFT GmbH IT-Systeme, Brandenburger Str. 7c, 31789 Hameln
AG Hannover HRB 207 694 - Geschäftsführer: Andreas Muchow


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



Work flow for html design

2015-01-20 Thread Km
Hi there, I am a solo developer also doing the design for my project. I have a 
skeleton project in place and now I want to work on that HTML files in the 
designer role. I have a set of style sheets and the HTML files are in the Java 
source directory, so I cannot access the html page through that path ( since it 
does not contain the style sheet). I thought about adjusting the plain HTML 
header to have a link to a different style sheet while having the wicket 
generated HTML reference to the production/development style sheet as served by 
the Web app. This doesn't solve the problem of images of course but these can 
be referenced in the style sheet also.  If it matters I am using foundation, 
sass and compass.

-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.