Iframe problem with jQuery 1.10.1 in IE

2013-11-13 Thread Heikki Uotinen
Hi,

if iframe content (Wicket page) is loaded from external domain loading of 
jQuery 1.10.1 (and Wicket) fails due to a bug

 http://bugs.jquery.com/ticket/13980

This has been fixed in jQuery 1.10.2 that we are now using by setting 
JQueryReference and it seems to work fine,

-Heikki




Re: Is it possible to change MarkupStream ?

2013-06-26 Thread heikki
No,

I used Firefox 21.0, with the app running in Tomcat 6.

Any ideas, anyone ?
thanks
Heikki Doeleman



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Is-it-possible-to-change-MarkupStream-tp4659757p4659832.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: Is it possible to change MarkupStream ?

2013-06-25 Thread heikki
hi,

the stacktrace is here: http://pastebin.com/Kgba3zxF.

I noticed I did not supply the code of getStringFromInputStream() -- I took
it from
http://www.mkyong.com/java/how-to-convert-inputstream-to-string-in-java/ and
it is

protected static String getStringFromInputStream(InputStream is) {
BufferedReader br = null;
StringBuilder sb = new StringBuilder();
String line;
try {
br = new BufferedReader(new InputStreamReader(is));
while ((line = br.readLine()) != null) {
sb.append(line);
}
}
catch (IOException e) {
e.printStackTrace();
}
finally {
if (br != null) {
try {
br.close();
}
catch (IOException e) {
e.printStackTrace();
}
}
}
return sb.toString();
}

Can you see why I get java.io.IOException: Stream Closed ?

thanks,
Heikki Doeleman



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Is-it-possible-to-change-MarkupStream-tp4659757p4659769.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



Is it possible to change MarkupStream ?

2013-06-24 Thread heikki
hello,

I'm using Wicket 1.5.9. I'm trying to do some string manipulation in a
MarkupStream, like this:

@Override
public IMarkupFragment getMarkup() {
IMarkupFragment fragment = super.getMarkup();
return manipulate(fragment);
}

protected IMarkupFragment manipulate(IMarkupFragment fragment) throws
Exception {
MarkupResourceStream markupStream =
fragment.getMarkupResourceStream();
InputStream is = markupStream.getInputStream();
String x = getStringFromInputStream(is);
//
// do some string manipulation here on string x
//
return createMarkupFragmentFromString(x);
}

protected IMarkupFragment createMarkupFragmentFromString(String s) {
IResourceStream resourceStream = new StringResourceStream(s);
MarkupResourceStream markupStream = new
MarkupResourceStream(resourceStream);
IMarkupFragment fragment = new Markup(markupStream);
return fragment;
}

Unit tests for those last two methods work fine; but when I run it in a
Wicket application, I get a

IOException: stream already closed.

Does anyone have an idea what is going wrong, and how could I achieve this?

Kind regards
Heikki Doeleman



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Is-it-possible-to-change-MarkupStream-tp4659757.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: Unit testing a repeater or data table by mocking its data

2013-06-11 Thread heikki
dear Paul,

I've recently used Mockito and am quite happy with it. You can easily mock
any class and make it behave as you need.

Best regards
Heikki Doeleman


On Tue, Jun 11, 2013 at 5:08 PM, Paul Bors p...@bors.ws wrote:

 Up to recently we got away with running our unit tests fully integrated
 with
 the back end db by performing live queries via our DAOs.

 Due to recent changes to our product schema we run into the inevitable high
 cost of having to spend too much time on maintain our mocked unit test data
 straight into the db. To cut down on that cost I would like to start
 mocking
 most of our DAOs that back-up the data tables in our product (gradually
 over
 time).



 Which brings me to my question, what's the recommended approach from
 Wicket's team (or users) on mocking the DAOs that are used by the data
 providers of your data tables?



 Our advantage is that we are using Spring and thus we could rely on
 spring-test, its ReflectionTestUtils but I also took a look at Mockito,
 EasyMock and such.

 I'm more curious as to what has been your experience in the past and what
 would you consider to be the best approach?



 ~ Thank you,

 Paul Bors








AjaxEditableMultiLineLabel inside Link

2013-06-10 Thread heikki
hello,

I have a Link, used in a menu to go to a different page. When a content
editor is logged in, the link's text is rendered by an
AjaxEditableMultiLineLabel.

In that case, when you click on the link, the AjaxEditableMultiLineLabel
opens an input textarea with the current value selected. Updating it works
fine as long as the user doesn't click in it, because then the surrounding
link takes you to another page.

I would like to disable the link on onEdit() and re-enable it onSubmit(). I
tried using link.setEnabled(true/false) for it, but that has the effect that
the AjaxEditableMultiLineLabel no longer works, I guess because it is a
child component of the link and also gets disabled.


Do you have any tips ?

Kind regards
Heikki Doeleman



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/AjaxEditableMultiLineLabel-inside-Link-tp4659348.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



AbstractDefaultAjaxBehavior complete handler

2013-06-04 Thread heikki
hello,

a simple question: I'd like that a certain javascript function is invoked,
after a Wicket Ajax call completes. I'm using Wicket 6.5.

I tried this:

// behaviour works fine except for the onComplete js that I'd like to
execute
public class MyAjaxBehavior extends AbstractDefaultAjaxBehavior {

// this doesn't do anything 
@Override
protected void updateAjaxAttributes(AjaxRequestAttributes attributes) {
super.updateAjaxAttributes(attributes);

IAjaxCallListener listener = new AjaxCallListener() {
@Override
public CharSequence getCompleteHandler(Component component) {
return alert('onComplete');;
}
};
attributes.getAjaxCallListeners().add(listener);
}

@Override
protected void respond(AjaxRequestTarget target){ ... }
}



Another thing I tried, but with the same result (no js executed on
complete), is client-side:

Wicket.Ajax.get({u:myListenerUrl + params, coh: myfunction });

(where myfunction is an existing js function).


Do you see what I'm doing wrong ?

Kind regards
Heikki Doeleman



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/AbstractDefaultAjaxBehavior-complete-handler-tp4659230.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: AbstractDefaultAjaxBehavior complete handler

2013-06-04 Thread heikki
Thanks for your replies.

Could it be that it has something to do with Wicket version ? Wicket
Examples seems to run on Wicket 1.5.10 ?

I also tried the suggested success handler, by adding this to my behavior

@Override
public CharSequence getSuccessHandler(Component component) {
return alert('success handler');;
}

but no luck, still no js executed..


And what about the coh parameter I tried in my Wicket.Ajax.get call ? Is
that supposed to have the same effect as overriding getCompleteHandler() ?
Any idea why it doesn't do anything, did I make some mistake ?



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/AbstractDefaultAjaxBehavior-complete-handler-tp4659230p4659233.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: AbstractDefaultAjaxBehavior complete handler

2013-06-04 Thread heikki
thanks. I checked of course that there are no JS errors. I also checked if
any of overridden onComplete(), getCompleteHandler(), and
getSuccessHandler() are executed, and they are not.

So I'm still a bit puzzled here. My behavior's respond() method works fine
and does not throw exceptions or anything.

Does anyone know if the coh param in Wicket.Ajax.get() should be able to
do the same trick ? (although it also doesn't work for me, it'd be good to
know).


Adding target.appendJavascript() in my respond() method works, though.



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/AbstractDefaultAjaxBehavior-complete-handler-tp4659230p4659236.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: Re:aj Component twice in markup while ax refresh in Wicket 6.7 (migrated from 1.5.10)

2013-05-28 Thread Heikki Uotinen
Hi,

we had similar issue and could not find jira ticket for this, thus created 
WICKET-5210 with quickstart.

Our workaround was changing our jQuery('#someid').. to jQuery('[id=someid]').. 
to match all same (two) ids.

Rgds,
Heikki

-Original Message-
From: Nico [mailto:nico.kan...@gmx.de] 
Sent: 15. toukokuuta 2013 11:07
To: users@wicket.apache.org
Subject: Re:aj Component twice in markup while ax refresh in Wicket 6.7 
(migrated from 1.5.10)

Hi,

thanks for you quick replies! I will create the quick start and attach it to a 
jira ticket.

Thanks to your hint Martin, for the moment I will use jQuery#replaceWith() to 
make sure my app runs as expected.

Best
Nico


Am 14.05.2013 um 16:56 schrieb Martin Grigorov-4 [via Apache Wicket]:

 Hi,
 
 We use
 https://github.com/apache/wicket/blob/master/wicket-core/src/main/java
 /org/apache/wicket/ajax/res/js/wicket-ajax-jquery.js#L1617
 because
 it is faster than jQuery#replaceWith(). 
 So yes, there is a small period when both the old and the new are in 
 the DOM.
 As Sven asked - please create a quicktart and attach it to a ticket so 
 we can see whether we will find a solution or we will have to use the 
 slower way to replace.
 
 
 On Tue, May 14, 2013 at 4:48 PM, Sven Meier [hidden email] wrote: 
 
  Create a quickstart and attach it to a Jira issue please. 
  
  Sven
  
  
  On 05/14/2013 04:37 PM, Nico wrote: 
  
  Hi
  
  I migrated my application from Wicket 1.5.10 to 6.7
  
  During testing I recognized that during an ajax update 
  (replacement) of a component, the markup of the component is twice 
  in the HTML markup (the old and the new markup). Thus the execution 
  of javascript inside a component may fail due to the fact, that two 
  components with the same id are present in the HTML markup.
  
  EXAMPLE
  
  
  *HTML:*
  lt;a wicket:id=quot;testlinkquot;**gt;testlinklt;/agt;
  lt;div wicket:id=quot;testboxquot; style=quot;width: 100px; height: 
  100px; border: 1px solid #ccc;quot;gt; 
  lt;script type=quot;text/javascript**quot;gt; 
  alert(#39;hello#39;); 
  lt;/scriptgt;
  lt;/divgt;
  
  *JAVA:*
  final WebMarkupContainer testbox = new 
  WebMarkupContainer(testbox); testbox.setOutputMarkupId(**true);
  add(testbox);
  
  add(new AjaxLinkVoid(testlink) { 
  private static final long serialVersionUID = 1L;
  
  @Override 
  public void onClick(AjaxRequestTarget target) { 
  target.add(testbox); 
  }
  });
  
  
  So while the ajax update is processed the 'testbox' DIV and its 
  javascript are present twice (the old and new DIV). If the 
  javascript is a little more complex and for example changes stuff 
  inside the DIV, the javascript will change stuff in the old instead 
  of the new DIV container.
  
  My javascript relies on the fact, that an id should always be 
  present just once.
  
  Why is the old DIV not removed first, before the new DIV is 
  appended? Can I change this behavior somehow?
  
  Thanks in advance
  Nico
  
  
  
  --
  View this message in context: http://apache-wicket.1842946.**
  n4.nabble.com/Component-twice-**in-markup-while-ajax-refresh-**
  in-Wicket-6-7-migrated-from-1-**5-10-tp4658789.htmlhttp://apache-w
  icket.1842946.n4.nabble.com/Component-twice-in-markup-while-ajax-re
  fresh-in-Wicket-6-7-migrated-from-1-5-10-tp4658789.html
  Sent from the Users forum mailing list archive at Nabble.com. 
  
  --**--**---
  -- To unsubscribe, e-mail: 
  users-unsubscribe@wicket.**apache.org[hidden email] For 
  additional commands, e-mail: [hidden email]
  
  
  
  --**--**
  - To unsubscribe, e-mail: 
  users-unsubscribe@wicket.**apache.org[hidden email] For additional 
  commands, e-mail: [hidden email]
  
 
 
 
 --
 Martin Grigorov
 Wicket Training  Consulting
 http://jWeekend.com http://jweekend.com/
 
 
 If you reply to this email, your message will be added to the discussion 
 below:
 http://apache-wicket.1842946.n4.nabble.com/Component-twice-in-markup-w
 hile-ajax-refresh-in-Wicket-6-7-migrated-from-1-5-10-tp4658789p4658791
 .html To unsubscribe from Component twice in markup while ajax refresh 
 in Wicket 6.7 (migrated from 1.5.10), click here.
 NAML





--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Component-twice-in-markup-while-ajax-refresh-in-Wicket-6-7-migrated-from-1-5-10-tp4658789p4658813.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


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



JQuery contribution question

2013-05-23 Thread heikki
hello list,

the way things work with Wicket-provided contributions confuses me a bit.
I'm using Wicket 6.5.

What I'd like to achieve is: a single jQuery library available in my page. 

Whether or not my page includes jQuery-contributing Wicket components like
the Ajax components: I need jQuery for non-Wicket-related clientside stuff
too.

Ideally a jQuery version of my choice, not contributed by Wicket but a
simple local or remote link, although if it's more easy to simply always
contribute jQuery through Wicket that would be fine too. 

Any suggestions ?

Kind regards,
Heikki Doeleman



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/JQuery-contribution-question-tp4658999.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



Wicket returning XML or JSON ?

2013-04-25 Thread heikki
hello list,

has anyone implemented a WebServicePage using Wicket 6+, by which I mean
that the Page has no associated markup and returns an XML or JSON document ?

I've seen wicket-rest, but it doesn't seem that works with current versions
of Wicket, the latest info about getting that to work that I found is for
Wicket 1.5
(http://stackoverflow.com/questions/12138115/wicket-rest-does-not-work-with-wicket-1-5).

thanks in advance,
kind regards
Heikki Doeleman



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-returning-XML-or-JSON-tp4658271.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: Wicket returning XML or JSON ?

2013-04-25 Thread heikki
thanks,

that example does indeed work fine, but I'd rather have *no* markup file,
just generate the XML or JSON myself and send that back in the response.

So I need a mounted IResource to do that ? Any tip how to go about it for
this use case, e.g. use a ByteArrayResource ?




--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-returning-XML-or-JSON-tp4658271p4658273.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



How to force user to select from AutoComplete choices

2013-04-16 Thread heikki
hello,

I've an autocomplete textfield (this one:
com.googlecode.wicket.jquery.ui.form.autocomplete.AutoCompleteTextField) and
I'd like to restrict users to select one of the values presented in its
choices. 

As it is, you can also input values that are not in the choices.

Is there an easy way to do this ?

Kind regards
Heikki Doeleman



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/How-to-force-user-to-select-from-AutoComplete-choices-tp4658033.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: How to force user to select from AutoComplete choices

2013-04-16 Thread heikki
thanks for your replies,

@Igor : trying it, however when loading the page I get: TypeError:
$(...).select2 is not a function. Can you give some instruction as how to
wire things together? From the wicket-select2-examples, it is not obvious to
me where any JS gets included.

@Sebastien: sure, a validator can refuse input (doesn't even need to be a
String I guess?), but that is also too late (after you already put in a free
text value and submitted). I'm looking for a way to prevent unwanted input
client-side; the validator will be there as last resort server-side.



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/How-to-force-user-to-select-from-AutoComplete-choices-tp4658033p4658041.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: How to force user to select from AutoComplete choices

2013-04-16 Thread heikki
hi,

the js loading issue was apparently due to having both my own and a
select2-contributed jquery library in the same page. Solved.

This select2 solution does exactly what I was looking for, thanks !



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/How-to-force-user-to-select-from-AutoComplete-choices-tp4658033p4658049.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: AbstractDefaultAjaxBehavior response handling

2013-04-05 Thread heikki
hi Sven, 

thanks ! I see now how it works.

The basic thing is that AbstractDefaultAjaxBehavior does not write anything
to responses, you have to subclass it and write to the response according to
your needs, in this subclass.

kind regards
Heikki Doeleman



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/AbstractDefaultAjaxBehavior-response-handling-tp4657714p4657790.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



AbstractDefaultAjaxBehavior response handling

2013-04-03 Thread heikki
hello,

I've a question about using AbstractDefaultAjaxBehavior. I can succesfully
create some dynamic script that calls Wicket.Ajax.get(), and its respond()
is correctly invoked. However I'm not sure what's with the results of the
ajax call, I can't get to it. It seems that I receive an empty response.

My page has a list with a number of spans that have some number for their
text; I'm trying to add an onclick to the spans that invokes the Ajax call,
passing the number of the clicked span into the Ajax URL. (This works fine.)
The Ajax response should be a (a JSON version of) the input parameterm but
it is always ajax-response/ajax-response. 


My page has a ListView with a number of labels, like this

div id=myContainer wicket:id=myContainer
div class=myUser wicket:id=myList

/div
div id=aResult wicket:id=aResult /div
/div

and this JS



Then, my Page class has:

public TestPage(final PageParameters parameters) {
super(parameters);
// create some numbers to display in the list
IModel myListModel =  new LoadableDetachableModel() {
protected Object load() {
ListInteger nrs = new ArrayListInteger();
nrs.add(100);nrs.add(200);nrs.add(300);
return nrs;
}
};
ListView myView = new ListView(myList, myListModel) {
protected void populateItem(ListItem item) {
final Integer i = (Integer) item.getModelObject();
item.add(new Label(myLabel, i));
}
};
WebMarkupContainer myContainer = new
WebMarkupContainer(myContainer);
myContainer.setOutputMarkupId(true);
myContainer.add(myView);

// I expect the Ajax result to go here
myContainer.add(new Label(aResult, TEXT BEFORE AJAX));

div.add(behave());
add(div);
}
// this reference is so I can put the URL in a js var, in
renderHead() below 
private AbstractDefaultAjaxBehavior bh ;
private AbstractDefaultAjaxBehavior behave() {
if(bh == null) {
bh = new AbstractDefaultAjaxBehavior() {
protected void respond(AjaxRequestTarget target) {
String id =
getRequest().getRequestParameters().getParameterValue(myId).toString();
Gson gson = new Gson();
String json = gson.toJson(id);
System.out.println(json:\n + json);

Label label = new Label(aResult,json);
label.setOutputMarkupId(true);
// throws NPE
//getParent().replace(label);
target.add(label);
}
protected void
updateAjaxAttributes(AjaxRequestAttributes attributes) {
super.updateAjaxAttributes(attributes);
// doesn't seem to make a difference for me
//attributes.setDataType(json);
}
};
}
return bh;
}

public void renderHead(IHeaderResponse response){
bh = behave();
String url = var aUrl=' + bh.getCallbackUrl() + ';;
response.render(JavaScriptHeaderItem.forScript(url,
wicket-ajax-aUrl));
}

What I expected is that the div 'aResult' text would get replaced with the
contents of the Ajax call. It doesn't happen. And as I said the Ajax
response is empty (when viewed in Firebug).

Does anyone see what I'm missing here ?

thanks and kind regards
Heikki Doeleman






--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/AbstractDefaultAjaxBehavior-response-handling-tp4657714.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: AbstractDefaultAjaxBehavior response handling

2013-04-03 Thread heikki
thanks for your response, but I'm not quite sure what you mean.

How so is my response a non-Ajax response ? 

I'd have thought that when doing an Ajax request, I'd get an Ajax response;
and the way to set up that response, from what it says on
https://cwiki.apache.org/WICKET/calling-wicket-from-javascript.html, is to
stick it in some page element in the behavior's respond() method. 

(that does seem a bit strange indeed, I would have expected more there
existed a method like request(Request, Response) where I could add stuff to
a response object. I guess this is exactly what I'm not getting about
AbstractDefaultAjaxBehavior).



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/AbstractDefaultAjaxBehavior-response-handling-tp4657714p4657717.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: AbstractDefaultAjaxBehavior response handling

2013-04-03 Thread heikki
Eventually I'd probably do something with it other than only displaying it
:-)

So maybe my approach is not ideal ? In short, and more generally put, I want
to be able to construct a URL client-side dynamically to do an Ajax request
using Wicket.Ajax.get(), and then do something with the response. 



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/AbstractDefaultAjaxBehavior-response-handling-tp4657714p4657723.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



Repeaters and AjaxSelfUpdatingTimerBehavior

2013-03-22 Thread heikki
hello,

I've a question about using AjaxSelfUpdatingTimerBehavior and a
RepeatingView (or ListView).

I have a repeater, with AjaxSelfUpdatingTimerBehavior set on its parent, so
that it can update the list in the page with the latest list items that were
added (or removed) on the server side. This works just fine, as such.

However, instead of repainting the whole repeater with all its items, I
would like to only add newly added items. Sure I've seen
http://wicketinaction.com/2008/10/repainting-only-newly-created-repeater-items-via-ajax/
where it is achieved by scripting, and using target.prependJavascript(). But
that's in the context of an AjaxButton that has an
onSubmit(AjaxRequestTarget target, Form ?  f) method -- so you actually
have a reference to the target to put your scripting to.

But in the case of using AjaxSelfUpdatingTimerBehavior, I have no clue how
to go about this. Is there some callback method in this case, similar to
AjaxButton.onSubmit(), that gives a reference to the target? 

Hopefully I made my question clear, and it's obvious and I just missed
something..

All help greatly appreciated,
kind regards
Heikki Doeleman




--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Repeaters-and-AjaxSelfUpdatingTimerBehavior-tp4657456.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



How to prevent form input appended as URL parameters ?

2013-01-28 Thread heikki
hello,

I have a form on my page, which when submitted goes the next page, but all
the form's fields appear as URL parameters in the resulting page. I'm using
Wicket 6.5.0.

My code is like

StatelessForm? form = new StatelessFormVoid(myForm) {
   protected void onSubmit() {
  final String txtValue = txt.getModelObject();
  PageParameters pageParameters = new PageParameters();
  pageParameters.add(txt, txtValue);
  setResponsePage(NextPage.class, pageParameters);
}

In the markup the form is declared like

form wicket:id=myForm method=post
 input wicket:id=txt type=text size=20 /
input type=submit value=submit /
/form

After submitting the result is the next page, but with a URL like
mywebapp/mountedpagepath?txt=userprovided. I don't want to have the posted
form fields appended to the URL. How can I do that ?

Kind regards
Heikki Doeleman



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/How-to-prevent-form-input-appended-as-URL-parameters-tp4655843.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: How to prevent form input appended as URL parameters ?

2013-01-28 Thread heikki
Checking with Firebug, when I click the submit button it appears to do a POST
followed by a GET:

POST
http://localhost:8080/webappname/mountedpagepath;jsessionid=0F040B88573ADE2932D8D41DF3845DA1?0-1.IFormSubmitListener-myFormtxt=userprovided

GET http://localhost:8080/webappname/mountednextpagepath?2txt=userprovided

Any ideas ?

thanks
Heikki Doeleman



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/How-to-prevent-form-input-appended-as-URL-parameters-tp4655843p4655847.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: How to prevent form input appended as URL parameters ?

2013-01-28 Thread heikki
yes, they are: txt=userprovided.



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/How-to-prevent-form-input-appended-as-URL-parameters-tp4655843p4655850.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



How to prevent duplicates when using HeaderContributor

2012-05-03 Thread heikki
hello,

I'd like to be able to use a fixed title for my pages, that gets overridden
for some of the pages.

To do that, I have a fixed title element in my base HTML page:


Then in the pages that should have a different title, I override
renderHead() like this:

@Override
public void renderHead(final IHeaderResponse response) {
String title = title + getTheDynamicTitle() + /title;
response.renderString(title);
   }

The result is that my rendered page has 2 title elements in its header,
the fixed one and the dynamic one.

I would have thought that Wicket would be smart enough to replace an
existing header element; the IHeaderResponse javadoc says Implementation of
this interface is responsible for filtering duplicate contributions (so that
for example the same javascript is not loaded twice) during the same
request. Well. 

Do I need to write my own implementation of IHeaderResponse for this ? 

It would seem like a pretty common use case to me, did anyone already solve
it ?

Kind regards
Heikki Doeleman

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/How-to-prevent-duplicates-when-using-HeaderContributor-tp4605975.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: How to prevent duplicates when using HeaderContributor

2012-05-03 Thread heikki
OK, that's a good solution, thanks !

Just in case that quickstart becomes unavailable, for reference I'll
summarize the method here:

the base HTML page has 



The corresponding base Java class has



and any pages with an overridden title, override getTitle() 




Kind regards
Heikki Doeleman

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/How-to-prevent-duplicates-when-using-HeaderContributor-tp4605975p4606959.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



How to prevent linebreaks after radio input ?

2012-04-18 Thread heikki
hello,

Wicket inserts br / after radio input elements generated by RadioChoice.

How can I prevent that ?

My code:

RadioChoiceString optionsRadioChoice = new RadioChoiceString(option,
new PropertyModelString(this, option), optionsList);
add(optionsRadioChoice );



This generates this HTML:


input name=option type=radio checked=checked value=0
id=options-0/
label for=options-0some value/labelbr /

input name=option type=radio value=1 id=options-1/
label for=options-1another value/labelbr /

Obviously I want to control my HTML layout and I don't want automatically
generated br / elements. How can I do that ?

thanks in advance
Heikki Doeleman


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/How-to-prevent-linebreaks-after-radio-input-tp4568121p4568121.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: IE9 Memory leak when updating component with Ajax (Wicket 1.5.5)

2012-04-18 Thread Heikki Uotinen
As expected KB2675157 fixed this IE9 issue, nice timing though.

-Original Message-
From: Heikki Uotinen [mailto:heikki.uoti...@syncrontech.com] 
Sent: 12. huhtikuuta 2012 10:18
To: users@wicket.apache.org
Subject: RE: IE9 Memory leak when updating component with Ajax (Wicket 1.5.5)

Ok, it seems that time takes care of this problem and leak is not wicket-ajax 
problem:

Tests with IE 10 (consumer preview) shows no leaking, gc seems to work and 
browser refresh clears the memory. There were no leaking with Opera, Firefox 
and Chrome. 

Furthermore previous JS debugging did not show that anything was piling in dom, 
so it must be IE9 inner problem.

Only leaking is this IE9 in IE9 document mode, can't see any point filing a 
ticket.

Anyway quickstart is available at 
http://uploading.com/files/51fc2bcb/ie9memory.zip/

Easy way to check Process Explorer - select iexplore.exe- Properties..- 
Performance Graph - Private bytes


-Original Message-
From: Heikki Uotinen [mailto:heikki.uoti...@syncrontech.com] 
Sent: 11. huhtikuuta 2012 14:38
To: users@wicket.apache.org
Subject: RE: IE9 Memory leak when updating component with Ajax (Wicket 1.5.5)

Hi,

1) Process Explorer and IE developer tools

2) ok

-Original Message-
From: Martin Grigorov [mailto:mgrigo...@apache.org] 
Sent: 11. huhtikuuta 2012 14:14
To: users@wicket.apache.org
Subject: Re: IE9 Memory leak when updating component with Ajax (Wicket 1.5.5)

Hi,

From your mails I still don't understand how exactly you measure the memory 
consumption.
You have two options:
1) google for javascript memory leak. You can add Internet explorer in the 
search term too I'm not sure whether IE has tools to deal with that but you can 
use  
and see whether it helps somehow

2) create a ticket in Wicket Jira with a quickstart and detailed description 
how to reproduce and how to measure and let someone else to debug it for you.

On Wed, Apr 11, 2012 at 1:50 PM, Heikki Uotinen 
heikki.uoti...@syncrontech.com wrote:
 Hi,

 I tested against apache-wicket-6.0.0-beta1 with that simple example in the 
 first mail.

 Application still leaked memory on IE9 document mode, same behavior as with 
 1.5.5.

 Confirmed that it is using jQuery:

 script type=text/javascript 
 src=../resource/org.apache.wicket.resource.JQueryResourceReference/jq
 uery/jquery-ver-1334139767559.js/script

 script type=text/javascript 
 src=../resource/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/re
 s/js/wicket-event-jquery-ver-1334139767559.js/script

 script type=text/javascript 
 src=../resource/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/re
 s/js/wicket-ajax-jquery-ver-1334139767559.js/script

 Suggestions ?


 -Original Message-
 From: Chris Colman [mailto:chr...@stepaheadsoftware.com]
 Sent: 11. huhtikuuta 2012 11:47
 To: users@wicket.apache.org
 Subject: RE: IE9 Memory leak when updating component with Ajax (Wicket 
 1.5.5)

 how exactly did you solve it with jQuery ?

Since this leak seems to be caused by wicket-ajax calls then solution
 would
be bypassing
those, this would be the last resort.

 Wicket 6 uses jQuery for its AJAX backhauling. I wonder if, therefore, if 
 your app were ported to Wicket 6 if the IE9 problem goes away.


 -
 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




--
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

-
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: IE9 Memory leak when updating component with Ajax (Wicket 1.5.5)

2012-04-12 Thread Heikki Uotinen
Ok, it seems that time takes care of this problem and leak is not wicket-ajax 
problem:

Tests with IE 10 (consumer preview) shows no leaking, gc seems to work and 
browser 
refresh clears the memory. There were no leaking with Opera, Firefox and 
Chrome. 

Furthermore previous JS debugging did not show that anything was piling in dom, 
so 
it must be IE9 inner problem.

Only leaking is this IE9 in IE9 document mode, can't see any point filing a 
ticket.

Anyway quickstart is available at 
http://uploading.com/files/51fc2bcb/ie9memory.zip/

Easy way to check Process Explorer - select iexplore.exe- Properties..- 
Performance Graph - Private bytes


-Original Message-
From: Heikki Uotinen [mailto:heikki.uoti...@syncrontech.com] 
Sent: 11. huhtikuuta 2012 14:38
To: users@wicket.apache.org
Subject: RE: IE9 Memory leak when updating component with Ajax (Wicket 1.5.5)

Hi,

1) Process Explorer and IE developer tools

2) ok

-Original Message-
From: Martin Grigorov [mailto:mgrigo...@apache.org] 
Sent: 11. huhtikuuta 2012 14:14
To: users@wicket.apache.org
Subject: Re: IE9 Memory leak when updating component with Ajax (Wicket 1.5.5)

Hi,

From your mails I still don't understand how exactly you measure the memory 
consumption.
You have two options:
1) google for javascript memory leak. You can add Internet explorer in the 
search term too I'm not sure whether IE has tools to deal with that but you can 
use  
and see whether it helps somehow

2) create a ticket in Wicket Jira with a quickstart and detailed description 
how to reproduce and how to measure and let someone else to debug it for you.

On Wed, Apr 11, 2012 at 1:50 PM, Heikki Uotinen 
heikki.uoti...@syncrontech.com wrote:
 Hi,

 I tested against apache-wicket-6.0.0-beta1 with that simple example in the 
 first mail.

 Application still leaked memory on IE9 document mode, same behavior as with 
 1.5.5.

 Confirmed that it is using jQuery:

 script type=text/javascript 
 src=../resource/org.apache.wicket.resource.JQueryResourceReference/jq
 uery/jquery-ver-1334139767559.js/script

 script type=text/javascript 
 src=../resource/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/re
 s/js/wicket-event-jquery-ver-1334139767559.js/script

 script type=text/javascript 
 src=../resource/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/re
 s/js/wicket-ajax-jquery-ver-1334139767559.js/script

 Suggestions ?


 -Original Message-
 From: Chris Colman [mailto:chr...@stepaheadsoftware.com]
 Sent: 11. huhtikuuta 2012 11:47
 To: users@wicket.apache.org
 Subject: RE: IE9 Memory leak when updating component with Ajax (Wicket 
 1.5.5)

 how exactly did you solve it with jQuery ?

Since this leak seems to be caused by wicket-ajax calls then solution
 would
be bypassing
those, this would be the last resort.

 Wicket 6 uses jQuery for its AJAX backhauling. I wonder if, therefore, if 
 your app were ported to Wicket 6 if the IE9 problem goes away.


 -
 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




--
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

-
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: IE9 Memory leak when updating component with Ajax (Wicket 1.5.5)

2012-04-11 Thread Heikki Uotinen
Hi,

 it seems that IE9 leaks memory heavily when updating components with Ajax in 
 IE9 document mode.

can anyone confirm if this is Wicket related issue ? 

Forcing IE8 document mode will cause some problems in the future.

Our use case is process displays where data comes from automation or other 
systems and data 
is updated frequently and those monitoring displays are open 24/7. Large 
customers have their 
own standards for browsers and versions they are using.

If there are 50 simple text divs on the screen, then updating those every 10 
seconds 
browser window consumes memory 3Mb in a minute in IE9 document mode, refreshing 
browser 
does not release memory. Normally updates happens more irregular and updating 
all fields
at once makes user experience less comfortable 'cause there are other actions 
connected
to those fields (links, tooltips, graphics).

 how exactly did you solve it with jQuery ?

Since this leak seems to be caused by wicket-ajax calls then solution would be 
bypassing 
those, this would be the last resort.


-Original Message-
From: Heikki Uotinen [mailto:heikki.uoti...@syncrontech.com] 
Sent: 5. huhtikuuta 2012 18:50
To: users@wicket.apache.org
Subject: RE: IE9 Memory leak when updating component with Ajax (Wicket 1.5.5)

Hi,

maybe there is some gc problem with closures in IE9 document mode.

Simple test page leaks memory in IE9 mode even if first suspect 
Wicket.replaceOuterHtmlIE is commented out. Test with plain XMLHttpRequest does 
not leak memory in any case.

This Wicket Ajax example also slowly grows if IE9 document mode is set manually 
but is not seemingly leaking in IE8 mode

http://www.wicket-library.com/wicket-examples/ajax/world-clock


-Original Message-
From: Martin Grigorov [mailto:mgrigo...@apache.org]
Sent: 4. huhtikuuta 2012 9:19
To: users@wicket.apache.org
Subject: Re: IE9 Memory leak when updating component with Ajax (Wicket 1.5.5)

Hi,

Can you share your findings ?
What exactly you think caused the memory leak and how exactly did you solve it 
with jQuery ?

On Wed, Apr 4, 2012 at 8:14 AM, Heikki Uotinen heikki.uoti...@syncrontech.com 
wrote:
 Ok, this leak can be avoided by updating rapidly changing components 
 with jQuery before upgrading to Wicket 6,

 -Heikki

 -Original Message-
 From: Heikki Uotinen [mailto:heikki.uoti...@syncrontech.com]
 Sent: 3. huhtikuuta 2012 16:17
 To: users@wicket.apache.org
 Subject: IE9 Memory leak when updating component with Ajax (Wicket
 1.5.5)

 Hi,

 it seems that IE9 leaks memory heavily when updating components with Ajax in 
 IE9 document mode.

 There is no leak after setting document to IE8 mode

 meta http-equiv=X-UA-Compatible content=IE=8/

 Any ideas to resolve this without forcing IE8 mode ?

 There have been past issues, but found no current issue related to this, 
 quick start code is very simple, Opera, Firefox, Chrome work fine.


            public HomePage(final PageParameters parameters)
            {
                         Label testDiv = new Label(testDiv, new 
 PropertyModel(this, data));
                         testDiv.setOutputMarkupId(true);
                         add(testDiv);

                         AjaxSelfUpdatingTimerBehavior timer = new 
 AjaxSelfUpdatingTimerBehavior(Duration.milliseconds(200));
                         testDiv.add(timer);
            }

            public String getData()
            {
                         Date now = new Date();
                         return now.toString();
            }

            html
            head
            !-- No leak if this is set
                        meta http-equiv=X-UA-Compatible 
 content=IE=8/
            --
            /head
            body
                        div wicket:id=testDiv/div
            /body
            /html

 -Heikki

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




--
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

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

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


RE: IE9 Memory leak when updating component with Ajax (Wicket 1.5.5)

2012-04-11 Thread Heikki Uotinen
Hi,

I tested against apache-wicket-6.0.0-beta1 with that simple example in the 
first mail.

Application still leaked memory on IE9 document mode, same behavior as with 
1.5.5.

Confirmed that it is using jQuery:

script type=text/javascript 
src=../resource/org.apache.wicket.resource.JQueryResourceReference/jquery/jquery-ver-1334139767559.js/script

script type=text/javascript 
src=../resource/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/res/js/wicket-event-jquery-ver-1334139767559.js/script

script type=text/javascript 
src=../resource/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/res/js/wicket-ajax-jquery-ver-1334139767559.js/script

Suggestions ?


-Original Message-
From: Chris Colman [mailto:chr...@stepaheadsoftware.com] 
Sent: 11. huhtikuuta 2012 11:47
To: users@wicket.apache.org
Subject: RE: IE9 Memory leak when updating component with Ajax (Wicket 1.5.5)

 how exactly did you solve it with jQuery ?

Since this leak seems to be caused by wicket-ajax calls then solution
would
be bypassing
those, this would be the last resort.

Wicket 6 uses jQuery for its AJAX backhauling. I wonder if, therefore, if your 
app were ported to Wicket 6 if the IE9 problem goes away.


-
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: IE9 Memory leak when updating component with Ajax (Wicket 1.5.5)

2012-04-11 Thread Heikki Uotinen
Hi,

1) Process Explorer and IE developer tools

2) ok

-Original Message-
From: Martin Grigorov [mailto:mgrigo...@apache.org] 
Sent: 11. huhtikuuta 2012 14:14
To: users@wicket.apache.org
Subject: Re: IE9 Memory leak when updating component with Ajax (Wicket 1.5.5)

Hi,

From your mails I still don't understand how exactly you measure the memory 
consumption.
You have two options:
1) google for javascript memory leak. You can add Internet explorer in the 
search term too I'm not sure whether IE has tools to deal with that but you can 
use  
and see whether it helps somehow

2) create a ticket in Wicket Jira with a quickstart and detailed description 
how to reproduce and how to measure and let someone else to debug it for you.

On Wed, Apr 11, 2012 at 1:50 PM, Heikki Uotinen 
heikki.uoti...@syncrontech.com wrote:
 Hi,

 I tested against apache-wicket-6.0.0-beta1 with that simple example in the 
 first mail.

 Application still leaked memory on IE9 document mode, same behavior as with 
 1.5.5.

 Confirmed that it is using jQuery:

 script type=text/javascript 
 src=../resource/org.apache.wicket.resource.JQueryResourceReference/jq
 uery/jquery-ver-1334139767559.js/script

 script type=text/javascript 
 src=../resource/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/re
 s/js/wicket-event-jquery-ver-1334139767559.js/script

 script type=text/javascript 
 src=../resource/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/re
 s/js/wicket-ajax-jquery-ver-1334139767559.js/script

 Suggestions ?


 -Original Message-
 From: Chris Colman [mailto:chr...@stepaheadsoftware.com]
 Sent: 11. huhtikuuta 2012 11:47
 To: users@wicket.apache.org
 Subject: RE: IE9 Memory leak when updating component with Ajax (Wicket 
 1.5.5)

 how exactly did you solve it with jQuery ?

Since this leak seems to be caused by wicket-ajax calls then solution
 would
be bypassing
those, this would be the last resort.

 Wicket 6 uses jQuery for its AJAX backhauling. I wonder if, therefore, if 
 your app were ported to Wicket 6 if the IE9 problem goes away.


 -
 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




--
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

-
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: IE9 Memory leak when updating component with Ajax (Wicket 1.5.5)

2012-04-05 Thread Heikki Uotinen
Hi,

maybe there is some gc problem with closures in IE9 document mode.

Simple test page leaks memory in IE9 mode even if first suspect 
Wicket.replaceOuterHtmlIE 
is commented out. Test with plain XMLHttpRequest does not leak memory in any 
case.

This Wicket Ajax example also slowly grows if IE9 document mode is set manually 
but is not
seemingly leaking in IE8 mode

http://www.wicket-library.com/wicket-examples/ajax/world-clock


-Original Message-
From: Martin Grigorov [mailto:mgrigo...@apache.org] 
Sent: 4. huhtikuuta 2012 9:19
To: users@wicket.apache.org
Subject: Re: IE9 Memory leak when updating component with Ajax (Wicket 1.5.5)

Hi,

Can you share your findings ?
What exactly you think caused the memory leak and how exactly did you solve it 
with jQuery ?

On Wed, Apr 4, 2012 at 8:14 AM, Heikki Uotinen heikki.uoti...@syncrontech.com 
wrote:
 Ok, this leak can be avoided by updating rapidly changing components 
 with jQuery before upgrading to Wicket 6,

 -Heikki

 -Original Message-
 From: Heikki Uotinen [mailto:heikki.uoti...@syncrontech.com]
 Sent: 3. huhtikuuta 2012 16:17
 To: users@wicket.apache.org
 Subject: IE9 Memory leak when updating component with Ajax (Wicket 
 1.5.5)

 Hi,

 it seems that IE9 leaks memory heavily when updating components with Ajax in 
 IE9 document mode.

 There is no leak after setting document to IE8 mode

 meta http-equiv=X-UA-Compatible content=IE=8/

 Any ideas to resolve this without forcing IE8 mode ?

 There have been past issues, but found no current issue related to this, 
 quick start code is very simple, Opera, Firefox, Chrome work fine.


            public HomePage(final PageParameters parameters)
            {
                         Label testDiv = new Label(testDiv, new 
 PropertyModel(this, data));
                         testDiv.setOutputMarkupId(true);
                         add(testDiv);

                         AjaxSelfUpdatingTimerBehavior timer = new 
 AjaxSelfUpdatingTimerBehavior(Duration.milliseconds(200));
                         testDiv.add(timer);
            }

            public String getData()
            {
                         Date now = new Date();
                         return now.toString();
            }

            html
            head
            !-- No leak if this is set
                        meta http-equiv=X-UA-Compatible 
 content=IE=8/
            --
            /head
            body
                        div wicket:id=testDiv/div
            /body
            /html

 -Heikki

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




--
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

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



RE: IE9 Memory leak when updating component with Ajax (Wicket 1.5.5)

2012-04-04 Thread Heikki Uotinen
Ok, this leak can be avoided by updating rapidly changing components with 
jQuery 
before upgrading to Wicket 6,

-Heikki

-Original Message-
From: Heikki Uotinen [mailto:heikki.uoti...@syncrontech.com] 
Sent: 3. huhtikuuta 2012 16:17
To: users@wicket.apache.org
Subject: IE9 Memory leak when updating component with Ajax (Wicket 1.5.5)

Hi,

it seems that IE9 leaks memory heavily when updating components with Ajax in 
IE9 document mode.

There is no leak after setting document to IE8 mode

meta http-equiv=X-UA-Compatible content=IE=8/

Any ideas to resolve this without forcing IE8 mode ?

There have been past issues, but found no current issue related to this, quick 
start code is very simple, Opera, Firefox, Chrome work fine.


public HomePage(final PageParameters parameters)
{
 Label testDiv = new Label(testDiv, new 
PropertyModel(this, data));
 testDiv.setOutputMarkupId(true);
 add(testDiv);

 AjaxSelfUpdatingTimerBehavior timer = new 
AjaxSelfUpdatingTimerBehavior(Duration.milliseconds(200));
 testDiv.add(timer);
}

public String getData()
{
 Date now = new Date();
 return now.toString();
}

html
head
!-- No leak if this is set
meta http-equiv=X-UA-Compatible content=IE=8/
--
/head
body
div wicket:id=testDiv/div
/body
/html

-Heikki

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



IE9 Memory leak when updating component with Ajax (Wicket 1.5.5)

2012-04-03 Thread Heikki Uotinen
Hi,

it seems that IE9 leaks memory heavily when updating components with Ajax in 
IE9 document mode.

There is no leak after setting document to IE8 mode

meta http-equiv=X-UA-Compatible content=IE=8/

Any ideas to resolve this without forcing IE8 mode ?

There have been past issues, but found no current issue related to this, quick 
start code is very simple,
Opera, Firefox, Chrome work fine.


public HomePage(final PageParameters parameters)
{
 Label testDiv = new Label(testDiv, new 
PropertyModel(this, data));
 testDiv.setOutputMarkupId(true);
 add(testDiv);

 AjaxSelfUpdatingTimerBehavior timer = new 
AjaxSelfUpdatingTimerBehavior(Duration.milliseconds(200));
 testDiv.add(timer);
}

public String getData()
{
 Date now = new Date();
 return now.toString();
}

html
head
!-- No leak if this is set
meta http-equiv=X-UA-Compatible content=IE=8/
--
/head
body
div wicket:id=testDiv/div
/body
/html

-Heikki


Re: What real life scenario calls for page ID?

2012-03-22 Thread heikki
What's the point in refreshing if it returns exactly the same page as
before ?



On Thu, Mar 22, 2012 at 11:32 PM, Johan Compagner jcompag...@gmail.comwrote:

 No this is bad, i agree with Igor, the latest page should be refreshed, not
 reset!

 By the way, the hybrid in 1.4 what we are using does look at the mount if
 the page doesn't exists any more. And we depend on that, am i reading it
 right that we lost that in 1.5?
 On Mar 22, 2012 11:12 PM, Pointbreak pointbreak+wicketst...@ml1.net
 wrote:

 
 
  On Thu, Mar 22, 2012, at 14:34, Igor Vaynberg wrote:
   On Thu, Mar 22, 2012 at 1:58 PM, Pointbreak
   pointbreak+wicketst...@ml1.net wrote:
On Thu, Mar 22, 2012, at 12:30, Igor Vaynberg wrote:
On Thu, Mar 22, 2012 at 12:24 PM, Pointbreak
pointbreak+wicketst...@ml1.net wrote:
 On Thu, Mar 22, 2012, at 12:05, Igor Vaynberg wrote:
 On Thu, Mar 22, 2012 at 11:55 AM, Pointbreak
 pointbreak+wicketst...@ml1.net wrote:
  On Thu, Mar 22, 2012, at 11:42, Igor Vaynberg wrote:
  On Thu, Mar 22, 2012 at 11:37 AM, Pointbreak
  pointbreak+wicketst...@ml1.net wrote:
   On Thu, Mar 22, 2012, at 10:56, Igor Vaynberg wrote:
   On Thu, Mar 22, 2012 at 10:20 AM, Pointbreak
   pointbreak+wicketst...@ml1.net wrote:
On Thu, Mar 22, 2012, at 09:49, Igor Vaynberg wrote:
On Thu, Mar 22, 2012 at 8:54 AM, Pointbreak
pointbreak+wicketst...@ml1.net wrote:
 On Thu, Mar 22, 2012, at 08:23, Igor Vaynberg wrote:
 On Thu, Mar 22, 2012 at 7:59 AM, Pointbreak
 pointbreak+wicketst...@ml1.net wrote:
  On Sun, Mar 18, 2012, at 20:00, Igor Vaynberg
 wrote:
  i think there is some confusion here. wicket 1.4
  had page ids. it also
  had page versions. in 1.5 we simply merged page id
  and page version
  into the same variable - page id. this made things
  much simpler and
  also allowed some usecases that were not possible
  when the two were
  separate.
 
  you dont have to go very far to come up with an
  example where page id is
  useful.
 
  1. suppose you have a page with panel A that has a
  link
  2. user hits a link on the page that swaps panel A
  for panel B
  3. user presses the back button
  4. user clicks the link on panel A
 
  now if you turn off page id and therefore page
  versioning it goes like
  this
  1. wicket creates page and assigns it id 1
  2. page id 1 now has panel B instead of panel A
  3. page with id 1 is rerendered
  4. wicket loads page with id 1. user gets an error
  because it cannot
  find the link component the user clicked since the
  page has panel B
  instead of panel A
 
 
  This is imho not what happens with NoVersionMount.
  What happens is:
 
  1. wicket creates page and assigns it id 1
  2. page id 1 now has panel B instead of panel A
  3. wicket creates new page and assigns it id 2;
  depending on how the
  page keeps state either a page with panel A and
  link, or a page with
  Panel B is created.
 
  Hence, there is nothing broken in this scenario.

 we were talking about something else here. the
  NoVersionMount has the
 problem of losing ajax state when the user refreshes
  the page.


 I believe the OP's question was for use-cases were
  Wickets default
 behaviour would be preferred over using a strategy
 like
  NoVersionMount.
 But if I understood that incorrectly, it's now my
  question  ;-).
 Imho
 the natural behaviour a user expects for a
 page-refresh
  is a fresh
 up-to-date version of the page. This is exactly what
  NoVersionMount does
 as it forces a newly constructed page for a refresh.
  For OP's (Chris
 Colman's) shopping card example this seems perfectly
  reasonable
 behaviour.
   
it is undesirable in applications that perform
 navigation
  using ajax
panel swapping. in this case a page-refresh will
  essentially take you
back to the homepage.
   
Fair enough
   
 I have never had to build a website were it was a
  problem when the ajax
 state was lost on page refresh.
   
but you also have not built every wicket application...
   
Obviously... to be honest, for your use case (one page
  ajax application
that performs navigation by swapping page components) I
  have always
chosen other frameworks, that are (imho) better suited
 for
  these
usecases.
   
 When wicket shows older versions of a
 page (e.g. due to back button, bookmarking older
  versions, etc.), you
 have to be really careful with how a page version and
 a
  model interact
 to not run into trouble. You 

Re: Apache Wicket is a Flawed Framework

2011-11-18 Thread heikki
I have tried out the Wicket framework and many things I really like about it.
Some observations:


- Wicket changes drastically between versions, and even between minor
versions / release candidates, things suddenly disappear from the API,
sometimes without having been flagged as deprecated ;

- as a result, many times the example code you find on the web or in books
like 'Wicket in Action' does no longer work as is

- the Javadoc of the source is quite OK for some classes, but for the great
majority any textual explanations there are either sparse or absent

- luckily the mailing list is nothing short of fantastic !

- I agree that it is rather too easy for Wicket to make things stateful,
when you don't want it

- and in my opinion the stuff you need to do to achieve normal URLs (no ?,
no version number, no nothing) is just a pain. *Every* URL, for stateless or
stateless pages or whatever, should be normal, otherwise it is just not
acceptable -- users never want to see those complicated-looking URLs under
any circumstance

- did not yet try out Ajax with Wicket, so I have no opinion on that

Just my 2¢. In all, a great framework that is much easier to use than e.g.
things based on JSP. Keep up the good work, guys !

Kind regards
Heikki Doeleman


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Apache-Wicket-is-a-Flawed-Framework-tp4080411p4082988.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



How to have a list of iframes ?

2011-11-17 Thread heikki
hello list,

I'd like to have a dynamically generated list of iframes in my page, where
each iframe has the same attributes except for its src attribute, which
should dynamically be inserted.

The iframes are embedded Youtube videos and I have a list of the urls to be
stuck in their src attributes. But my implementation does not work. The
error I get is

Last cause: A child with id 'videoframe' already exists:
[VideoListView [Component id = videoList]]
WicketMessage: Error attaching this container for rendering: [Page class =
my.package.page.VideoPage, id = 2, render count = 1]

In my VideoPage I have

public VideoPage() {
super();
videoListView = new VideoListView(videoList, new
LoadableDetachableModelListlt;String() {
protected ListString load() {
ListString urls = new ArrayListString();
// fill list with youtube urls
// .. 
return urls;
}
});
add(videoListView);
}

private class VideoListView extends ListViewString {
public VideoListView(String name, final IModelListlt;String
urls) {
super(name, urls);
}
protected void populateItem(ListItemString listItem) {
final String url = listItem.getModelObject();
final WebMarkupContainer videoFrame = new
WebMarkupContainer(videoframe);
videoFrame.add(new SimpleAttributeModifier(src, url));
// .. put other non-changing attributes here too
add(videoFrame);
}
}

and in my page I have

div wicket:id=videoList
   iframe wicket:id=videoframe class=dance-video
width=425 height=349 src= frameborder=0 allowfullscreen/iframe
/div

Anyone has an idea how to achieve this ? I've also looked at InlineFrame (to
use instead of WebMarkupContainer) but it seems most concerned with
instantiating a Page to render in an iframe, if I'm correct.

thanks in advance,
kind regards
Heikki Doeleman




--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/How-to-have-a-list-of-iframes-tp4080744p4080744.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: Mounting page to mutliple urls with different pageparameter

2011-11-07 Thread heikki
thanks ! 

Adding a second IRequestMapper like that, rather than replacing the default
with a dual-function like I tried above, is so much simpler and works like a
charm.

That being said, it turns out that it has no effect whether or not I
override getCompatibilityScore(). See my implementation below. If I do not
override mapRequest() to check the url and return null, it accepts all URLs
like /xyz (using Wicket 1.5.2).

In any case, everything works fine now for me. Thanks a lot !

for reference, my code :

in Application:

mount(new AnotherPageRequestMapper(/${param}, AnotherPage.class));

and the impl:

   import org.apache.wicket.request.IRequestHandler;
   import org.apache.wicket.request.Request;
   import org.apache.wicket.request.component.IRequestablePage;
   import org.apache.wicket.request.mapper.MountedMapper;

   public class AnotherPageRequestMapper extends MountedMapper{

  public AnotherPageRequestMapper(String mountPath, Class?
extends IRequestablePage pageClass) {
 super(mountPath, pageClass);
}

  public IRequestHandler mapRequest(Request request) {
 String url = request.getUrl().toString();
 if(url.startsWith(b)) {
return super.mapRequest(request);
 }
 else {
return null;
 }
  }

  /**
   * it does not make a difference, in practice, what this
method returns (?!).
   */
  public int getCompatibilityScore(Request request) {
 String url = request.getUrl().toString();
 if(url.startsWith(b)) {
return 1;
 }
 else {
return 0;
 }
  }
   }



kind regards
Heikki Doeleman

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Mounting-external-pages-to-root-tp3890756p3998358.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: Mounting page to mutliple urls with different pageparameter

2011-11-06 Thread heikki
hi,

thanks for your explanation. As I want to restrict the possible paths to
AnotherPage to /b and /c and not /xyz, I went for the IRequestMapper
implementation.

I now have an implementation that seems to work perfect, but I'm afraid it's
not thread-safe and I'm not sure if I've understood things correctly. So
please, if you could help me answer the following questions ?

I need to return different URLs from mapHandler() for AnotherPage and for
any other URLs I have in my application. This is because I need the b or
c as PageParameter to AnotherPage, but it should not happen for other
URLs. So I implemented IRequestMapper such that it wraps the default
RootRequestMapper to be used for all requests except /b and /c, which are
handled by a different IRequestMapper that uses a path variable. In my
Application:

   setRootRequestMapper(new RootRequestMapper(getRootRequestMapper(),
new MountedMapper(/${param}, AnotherPage.class)));

Then in my IRequestMapper implementation, in mapRequest() the request url
segments are checked and if it's /b or /c, use the second one.

To get things to work with the correct URL for both cases, I also check in
mapHandler() which IRequestMapper should return the URL. However I found no
way to remember which case (/b, or anything esle) is being handled between
the mapRequest and mapHandler() methods, so I stored this in a class
variable. This is what I think is not thread-safe.

Please see my implementation here http://pastebin.com/h0rhtFLz.

Surely there's a better of way dealing with this ?

thank you and kind regards
Heikki Doeleman

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Mounting-external-pages-to-root-tp3890756p3996292.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



Mounting page to mutliple urls with different pageparameter

2011-11-04 Thread heikki
hello,

I still find URL mapping to be far from easy. I can't get the following
mapping to work; all advice very much appreciated:

intented mapping is:

/  -- map to IndexPage.class
/b-- map to AnotherPage.class with pageparameter
param=b
/c-- map to AnotherPage.class with pageparameter
param=c

I tried creating a custom RootRequestMapper but I could not get it to work.
The closest I've come to achieving the above url mapping is with this in my
Application

 protected void init() {
  super.init();   
  mount(new MountedMapper(b, AnotherPage.class, new
CustomPageParametersEncoder(b)));
  mount(new MountedMapper(c, AnotherPage.class, new
CustomPageParametersEncoder(c)));
 }
 public Class getHomePage() {
  return IndexPage.class;
 }

where CustomPageParametersEncoder creates the pageparameter from the url in
method decodePageParameters(). 

What doesn't work here, is that requests to /b are turned into requests to
/c, with pageparameter c. 

So I end up, when requesting /b, with /c in my browser address bar, and the
page saying Hello, c, where I want to end up with /b in my address bar and
the page saying Hello, b.

Your advice is very much appreciated,
kind regards
Heikki Doeleman

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Mounting-external-pages-to-root-tp3890756p3989966.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: Mounting page to mutliple urls with different pageparameter

2011-11-04 Thread heikki
hi,

thanks for your hints, but still I didn't get it to work. I have a
RootRequestMapper that extends MountedMapper, and it overrides mapRequest()
like so

@Override
public IRequestHandler mapRequest(Request request) {
ListString segments = request.getUrl().getSegments();
if(CollectionUtils.isEmpty(segments)) {
System.out.println(mapRequest to Index page);
return new RenderPageRequestHandler(new
PageProvider(IndexPage.class));
}
else {
System.out.println(mapRequest to Another page);
return new RenderPageRequestHandler(new
PageProvider(AnotherPage.class, new PageParameters().add(param,
segments.get(0;
}
}

Now, with this in Application:

   mount(new RootRequestMapper(/, Index.class));
   mount(new RootRequestMapper(b, AnotherPage.class));
   mount(new RootRequestMapper(c, AnotherPage.class));

Result: / ends up correctly in IndexPage, but /b and /c end up serving an
empty HTML page (?!).

If I only put this in Application (without the root mapping)

   mount(new RootRequestMapper(b, AnotherPage.class));
   mount(new RootRequestMapper(c, AnotherPage.class));

Result: / serves an empty page, and /b does end up in AnotherPage, but
renders this in the address bar: /c?param=c (again, replacing b with c, and
now adding the param as a visible url parameter).

Then I tried using a 'wildcard' like this

mount(new RootRequestMapper(/, Index.class));
mount(new RootRequestMapper(/${param}, AnotherPage.class));

Result: / serves correctly the index page, /b serves an empty HTML page.

In all cases, the System.outs in my RootRequestMapper correctly say either
to Index page or to Another page -- even in those cases above where a
blank HTML page is served, though constructor of said pages is not invoked
then.

So I guess I'm missing some small but essential detail somewhere .. if you
would have any further advice, thanks very much, in advance.

Kind regards
Heikki Doeleman

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Mounting-external-pages-to-root-tp3890756p3990222.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: Mounting page to mutliple urls with different pageparameter

2011-11-04 Thread heikki
sorry, just saw your reply about pastebin after posting.

Here it is: http://pastebin.com/uRNyxZbV.

Thanks and kind regards
Heikki Doeleman



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Mounting-external-pages-to-root-tp3890756p3990244.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: Mounting external pages to root

2011-10-11 Thread heikki
hi,

I have a similar question, not sure if quite the same though. The pageflow
is like this:


(1) my app's homepage goes to a page with a loginform, SignInPage. On
logging in the user gets to a page SignedInPage.

(2) SignedInPage has a logout form, which logs out the user and should go
back to SignInPage.

(3) any other URL should be accepted and go to a page MainPage, which
detects which URL path was used by checking PageParameters and could take
action depending on its value.


What is working fine are (1) and (3).  However on the SignedInPage, when
submitting the logout form, an exception occurs indicating that it's trying
to find the logout form on MainPage:



Of course it isn't on MainPage, the logoutform is on SignedInPage.

Can anyone tell me how to achieve a setup like this ? My current code is
like this :


In my Application init() I have

and I have this method


The logoutform on SignedInPage has this in onSubmit() :



Thanks in advance for your response,
kind regards
Heikki Doeleman

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Mounting-external-pages-to-root-tp3890756p3894477.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: Mounting external pages to root

2011-10-11 Thread heikki
hi, 

forgive me for re-posting this, but it seems my code snippets in lt;raw
tags are invisible in email .. 

I have a similar question, not sure if quite the same though. The pageflow
is like this: 


(1) my app's homepage goes to a page with a loginform, SignInPage. On
logging in the user gets to a page SignedInPage. 

(2) SignedInPage has a logout form, which logs out the user and should go
back to SignInPage. 

(3) any other URL should be accepted and go to a page MainPage, which
detects which URL path was used by checking PageParameters and could take
action depending on its value. 


What is working fine are (1) and (3).  However on the SignedInPage, when
submitting the logout form, an exception occurs indicating that it's trying
to find the logout form on MainPage: 

Last cause: Could not find component 'logoutform' on page 'class
my.package.page.MainPage

Of course it isn't on MainPage, the logoutform is on SignedInPage. 

Can anyone tell me how to achieve a setup like this ? My current code is
like this : 


In my Application init() I have 

  mountPage(/${username}, MainPage.class);
  mountPage(/secure, SignedInPage.class);
  mountPage(/, SignInPage.class);

and I have also this method 

public Class getHomePage() {
 return SignInPage.class;
}

The logoutform on SignedInPage has this in onSubmit() : 

  setResponsePage(SigninPage.class);

Thanks in advance for your response, 
kind regards 
Heikki Doeleman

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Mounting-external-pages-to-root-tp3890756p3894513.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: Reloading i18n on demand

2011-09-09 Thread heikki
hi Martin,

thanks for the pointer.

Having taking a quick look at the source, it looks like one very easy way to
preserve reloading on the fly is to add a line like this in my Application's
init() method:


getResourceSettings().setResourcePollFrequency(Duration.minutes(2));

this'll serve my purpose for the moment just fine -- as soon as I have time
I'll investigate more how to achieve actual on demand reloading (without
polling).

thanks and kind regards
Heikki Doeleman


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Reloading-i18n-on-demand-tp3798545p3801694.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



Reloading i18n on demand

2011-09-08 Thread heikki
hello,

I've read that Wicket in Development Mode reloads changes to property files
on the fly, but not in Production Mode, when they are heavily cached.

Is there a way to reload property files such as those used for i18n in
Production Mode, either on the fly or on demand ?

I would suppose it could be possible that they're re-loaded on demand, after
which the heavy caching could take place again. But I haven't found any
information on this.

Anyone have a suggestion ?

thanks in advance
Heikki Doeleman

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Reloading-i18n-on-demand-tp3798545p3798545.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



Stateless pagination

2011-08-08 Thread heikki
hello,

I've noticed that rather many Wicket components cause the page to become
stateful, something which I wish to avoid.

In particular I'm wondering if there is some way to use the Pagination*
components (or similar alternative ones) to create a page that has
pagination over a repeater, without making the page stateful.

Sure, I suppose some info about the collection and current page etc. must be
remembered on the server, but we still have good old HttpSession that could
maybe be used for it ?

Any hints appreciated !

thanks and kind regards
Heikki Doeleman

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Stateless-pagination-tp3726950p3726950.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: URLs without counter parameter

2011-08-07 Thread heikki
OK,

it turned out that a form in my base page with links to change the language
was the stateful component. I've now changed things so it is a stateless
form and it works like a charm.


Thanks for hinting at StatelessChecker !

Kind regards
Heikki Doeleman

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/URLs-without-counter-parameter-tp3724144p3724820.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: i18n for html header elements

2011-08-06 Thread heikki
hi Martin,

thanks for your suggestion, but it made no difference. I tried

html xmlns:wicket=http://wicket.apache.org/;
wicket:head
titlewicket:message key=title.galleryBienvenue à
Braziland/wicket:message
/title
/wicket:head
body

and it's the same, no translated title shown, but instead the
wicket:message... appears as the title.


What am I doing wrong here? Surely it must be possible to use i18n for
header elements ?


Kind regards,
Heikki Doeleman

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/i18n-for-html-header-elements-tp3722490p3723142.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: i18n for more than attribute

2011-08-06 Thread heikki
hi,

thanks, but that doesn't work; only the first in the comma-separated list
gets translated.

Anyone have an idea how to do this ?


thanks
kind regards
Heikki Doeleman

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/i18n-for-more-than-attribute-tp3722544p3723525.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: i18n for html header elements

2011-08-06 Thread heikki
hi Dan,

you're right ! The translation as such is working fine, it's just the
preserved wicket:message.. element that is also displayed in the page's
title.

Am I right that in non-development mode, the wicket elements are stripped
from the page? In that case I can live with them while developing, now that
it's clear that the translation as such is done correctly.

thank you and kind regards
Heikki Doeleman


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/i18n-for-html-header-elements-tp3722490p3723536.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: i18n for more than attribute

2011-08-06 Thread heikki
Hmm I don't have Wicket source at hand, just using the compiled libraries.

Could it be that it works differently in the Wicket version I'm using (1.5
M3) ?


I tested this:

input wicket:id=french
   type=image
   src=images/flags/france_small.png
   name=image
   alt=français
   title=français
   wicket:message=title:french, alt:french
   style=border-style: none;/

and this (reversed order in comma-separated list):

input wicket:id=french
   type=image
   src=images/flags/france_small.png
   name=image
   alt=français
   title=français
   wicket:message=alt:french, title:french
   style=border-style: none;/

and the result is really as I described, only the first of the
comma-separated attributes gets translated.

thanks
kind regards
Heikki Doeleman

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/i18n-for-more-than-attribute-tp3722544p3723591.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



URLs without counter parameter

2011-08-06 Thread heikki
Hello,

I'm using Wicket 1.5M3 and I'm trying to have nice-looking URLs in my web
app.

The URLs produced by the code as below are almost perfect, except for one
detail: always, there is a counter appended, reflecting the number of
requests made in this session.


For example I get http://localhost:8080/myapp/contact?3, when I would prefer
to have just http://localhost:8080/myapp/contact.


All my pages are stateless -- at least that is what I think they are, many
do not even have any code in their corresponding Java class. I also tried
using setStatelessHint(true); but the results are the same.

The code I use is:

in MyApplication.java's init() method

mountPage(/contact, ContactPage.class);

etc., for all pages; and when creating links to the pages in the site's
menu, I do

   add(new BookmarkablePageLink(contact-link, ContactPage.class));

with
# contact 

in the HTML.


Is it possible to get rid of those ?x that are appended to the URLs ?


thank you in advance for your answers
kind regards
Heikki Doeleman




--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/URLs-without-counter-parameter-tp3724144p3724144.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: URLs without counter parameter

2011-08-06 Thread heikki
sorry, did not escape html in my post. That should be:

with
   
# contact 


in the HTML.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/URLs-without-counter-parameter-tp3724144p3724147.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: i18n for more than attribute

2011-08-06 Thread heikki
Yes, from looking at the code it certainly seems as if it should work..

As for your suggestion to attach the sources, well, often I use quite many
libraries (Lucene, Hibernate..) and it would generally speaking get rather
impractical to attach the sources of all of them. Also kind of defies the
idea of a /library/..

but maybe for Wicket it makes sense indeed, as it is the core framework to
run my application -- and also because it seems the changes in the API
between 1.4 and 1.5 are often quite radical.

Although for this particular problem the changes do not seem too great. For
the moment I'll live with translated 'title' attributes and non-translated
'alt' attributes, due to time constraints -- but I do intend to find out
what's happening exactly and when I do, I'll post my results here.

Thank you for your replies,
kind regards
Heikki Doeleman

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/i18n-for-more-than-attribute-tp3722544p3724170.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: i18n for more than attribute

2011-08-06 Thread heikki
What I meant with 'radical' changes is that there are many classes that for
example have disappeared from the API, or have become abstract where before
they were not, things like that.. in some cases these classes were not
marked 'deprecated' in 1.4 and yet they're gone in 1.5.

As a result, many of the example code that is around on the web, doesn't
just work if you're using 1.5.

I did not mean to offend by using that word -- if I did, my apologies. I'm
still quite new to Wicket and I find it an excellent framework and also a
very responsive mailing list.

kind regards
Heikki Doeleman

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/i18n-for-more-than-attribute-tp3722544p3724205.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: Repeating form on a page

2011-08-05 Thread heikki
OK ! Indeed, this solves it, and now all's perfect.

Thank you so much !

Kind regards
Heikki Doeleman

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Repeating-form-on-a-page-tp2002098p378.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



i18n for more than attribute

2011-08-05 Thread heikki
Hello,

I'm trying to make my site available in several languages, and mostly things
work fine. But I'm wondering how to apply translations to more than one
attribute in an element.

For example:

input wicket:id=some-id
 type=image
 src=images/my-image.png
 name=image
 alt=the alt text to be translated
 title=the title text to be translated
 wicket:message=title:translationkey/

this works fine to have the 'title' attribute properly translated. But I
want the 'alt' attribute also properly translated; I can't put in a second
'wicket:message' attribute for that, because it causes a runtime exception
complaining that the same attribute appears twice.

How can I have i18n translations for more than one attribute in the same
element?

thanks in advance for your help,
kind regards
Heikki Doeleman

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/i18n-for-more-than-attribute-tp3722544p3722544.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: Repeating form on a page

2011-07-29 Thread heikki
hello,

despite searching around I haven't found a good working example/explanation
of how to create a page where a form is repeated for each element in a
collection. (I found some info on using repeaters inside forms, but that is
a reverse situation).

Earlier in this thread there's the advice to use RefreshingView instead of
ListView. Is this good advice? What is the difference between them in this
scenario where forms should be repeated?

I tried doing it as below, but it causes a runtime exception. Can anyone
point out what I'm doing wrong and how it should be done?

The exception I'm getting is

Last cause: Unable to find component with id 'aForm' in [ListItem [Component
id = 0]]
Expected: 'a-list:0.aForm'.
Found with similar names: 'a-list:aForm'

The code is

div wicket:id=a-list
form wicket:id=aForm
input wicket:id=myproperty type=text/
div
input wicket:id=save type=submit value=Save/
input wicket:id=remove type=submit value=Remove/
/div
/form
/div

private ListView aList = new ListView(a-list, aDAO.retrieveAll()) {
@Override
protected void populateItem(ListItem item) {
final A a = (A) item.getModelObject();
add(new AForm(aForm,
new CompoundPropertyModel(new
LoadableDetachableModel() {
@Override
protected Object load() {
return a;
}
})
));
}};
 private class AForm extends Form {
public AForm(String id, IModel m) {
super(id, m);
TextField myProperty= new TextField(myproperty);
add(myProperty);
add(new Button(save) {
public void onSubmit() {
A selected = (A) getForm().getModelObject();
ADAO.save(selected);
setResponsePage(APage.class);
}
});
add(
new Button(remove) {
@Override
public void onSubmit() {
A selected = (A) getForm().getModelObject();
ADAO.delete(selected);
setResponsePage(APage.class);
}
});
}
}

thanks in advance for your reply,
kind regards
Heikki Doeleman

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Repeating-form-on-a-page-tp2002098p3703919.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: Flash/ExternalInterface does not work in IE if movie is fetched via Wicket/Ajax

2009-09-09 Thread Heikki Uotinen
Thanks,

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

-Heikki

-Original Message-
From: Matej Knopp [mailto:matej.kn...@gmail.com] 
Sent: 9. syyskuuta 2009 0:10
To: users@wicket.apache.org
Subject: Re: Flash/ExternalInterface does not work in IE if movie is fetched 
via Wicket/Ajax

Hi,

can you create jira issue with problem description? The code indeed
looks wrong I can fix it once the issue is created.

-Matej

On Tue, Sep 8, 2009 at 9:59 PM, Heikki
Uotinenheikki.uoti...@syncrontech.com wrote:
 There is a bug in wicket-ajax.js:268 (1.4.1) that breaks 
 IE+Flash/ExternalInterface:

        // place all newly created elements before the old element
        while(tempParent.childNodes.length  0) {
                var tempElement = tempParent.childNodes[0];
           tempParent.removeChild(tempElement); 
                parent.insertBefore(tempElement, element);
                tempElement = null;
        }

 Calling removeChild is not needed because insertBefore moves element from its 
 original place.
 If you remove removeChild line and check tempParent.childNodes.length you 
 can see that it is
 decreased by one after insertBefore.

 This removeChild breaks Flash/ExternalInterface in IE. If removeChild is 
 removed then everything
 works fine. IE is more strict here than other browsers.

 Demonstration is still at (there is no need for Flash CS4 to test this)

 http://download.syncrontech.com/public/quickstart_noname.zip


 Could someone confirm this and suggest how to proceed ?


 -Heikki


 -Original Message-
 From: Heikki Uotinen [mailto:heikki.uoti...@syncrontech.com]
 Sent: 7. syyskuuta 2009 9:21
 To: users@wicket.apache.org
 Subject: RE: Flash/ExternalInterface does not work in IE if movie is fetched 
 via Wicket/Ajax

 There is a problem with IE/ExternalInterface if movie is added to DOM f.ex 
 appendChild
 JavaScript functions are called but they do not return any value.

 This is clearly MS problem but could IE specific function in wicket-ajax.js 
 be adjusted somehow ?

 Simple test case has

        var flashMovie = 'OBJECT id=testId codeBase=http://fpdownload..

        // Works in IE and FF
                document.getElementById(testdiv).innerHTML = flashMovie;

        // ExternalInterface.call calls JS but does not return value in IE. 
 Works in FF
        var tempDiv = document.createElement(div);
        tempDiv.innerHTML = flashMovie;
        document.body.appendChild(tempDiv);

 Here is complete code (ajax.swf can be found in zip files)

 http://pastebin.com/fbc0aa9a

 Here is AS3 code in ajax.fla

 http://pastebin.com/d4efd47b


 -Heikki

 -Original Message-
 From: Mikko Pukki [mailto:mikko.pu...@syncrontech.com]
 Sent: 4. syyskuuta 2009 15:33
 To: users@wicket.apache.org
 Subject: Flash/ExternalInterface does not work in IE if movie is fetched via 
 Wicket/Ajax

 Hi,

 This example demonstrates that ExternalInterface fails with IE only if movie 
 is fetched via Wicket/Ajax.

 ajaxtest.zip:
 (http://download.syncrontech.com/public/ajaxtest.zip)

 Page first.html fetches second.html page via Ajax. Second.html has Flash 
 movie
 that calls JavaScript methods with ExternalInterface and produces output
 Start...
 ExternalInterface.available:true
 ExternalInterface.objectID:testId
 fromJs:text from js (first.html)

 This works both FF 3.5 and IE 7/IE8


 quickstart_noname.zip:
 (http://download.syncrontech.com/public/quickstart_noname.zip)

 Same demonstration with wicket. This fails with IE

 Start...
 ExternalInterface.available:true
 ExternalInterface.objectID:null
 fromJs:null

 ObjectId is null and JavaScript call does not return any value.

 We are aware about EI/IE problems in past, but any of those does not seem to 
 fit here.

 Wicket 1.4.1, Flash Player 10, IE 7/8, FF 3.5

 Has anyone encountered any similar behavior and/or has found any workaround?
 Should I create a Jira issue?


 --
 Mikko Pukki
 Syncron Tech Oy
 Laserkatu 6
 53850 Lappeenranta
 +358 400 757 178


 -
 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



-
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: Flash/ExternalInterface does not work in IE if movie is fetched via Wicket/Ajax

2009-09-08 Thread Heikki Uotinen
There is a bug in wicket-ajax.js:268 (1.4.1) that breaks 
IE+Flash/ExternalInterface:

// place all newly created elements before the old element  
while(tempParent.childNodes.length  0) {
var tempElement = tempParent.childNodes[0];
   tempParent.removeChild(tempElement); 
parent.insertBefore(tempElement, element);
tempElement = null;
}

Calling removeChild is not needed because insertBefore moves element from its 
original place.
If you remove removeChild line and check tempParent.childNodes.length you 
can see that it is 
decreased by one after insertBefore.

This removeChild breaks Flash/ExternalInterface in IE. If removeChild is 
removed then everything 
works fine. IE is more strict here than other browsers.

Demonstration is still at (there is no need for Flash CS4 to test this)

http://download.syncrontech.com/public/quickstart_noname.zip


Could someone confirm this and suggest how to proceed ?


-Heikki


-Original Message-
From: Heikki Uotinen [mailto:heikki.uoti...@syncrontech.com] 
Sent: 7. syyskuuta 2009 9:21
To: users@wicket.apache.org
Subject: RE: Flash/ExternalInterface does not work in IE if movie is fetched 
via Wicket/Ajax

There is a problem with IE/ExternalInterface if movie is added to DOM f.ex 
appendChild
JavaScript functions are called but they do not return any value.

This is clearly MS problem but could IE specific function in wicket-ajax.js be 
adjusted somehow ?

Simple test case has

var flashMovie = 'OBJECT id=testId codeBase=http://fpdownload..

// Works in IE and FF
document.getElementById(testdiv).innerHTML = flashMovie;

// ExternalInterface.call calls JS but does not return value in IE. 
Works in FF
var tempDiv = document.createElement(div);
tempDiv.innerHTML = flashMovie;
document.body.appendChild(tempDiv);

Here is complete code (ajax.swf can be found in zip files)

http://pastebin.com/fbc0aa9a

Here is AS3 code in ajax.fla

http://pastebin.com/d4efd47b


-Heikki

-Original Message-
From: Mikko Pukki [mailto:mikko.pu...@syncrontech.com] 
Sent: 4. syyskuuta 2009 15:33
To: users@wicket.apache.org
Subject: Flash/ExternalInterface does not work in IE if movie is fetched via 
Wicket/Ajax

Hi,

This example demonstrates that ExternalInterface fails with IE only if movie is 
fetched via Wicket/Ajax.

ajaxtest.zip:
(http://download.syncrontech.com/public/ajaxtest.zip)

Page first.html fetches second.html page via Ajax. Second.html has Flash 
movie
that calls JavaScript methods with ExternalInterface and produces output
Start...
ExternalInterface.available:true
ExternalInterface.objectID:testId
fromJs:text from js (first.html)

This works both FF 3.5 and IE 7/IE8


quickstart_noname.zip:
(http://download.syncrontech.com/public/quickstart_noname.zip)

Same demonstration with wicket. This fails with IE

Start...
ExternalInterface.available:true
ExternalInterface.objectID:null
fromJs:null

ObjectId is null and JavaScript call does not return any value.

We are aware about EI/IE problems in past, but any of those does not seem to 
fit here.

Wicket 1.4.1, Flash Player 10, IE 7/8, FF 3.5

Has anyone encountered any similar behavior and/or has found any workaround?
Should I create a Jira issue?


--
Mikko Pukki
Syncron Tech Oy
Laserkatu 6
53850 Lappeenranta
+358 400 757 178


-
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: Flash/ExternalInterface does not work in IE if movie is fetched via Wicket/Ajax

2009-09-07 Thread Heikki Uotinen
There is a problem with IE/ExternalInterface if movie is added to DOM f.ex 
appendChild
JavaScript functions are called but they do not return any value.

This is clearly MS problem but could IE specific function in wicket-ajax.js be 
adjusted somehow ?

Simple test case has

var flashMovie = 'OBJECT id=testId codeBase=http://fpdownload..

// Works in IE and FF
document.getElementById(testdiv).innerHTML = flashMovie;

// ExternalInterface.call calls JS but does not return value in IE. 
Works in FF
var tempDiv = document.createElement(div);
tempDiv.innerHTML = flashMovie;
document.body.appendChild(tempDiv);

Here is complete code (ajax.swf can be found in zip files)

http://pastebin.com/fbc0aa9a

Here is AS3 code in ajax.fla

http://pastebin.com/d4efd47b


-Heikki

-Original Message-
From: Mikko Pukki [mailto:mikko.pu...@syncrontech.com] 
Sent: 4. syyskuuta 2009 15:33
To: users@wicket.apache.org
Subject: Flash/ExternalInterface does not work in IE if movie is fetched via 
Wicket/Ajax

Hi,

This example demonstrates that ExternalInterface fails with IE only if movie is 
fetched via Wicket/Ajax.

ajaxtest.zip:
(http://download.syncrontech.com/public/ajaxtest.zip)

Page first.html fetches second.html page via Ajax. Second.html has Flash 
movie
that calls JavaScript methods with ExternalInterface and produces output
Start...
ExternalInterface.available:true
ExternalInterface.objectID:testId
fromJs:text from js (first.html)

This works both FF 3.5 and IE 7/IE8


quickstart_noname.zip:
(http://download.syncrontech.com/public/quickstart_noname.zip)

Same demonstration with wicket. This fails with IE

Start...
ExternalInterface.available:true
ExternalInterface.objectID:null
fromJs:null

ObjectId is null and JavaScript call does not return any value.

We are aware about EI/IE problems in past, but any of those does not seem to 
fit here.

Wicket 1.4.1, Flash Player 10, IE 7/8, FF 3.5

Has anyone encountered any similar behavior and/or has found any workaround?
Should I create a Jira issue?


--
Mikko Pukki
Syncron Tech Oy
Laserkatu 6
53850 Lappeenranta
+358 400 757 178


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


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



RE: How to Show Error Of Page In Deployment MOde

2009-02-24 Thread Heikki Uotinen
Maybe this helps

http://www.nabble.com/How-to-catch-the-error-in-custome-error-page--td9645296.html


-Heikki

-Original Message-
From: carlo c [mailto:carlo.camer...@gmail.com] 
Sent: 25. helmikuuta 2009 7:16
To: users@wicket.apache.org
Subject: How to Show Error Of Page In Deployment MOde


hi everyone,

I know that this might sound a little strange. but i need to be able to show
the error of 
the system even during deployment mode. I have to show them the stacktrace.

The Thing that's preventing us from using development mode is that the
application 
always gets an outofmemoryerror when deployed on websphere.

It just shwo internal error.

Is there a way that I can override this behavior?

carlo
-- 
View this message in context: 
http://www.nabble.com/How-to-Show-Error-Of-Page-In-Deployment-MOde-tp22196513p22196513.html
Sent from the Wicket - User 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


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



RE: textfield to take only numnbers

2009-01-29 Thread Heikki Uotinen
Pass the field type in the TextField's constructor

http://wicketstuff.org/wicket13/compref/?wicket:bookmarkablePage=:org.apache.wicket.examples.compref.TextFieldPage


-Heikki

-Original Message-
From: miro [mailto:miroconn...@yahoo.com] 
Sent: 29. tammikuuta 2009 17:52
To: users@wicket.apache.org
Subject: textfield to take only numnbers


I s there  any textfield which  takes only numbers, I dont want user to enter
letters only numbers so I want a textfield which  takes only numbers is
there any such  textfield ? 
-- 
View this message in context: 
http://www.nabble.com/textfield-to--take-only-numnbers-tp21729554p21729554.html
Sent from the Wicket - User 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


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



RE: How to get DropDownChoice value without commit form?

2008-12-30 Thread Heikki Uotinen
Override method wantOnSelectionChangedNotifications :

dropDownChoice = new DropDownChoice...{

@Override
protected boolean wantOnSelectionChangedNotifications() {
return true;
}

@Override
protected void onSelectionChanged(Object newSelection) {
...
}

-Heikki

-Original Message-
From: wch2001 [mailto:wch2...@hotmail.com] 
Sent: 30. joulukuuta 2008 9:59
To: users@wicket.apache.org
Subject: How to get DropDownChoice value without commit form?


Dear all,

I have a project to have year dropdown choice  (2008,2009, 2010 and so on),
I need its value after it changed but b4 commit the form. How can i do ?

thanks,

Wch2001
-- 
View this message in context: 
http://www.nabble.com/How-to-get-DropDownChoice-value-without-commit-form--tp21214143p21214143.html
Sent from the Wicket - User 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


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



RE: feedback message without a form

2008-12-30 Thread Heikki Uotinen
Refresh feedback panel after setting the message:


final FeedbackPanel feedback = new FeedbackPanel (feedback);
feedback.setOutputMarkupId(true);
add(feedback);

public void onClick(AjaxRequestTarget target) {
if(assignProgramsDTO.getGrantsAssigned().size()==0){
getPage().error(Please assing grants);
target.addComponent(feedback);
return;
}
...


-Heikki

-Original Message-
From: Vance Fellers [mailto:nvfellers...@yahoo.com] 
Sent: 30. joulukuuta 2008 21:38
To: users@wicket.apache.org
Subject: Re: feedback message without a form


Have you tried without redirecting to the response page?

miro wrote:
 
 here is my code
 
   public void onClick(AjaxRequestTarget target) {
   if(assignProgramsDTO.getGrantsAssigned().size()==0){
   getPage().error(Please assing grants);
   return;
   }
   
 getStgAuditProcessService().startProcess(assignProgramsDTO);
   setResponsePage(HomePage.class);
   setRedirect(true);
   }
 
 
 miro wrote:
 
 yes 
 
 jWeekend wrote:
 
 Did you add a FeedbackPanel to your page?
 
 Regards - Cemal
  http://www.jWeekend.co.uk jWeekend 
 
 
 
 miro wrote:
 
 adding message is simple but how  to display this message , who is
 rendering the added message ?,
 in my case I am adding the message to the page , getPage().info(This
 is a test message )   , now what in html i have to do to display this
 message ?
 
 James Carman-3 wrote:
 
 Component.info(String message)?
 
 On Mon, Dec 29, 2008 at 12:24 PM, miro miroconn...@yahoo.com wrote:

 How to add feed back messages to page with out a form ,
 in my case  when the link is clicked I call some external service and
 that
 might return me some message   and I want to show this message as a
 feedback
 message
 --
 View this message in context:
 http://www.nabble.com/feedback-message-without-a-form-tp21206285p21206285.html
 Sent from the Wicket - User 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


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

-- 
View this message in context: 
http://www.nabble.com/feedback-message-without-a-form-tp21206285p21222096.html
Sent from the Wicket - User 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


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



RE: Dynamically show and edit a textarea in a table

2008-12-28 Thread Heikki Uotinen
Hi,

if you put extra div around textarea and add it to the target it should work


final TextArea rejectComment2 = new TextArea(rejectComment2, new 
Model(aaa));
rejectComment2.setEnabled(false);
rejectComment2.setVisible(false);
rejectComment2.setOutputMarkupId(true);

final WebMarkupContainer rejectComment2Div = new 
WebMarkupContainer(rejectComment2Div);
rejectComment2.setOutputMarkupId(true);

final AjaxFallbackLink enableRejectComment = new 
AjaxFallbackLink(enableRejectComment, new Model(
Enable comment textarea )) {

@Override
public void onClick(AjaxRequestTarget target)
{
rejectComment2.setEnabled(true);
rejectComment2.setVisible(true);
target.addComponent(rejectComment2Div);
log.debug(AjaxFallbackLink  onClick);
}
};

item.add(rejectComment1);

rejectComment2Div.add(rejectComment2);
item.add(rejectComment2Div);



-Heikki


-Original Message-
From: Claudio Miranda [mailto:clau...@claudius.com.br] 
Sent: 29. joulukuuta 2008 3:50
To: users@wicket.apache.org
Subject: Re: Dynamically show and edit a textarea in a table


To let you know, the AjaxEditableMultiLineLabel.onEdit and
AjaxFallbackLink.onClick are called and debug messages logged.

Tried with wicket 1.3.5, same results, no textarea displayed.



Claudio Miranda wrote:
 
 I need to dynamically show a textarea in a row of a table. 
 The textarea should only be displayed if the user wants to, as he needs to
 click at some link.
 I developed 2 tests using an AjaxEditableMultiLineLabel and a not visible
 textarea. See the runnable code below, to take a look at.
 
 The wicket id is: rejectComment1 and rejectComment2
 
 HTML Code (lines 53 and 60,61)
 http://pastebin.com/m2492afac
 
 Java Code (lines 33 and 48)
 http://pastebin.com/m490aa72b
 
 But none of them works!
 
 If I click at any of them, the textarea is not displayed.
 
 Are there issues to use them inside a table ?
 
 My system: 
 Wicket 1.4 RC1
 Firefox 3.0.4
 Glassfish v2 ur2
 Java 6 u11
 


-
Claudio Miranda
http://weblogs.java.net/blog/claudio
http://www.claudius.com.br/blog
-- 
View this message in context: 
http://www.nabble.com/Dynamically-show-and-edit-a-textarea-in-a-table-tp21197799p21198096.html
Sent from the Wicket - User 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


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



RE: Assigning an Action to an onClick handler

2008-12-18 Thread Heikki Uotinen
Maybe

MetaDataRoleAuthorizationStrategy.authorize(link3, Component.ENABLE, ADMIN);

-Heikki

-Original Message-
From: Arie Fishler [mailto:arie@gmail.com] 
Sent: 18. joulukuuta 2008 16:08
To: users@wicket.apache.org
Subject: Assigning an Action to an onClick handler

We are using the AnnotationsRoleAuthorizationStrategy class and place
@AuthorizeInstantiation(ROLE_USER) on restricted Wicket pages.

We need finer-grained authorisation control - we have a class that has 3
AjaxLinks each with their own onClick() handler.  2 of the onClick()
handlers are accessible to everyone but 1 requires an authorised user.  We
have seen it's possible to define a
*org.apache.wicket.authorization.Action*class and allocate it to a
given role BUT how do we associate the given
*Action *to the given onClick() handler?

Many thanks
Arie

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



Re: Assigning an Action to an onClick handler

2008-12-18 Thread Heikki Uotinen
Maybe something like

MetaDataRoleAuthorizationStrategy.authorize(link3, Component.ENABLE, ADMIN);

-Heikki

-Original Message-
From: Arie Fishler [mailto:arie@gmail.com] 
Sent: 18. joulukuuta 2008 16:08
To: users@wicket.apache.org
Subject: Assigning an Action to an onClick handler

We are using the AnnotationsRoleAuthorizationStrategy class and place
@AuthorizeInstantiation(ROLE_USER) on restricted Wicket pages.

We need finer-grained authorisation control - we have a class that has 3
AjaxLinks each with their own onClick() handler.  2 of the onClick()
handlers are accessible to everyone but 1 requires an authorised user.  We
have seen it's possible to define a
*org.apache.wicket.authorization.Action*class and allocate it to a
given role BUT how do we associate the given
*Action *to the given onClick() handler?

Many thanks
Arie

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