Ajax-Panel Toggling Visibility

2010-08-06 Thread Niv

Hi 

I got an issue with making a panel visible via Ajax. I had a look at the
following link to refer and I seemed to have done all that was mentioned out
there.

http://apache-wicket.1842946.n4.nabble.com/Panel-setVisible-in-Ajax-call-td1861998.html#a1861998



When i first create the panel, I set it like this

searchResults.setOutputMarkupPlaceholderTag(true);
searchResults.setVisible(false);

Then when user clicked the Ajax button/link

I compute the resultList that must be updated on the searchResults and then
do the following:

onSearch(AjaxRequestTarget target){
  searchResults = new SearchResults(id,list); //- Not sure if this is the
correct way to refresh a ListView...
  searchResults.setOutputMarkupPlaceholderTag(true);
  searchResults.setVisible(true); // - Setting it to true
  target.addComponent(searchResults);
}

There is no exception being thrown. On the Ajax debug window I get the
following.I don't see the markup being refreshed.

INFO: focus removed from 
INFO: focus set on test11
INFO:
INFO: Initiating Ajax GET request on
?wicket:interface=:4:searchPanel:searchForm:test::IBehaviorListener:0:random=0.6959895812032867
INFO: Invoking pre-call handler(s)...
INFO: focus removed from test11
INFO: Received ajax response (69 characters)
INFO:
?xml version=1.0 encoding=UTF-8?ajax-response/ajax-response
INFO: Response parsed. Now invoking steps...
INFO: Response processed successfully.
INFO: Invoking post-call handler(s)...
INFO: refocus last focused component not needed/allowed
INFO: focus set on test11
INFO: focus removed from test11


Any thoughts?

Thank
Niv

-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Ajax-Panel-Toggling-Visibility-tp2316018p2316018.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



Re: Ajax-Panel Toggling Visibility

2010-08-06 Thread Niv

Hi

 I think I failed to explicitly mention that the panel is not being made
visible even though the code to setVisible is executed.

Thanks
niv
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Ajax-Panel-Toggling-Visibility-tp2316018p2316020.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



Re: Ajax-Panel Toggling Visibility

2010-08-06 Thread Wilhelmsen Tor Iver
   searchResults = new SearchResults(id,list); //- Not sure if this
 is the
 correct way to refresh a ListView...

It's not. Creating a new object like this will defeat the logic because it has 
not been added to the hierarchy that the Ajax call expects.

What you want to do is to modify the *model* of the result, then tell it to 
repaint. For repeaters (like ListView) where the markup is used multiple times 
and the real wicket id is something completely different than what you may 
think, you also want to put a wrapper in the form of a WebMarkupContainer 
around the repeater and then use that for visibility and Ajax updates.

- Tor Iver

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



Tomcat 7 stylesheet problem

2010-08-06 Thread PDiefent

Hello,
I tried to start my Wicket application with the new Tomcat 7.0.0 release and
got a problem with the stylesheet path:

Source HTML:
?xml version=1.0 encoding=UTF-8?
html xmlns=http://www.w3.org/1999/xhtml;
xmlns:wicket=http://wicket.apache.org/dtds.data/wicket-xhtml1.4-strict.dtd;
xml:lang=en lang=en
head
meta http-equiv=Content-Type 
content=text/html;charset=UTF-8/meta
meta http-equiv=cache-control content=no-cache,no-store/meta
meta http-equiv=pragma content=no-cache,no-store/meta
meta http-equiv=expires content=-1/meta
titleWicketTest/title
link rel=stylesheet type=text/css 
href=styles/tabStyles.css/link
/head

body
div wicket:id=tabs class=tabpanel [tab panel]/div
/body
/html

Browser HTML:
?xml version=1.0 encoding=UTF-8?
html xmlns=http://www.w3.org/1999/xhtml;
xmlns:wicket=http://wicket.apache.org/dtds.data/wicket-xhtml1.4-strict.dtd;
xml:lang=en lang=en
head
meta http-equiv=Content-Type 
content=text/html;charset=UTF-8/meta
meta http-equiv=cache-control content=no-cache,no-store/meta
meta http-equiv=pragma content=no-cache,no-store/meta
meta http-equiv=expires content=-1/meta
titleWicketTest/title
link rel=stylesheet type=text/css
href=../styles/tabStyles.css/link

The relative Path styles/tabStyles.css is changed to
../styles/tabStyles.css. In Tomcat 5 and 6 relaeses it works fine ...

Any Ideas?
Thanks, Peter
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Tomcat-7-stylesheet-problem-tp2316068p2316068.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



Re: Ajax-Panel Toggling Visibility

2010-08-06 Thread Nivedan Nadaraj
Hi

Thank's for correcting me on how to update the ListView, nicely explained.


1. I am able to view the results panel now.

2. I have made change in the following way to update the list by updating
the model.

Added a WebMarkupContainer and wrapped the ListView within it.
The visibility is applied now only on the WebMarkupContainer that wraps the
list.


So now, I update the model and call
this.setModelObject(updatedModelInstance);,

But now I can see only the header of the Listiview being rendered and the
actual data/repeated items are blank... is not re-painted. The markup on the
ajax response has the following:


*INFO: *Received ajax response (723 characters)
*INFO: *
?xml version=1.0 encoding=UTF-8?ajax-responsecomponent
id=resultListContainer13 ![CDATA[div id=resultListContainer13

div
table width=0% cellspacing=0/table
table width=100% cellspacing=0 class=dataview
tr
th width=5%nbsp;/th
th width=15%First Name/th

th width=5%nbsp;/th
th width=15%label for=MiddleNameMiddle Name/label/th

th width=5%nbsp;/th
th width=15%label for=LastNameLast Name/label/th

th width=5%nbsp;/th
th width=15%nbsp;
/th
/tr

The content is not rendered, now why would that happen? Does it need to
invoke a method on the result list panel to render the contents? Now am
thinking should i add a wrapper WebMarkupContainer for the PageableListView
as well? So Ajax can re-paint it?

Thanks for the time,

Reg
Niv


On Fri, Aug 6, 2010 at 4:14 PM, Wilhelmsen Tor Iver toriv...@arrive.nowrote:

searchResults = new SearchResults(id,list); //- Not sure if this
  is the
  correct way to refresh a ListView...

 It's not. Creating a new object like this will defeat the logic because it
 has not been added to the hierarchy that the Ajax call expects.

 What you want to do is to modify the *model* of the result, then tell it to
 repaint. For repeaters (like ListView) where the markup is used multiple
 times and the real wicket id is something completely different than what
 you may think, you also want to put a wrapper in the form of a
 WebMarkupContainer around the repeater and then use that for visibility and
 Ajax updates.

 - Tor Iver

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




Re: BIRT Wicket Integration

2010-08-06 Thread Ernesto Reinaldo Barreiro
Sylvia,

On the article on the dzone you have

options.setOutputStream(os);

Where os is an OutputStream. What stop you from creating a
ByteArrayOutputString and do the same as above? The you could use it
to retrieve the bytes.

Ernesto


On Thu, Aug 5, 2010 at 8:53 PM, sylvia sylvia.fronc...@gmail.com wrote:

 I can't get the outputstream from the BIRT code to give to the getBytes
 method. Thanks though. I will see if I can render the BIRT report  a
 different way.
 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/BIRT-Wicket-Integration-tp2315184p2315458.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: Ajax-Panel Toggling Visibility

2010-08-06 Thread Nivedan Nadaraj
I initalised the ListView with some data and now when i click the search
ajax button it renders the header and content that the list was first at the
time of construction initialised with.
However, as part of onSearch click i do update the list and set the model.
This new data is not being rendered.

Could it be a model issue?
Could it be to do with something extra to take care of updating the
repeatable list. I also looked at the following link

 https://cwiki.apache.org/WICKET/how-to-repaint-a-listview-via-ajax.html

I have followed pretty much everything necessary for wrapping the list
control and hide and unhide. The only this is I do not use the

AjaxSelfUpdatingTimerBehavior and LoadableDetachableModel. I don't
think this is causing the issue.


Any thoughts to help?

Cheers
Niv



On Fri, Aug 6, 2010 at 5:12 PM, Nivedan Nadaraj shravann...@gmail.comwrote:

 Hi

 Thank's for correcting me on how to update the ListView, nicely explained.


 1. I am able to view the results panel now.

 2. I have made change in the following way to update the list by updating
 the model.

 Added a WebMarkupContainer and wrapped the ListView within it.
 The visibility is applied now only on the WebMarkupContainer that wraps the
 list.


 So now, I update the model and call
 this.setModelObject(updatedModelInstance);,

 But now I can see only the header of the Listiview being rendered and the
 actual data/repeated items are blank... is not re-painted. The markup on the
 ajax response has the following:


 *INFO: *Received ajax response (723 characters)
 *INFO: *
 ?xml version=1.0 encoding=UTF-8?ajax-responsecomponent 
 id=resultListContainer13 ![CDATA[div id=resultListContainer13

 div
 table width=0% cellspacing=0/table
 table width=100% cellspacing=0 class=dataview
 tr
 th width=5%nbsp;/th
 th width=15%First Name/th

 th width=5%nbsp;/th

 th width=15%label for=MiddleNameMiddle Name/label/th

 th width=5%nbsp;/th
 th width=15%label for=LastNameLast Name/label/th

 th width=5%nbsp;/th
 th width=15%nbsp;
 /th
 /tr

 The content is not rendered, now why would that happen? Does it need to
 invoke a method on the result list panel to render the contents? Now am
 thinking should i add a wrapper WebMarkupContainer for the PageableListView
 as well? So Ajax can re-paint it?

 Thanks for the time,

 Reg
 Niv



 On Fri, Aug 6, 2010 at 4:14 PM, Wilhelmsen Tor Iver toriv...@arrive.nowrote:

searchResults = new SearchResults(id,list); //- Not sure if this
  is the
  correct way to refresh a ListView...

 It's not. Creating a new object like this will defeat the logic because it
 has not been added to the hierarchy that the Ajax call expects.

 What you want to do is to modify the *model* of the result, then tell it
 to repaint. For repeaters (like ListView) where the markup is used multiple
 times and the real wicket id is something completely different than what
 you may think, you also want to put a wrapper in the form of a
 WebMarkupContainer around the repeater and then use that for visibility and
 Ajax updates.

 - Tor Iver

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





Re: Add/Remove Dynamic FormComponent In RepeatingView

2010-08-06 Thread Duy Do
Thanks a lot for your helps, Martin. I will give it a try.

On Fri, Aug 6, 2010 at 12:14 PM, Martin Makundi 
martin.maku...@koodaripalvelut.com wrote:

 Use a reusemanager that manages the rawinput values.

 public class FormComponentReuseManager implements Serializable {
  private final MapObject, MapString, Component idMapRow = new
 HashMapObject, MapString, Component();


  /**
   * @param S
   * @param T
   * @param rowId
   * @param componentId
   * @param newComponent
   * @return FormComponent
   */
  @SuppressWarnings(unchecked)
  public S, T extends FormComponentS T rememberOrReuse(Object
 rowId, String componentId, T newComponent) {
return (T) rememberOrReuse(rowId, componentId, (Component)
 newComponent);
  }


  /**
   * @param T
   * @param rowId
   * @param newComponent
   * @return FormComponent
   */
  public T extends Component T rememberOrReuse(Object rowId, T
 newComponent) {
return rememberOrReuse(rowId, newComponent.getId(), newComponent);
  }
  /**
   * @param T
   * @param rowId
   * @param componentId
   * @param newComponent
   * @return FormComponent
   */
  public T extends Component T rememberOrReuse(Object rowId, String
 componentId, T newComponent) {
MapString, Component rowMap = createOrReuse(rowId);

@SuppressWarnings(unchecked)
T existingComponent = (T) rowMap.get(componentId);

if (newComponent instanceof FormComponent) {
  // Never reuse the component itself, just reuse the
  rowMap.put(componentId, newComponent);

  if (existingComponent != null) {
WicketUtils.fakeRawInput((FormComponent?)newComponent,
 (FormComponent?)existingComponent);
// Transfer also the error messages
for (FeedbackMessage feedbackMessage :
 Session.get().getFeedbackMessages().messages(new
 ComponentFeedbackMessageFilter(existingComponent))) {
  WicketUtils.replaceReporter(feedbackMessage,
 (FormComponent?) newComponent);
}
  }

  return newComponent;
}

// else
if (existingComponent == null) {
  rowMap.put(componentId, newComponent);
  return newComponent;
}

// else
return existingComponent;
  }

  /**
   * @param rowId
   * @return MapString, FormComponent
   */
  private MapString, Component createOrReuse(Object rowId) {
MapString, Component rowMap = idMapRow.get(rowId);

if ((rowMap == null)  (rowId instanceof AbstractDTO) 
 (((AbstractDTO) rowId).getId() != null)) {
  rowId = ((AbstractDTO) rowId).getId();
  rowMap = idMapRow.get(rowId);
}

if (rowMap == null) {
  rowMap = new HashMapString, Component();
  idMapRow.put(rowId, rowMap);
}

return rowMap;
  }

  /**
   *
   */
  public void clear() {
idMapRow.clear();
  }

  /**
   * @param S
   * @param T
   * @param key
   * @param formComponent
   * @param behaviors
   * @return T
   */
  public S, T extends FormComponentS T
 rememberOrReuseAndProvideFeedback(
  Object key, T formComponent, IBehavior... behaviors) {
return rememberOrReuseAndProvideFeedback(key,
 formComponent.getId(), formComponent, behaviors);
  }
  /**
   * @param S
   * @param T
   * @param key
   * @param id
   * @param formComponent
   * @param behaviors
   * @return T
   */
  public S, T extends FormComponentS T
 rememberOrReuseAndProvideFeedback(
  Object key, String id, T formComponent, IBehavior... behaviors) {
formComponent.add(behaviors);
formComponent.setOutputMarkupId(true);
return rememberOrReuse(key, id, FeedbackStyler.add(formComponent));
  }
 }


 **
 Martin

 2010/8/6 Duy Do doquoc...@gmail.com:
  Hi all,
 
  For the moment I can add/remove a form component in RepeatingView on the
  fly, but every time I add or remove a form component, the model values of
  previous form component are lost. How can I keep them in RepeatingView?
 
  Thanks,
  Duy
 

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




RE: Tomcat 7 stylesheet problem

2010-08-06 Thread Alex Rass
Try posting that in the Tomcat forums. 7 is still an early beta. Could be
just a bug or a config issue.

- Alex

-Original Message-
From: PDiefent [mailto:pdief...@csc.com] 
Sent: Friday, August 06, 2010 4:57 AM
To: users@wicket.apache.org
Subject: Tomcat 7 stylesheet problem


Hello,
I tried to start my Wicket application with the new Tomcat 7.0.0 release and
got a problem with the stylesheet path:

Source HTML:
?xml version=1.0 encoding=UTF-8?
html xmlns=http://www.w3.org/1999/xhtml;
xmlns:wicket=http://wicket.apache.org/dtds.data/wicket-xhtml1.4-strict.dtd;
xml:lang=en lang=en
head
meta http-equiv=Content-Type
content=text/html;charset=UTF-8/meta
meta http-equiv=cache-control content=no-cache,no-store/meta
meta http-equiv=pragma content=no-cache,no-store/meta
meta http-equiv=expires content=-1/meta
titleWicketTest/title
link rel=stylesheet type=text/css
href=styles/tabStyles.css/link
/head

body
div wicket:id=tabs class=tabpanel [tab panel]/div
/body
/html

Browser HTML:
?xml version=1.0 encoding=UTF-8?
html xmlns=http://www.w3.org/1999/xhtml;
xmlns:wicket=http://wicket.apache.org/dtds.data/wicket-xhtml1.4-strict.dtd;
xml:lang=en lang=en
head
meta http-equiv=Content-Type
content=text/html;charset=UTF-8/meta
meta http-equiv=cache-control content=no-cache,no-store/meta
meta http-equiv=pragma content=no-cache,no-store/meta
meta http-equiv=expires content=-1/meta
titleWicketTest/title
link rel=stylesheet type=text/css
href=../styles/tabStyles.css/link

The relative Path styles/tabStyles.css is changed to
../styles/tabStyles.css. In Tomcat 5 and 6 relaeses it works fine ...

Any Ideas?
Thanks, Peter
-- 
View this message in context:
http://apache-wicket.1842946.n4.nabble.com/Tomcat-7-stylesheet-problem-tp231
6068p2316068.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



SV: Ajax-Panel Toggling Visibility

2010-08-06 Thread Wilhelmsen Tor Iver
 this.setModelObject(updatedModelInstance);

Are you sure you do not mean setModel() instead of setModelObject() here?

Also, look into whether you use setReuseItems(true) on the listview, then you 
probably want modelChanged() somewhere too.

- Tor Iver

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



Re: Tomcat 7 stylesheet problem

2010-08-06 Thread Thies Edeling
It's an odd thing with Tomcat. Do you have an index.html or index.jsp in 
your root dir? Remove that and suddenly it works.


See the comments in https://issues.apache.org/jira/browse/WICKET-1205
On 08/06/2010 10:57 AM, PDiefent wrote:

Hello,
I tried to start my Wicket application with the new Tomcat 7.0.0 release and
got a problem with the stylesheet path:

Source HTML:
?xml version=1.0 encoding=UTF-8?
html xmlns=http://www.w3.org/1999/xhtml;
xmlns:wicket=http://wicket.apache.org/dtds.data/wicket-xhtml1.4-strict.dtd;
xml:lang=en lang=en
head
meta http-equiv=Content-Type 
content=text/html;charset=UTF-8/meta
meta http-equiv=cache-control content=no-cache,no-store/meta
meta http-equiv=pragma content=no-cache,no-store/meta
meta http-equiv=expires content=-1/meta
titleWicketTest/title
link rel=stylesheet type=text/css 
href=styles/tabStyles.css/link
/head

body
div wicket:id=tabs class=tabpanel[tab panel]/div
/body
/html

Browser HTML:
?xml version=1.0 encoding=UTF-8?
html xmlns=http://www.w3.org/1999/xhtml;
xmlns:wicket=http://wicket.apache.org/dtds.data/wicket-xhtml1.4-strict.dtd;
xml:lang=en lang=en
head
meta http-equiv=Content-Type 
content=text/html;charset=UTF-8/meta
meta http-equiv=cache-control content=no-cache,no-store/meta
meta http-equiv=pragma content=no-cache,no-store/meta
meta http-equiv=expires content=-1/meta
titleWicketTest/title
link rel=stylesheet type=text/css
href=../styles/tabStyles.css/link

The relative Path styles/tabStyles.css is changed to
../styles/tabStyles.css. In Tomcat 5 and 6 relaeses it works fine ...

Any Ideas?
Thanks, Peter
   




back link

2010-08-06 Thread Alex Rass
Hi.

Here's a cooky-wacky problem:

Added this to my markup:
a href=# onClick=history.go(-1) class=backbuttonBack/a

But when I am running this under the wicket (w/ FFox),  it works great once.
Then it starts jumping me back to this page after I leave it.

Is there something I should be doing differently to create a back button? :)
I know this is an HTML/JS question, but this is a typical thing to do in
HTML and it usually works, afaik.

- Alex


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



Re: back link

2010-08-06 Thread Leszek Gawron

On 2010-08-06 13:44, Alex Rass wrote:

Hi.

Here's a cooky-wacky problem:

Added this to my markup:
a href=# onClick=history.go(-1) class=backbuttonBack/a

But when I am running this under the wicket (w/ FFox),  it works great once.
Then it starts jumping me back to this page after I leave it.

Is there something I should be doing differently to create a back button? :)
I know this is an HTML/JS question, but this is a typical thing to do in
HTML and it usually works, afaik.


this might be the typical way but probably the worst ever ...

You are better of with something like this :

public class OriginatingPage extends WebPage {
  public OriginatingPage() {
 add( new Link( targetPage ) {
   public void onClick() {
 setResponsePage( new TargetPage( new SomeModel(),
  OriginatingPage.this );
   }
 }
  }
}


public class TargetPage extends WebPage {
  public TargetPage( IModel? model, final Page returnPage ) {
super( model );
add( new Link( back ) {
  public void onClick() {
setResponsePage( returnPage );
  }
}
  }
}


You can use analogous technique for panel replacement.

this way it always 100% predictable (and BTW works when javascript is 
not available: javascript turned off, dummy browsers on mobile devices).


--
Leszek Gawron http://www.mobilebox.pl/krs.html
CTO at MobileBox Ltd.

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



SV: back link

2010-08-06 Thread Wilhelmsen Tor Iver
public TargetPage( IModel? model, final Page returnPage ) {

You should use PageReference objects instead to avoid issues with serialization.

- Tor Iver

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



Portlets in Liferay 5.2.3 - 6.0.4

2010-08-06 Thread Wilhelmsen Tor Iver
We have some Wicket portlets that work fine in the Glassfish 2.1 + Liferay 
5.2.3 combination, but fail in the more modern Glassfish 3.0.1 + Liferay 6.0.4 
combo. What happens is that all requests always lead to a new (view or edit) 
page being constructed while in the old framework the portlet used the existing 
page from the session.

Have there been any changes anyone are aware of regarding request handling? We 
use Wicket 1.4.8 currently.

Med vennlig hilsen

TOR IVER WILHELMSEN
Senior systemutvikler
Arrive AS
T (+47) 48 16 06 18
E-post: toriv...@arrive.no
http://www.arrive.no
http://servicedesk.arrive.no





Re: FormComponentPanel and list edit

2010-08-06 Thread Joseph Pachod
hi

  
   ListContact convertedInput ;
  
   public void convertInput(){
ListContact list= new ArrayListContact()
// how to compose the list ?
  listeditor.convertinput();
 setConvertedInput(listeditor.getconvertedinput());
  
  -igorlisteditor isn't a FormComponent, so there's no convertinput to call in 
it. That's the core of the issue in fact.

++
joseph


AutoCompleteTextField and long result list in WebKit browsers

2010-08-06 Thread Thomas Gier

Hi,

I have problems with long result lists for an AutoCompleteTextField in 
WebKit-based browsers. We're using wicket 1.4.0.


If the bottom of a result is outside the browser's viewport and you 
scroll down so that now the text field itself is outside the view port, 
a selected list entry is not copied over to the text field when 
selecting with the mouse. Keyboard selection does work though.


Any ideas?


Cheers
Thomas Gier



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



Re: AutoCompleteTextField and long result list in WebKit browsers

2010-08-06 Thread Martin Grigorov
Try with newer Wicket. It could be fixed already.

On Fri, Aug 6, 2010 at 3:33 PM, Thomas Gier thomas.g...@qleo.de wrote:

 Hi,

 I have problems with long result lists for an AutoCompleteTextField in
 WebKit-based browsers. We're using wicket 1.4.0.

 If the bottom of a result is outside the browser's viewport and you scroll
 down so that now the text field itself is outside the view port, a selected
 list entry is not copied over to the text field when selecting with the
 mouse. Keyboard selection does work though.

 Any ideas?


 Cheers
 Thomas Gier



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




Re: Encrypt Form Fields Using JS

2010-08-06 Thread MZemeck
I should make it clear, the intention is to use SSL and JS one-way hash, 
not just JS...




Jeremy Thomerson jer...@wickettraining.com 
08/03/2010 03:49 PM
Please respond to
users@wicket.apache.org


To
users@wicket.apache.org
cc

Subject
Re: Encrypt Form Fields Using JS






On Tue, Aug 3, 2010 at 1:24 PM, mzem...@osc.state.ny.us wrote:

 I have to laugh because I also agree its kind of crazy...

 Yes the original value must be hashed by the client.  The reasoning 
being
 that SSL could be broken and expose the data.  I don't necessarily agree
 but thats how the original system was written.


Client side JavaScript can certainly be broken *MUCH* easier than SSL.
 Perhaps the following reference [1] will help you resolve this situation 
:)

1 -
http://jobsearch.monster.com/PowerSearch.aspx?tjt=Programmerwhere=New%20York



-- 
Jeremy Thomerson
http://www.wickettraining.com





Notice: This communication, including any attachments, is intended solely 
for the use of the individual or entity to which it is addressed. This 
communication may contain information that is protected from disclosure 
under State and/or Federal law. Please notify the sender immediately if 
you have received this communication in error and delete this email from 
your system. If you are not the intended recipient, you are requested not 
to disclose, copy, distribute or take any action in reliance on the 
contents of this information.

Re: Wicket adds jsessionid to redirect onto external page

2010-08-06 Thread MZemeck
On a related note...

The Wicket Strings class provides the method stripJSessionId...
http://wicket.apache.org/apidocs/1.4/org/apache/wicket/util/string/Strings.html#stripJSessionId(java.lang.CharSequence)

And the Wicket SEO wiki provides a way to remove the JSessionId...
https://cwiki.apache.org/WICKET/seo-search-engine-optimization.html

@Override
protected WebResponse newWebResponse(final HttpServletResponse 
servletResponse) {
 return new BufferedWebResponse(servletResponse) {
 @Override
 public CharSequence encodeURL(final 
CharSequence url) {
 final String agent = 
((WebRequest)RequestCycle.get
().getRequest()).getHttpServletRequest().getHeader(User-Agent);

 return isAgent(agent) ? 
url : super.encodeURL(url);
 }
 };
}
Would it be nicer to do something like this...

@Override
protected WebResponse newWebResponse(final HttpServletResponse 
servletResponse) {
 return new BufferedWebResponse(servletResponse) {
 @Override
 public CharSequence encodeURL(final 
CharSequence url) {
 final String agent = 
((WebRequest) RequestCycle.get
().getRequest()).getHttpServletRequest().getHeader(User-Agent);
 CharSequence encodedUrl = 
super.encodeURL(url);
 return isAgent(agent) ? 
Strings.stripJSessionId(encodedUrl) : encodedUrl;
 }
 };
}


I understand why you would want to remove the jsessionid for bots, would 
it be safe to remove the jsessionid for all users to pretty up the urls? 
 What are the implications of this and which method described above would 
be preferred?






Martin Makundi martin.maku...@koodaripalvelut.com 
08/04/2010 02:21 PM
Please respond to
users@wicket.apache.org


To
users@wicket.apache.org
cc

Subject
Re: Wicket adds jsessionid to redirect onto external page






Cool ;)

2010/8/4 Don Ferguson don.fergu...@gmail.com:
 Right, it's really a jetty bug, and looks like it was fixed recently:

 http://dev.eclipse.org/mhonarc/lists/jetty-commit/msg01598.html


 On Aug 4, 2010, at 10:46 AM, Igor Vaynberg wrote:

 afair the servlet spec says all urls have to be passed through that
 method and thats what we do. if its not working the problem is with
 the servlet container.

 -igor

 On Wed, Aug 4, 2010 at 10:39 AM, Martin Makundi
 martin.maku...@koodaripalvelut.com wrote:
 Like a sledgehammer ;)

 But yes, so it's a bug in wicket framework design.

 **
 Martin

 2010/8/4 Don Ferguson don.fergu...@gmail.com:
 Ah, much better than my approach.

 On Aug 4, 2010, at 8:25 AM, Martin Makundi wrote:

 Hi!

 I worked around like this:

((org.mortbay.jetty.Request) ((WebRequest)
 
RequestCycle.get().getRequest()).getHttpServletRequest()).setSessionManager(null);


 **
 Martin

 2010/8/4 Don Ferguson don.fergu...@gmail.com:
 Hi Martin,
 Yes, I've encountered this.  I think it's a bug in WebResponse. 
 The culprit
 is the line:
 url = httpServletResponse.encodeRedirectURL(url);
 The url should only be encoded when redirecting to the originating 
site, but
 the code doesn't check.
 One workaround (short of fixing the bug) is to duplicate the 
functionality
 of WebResponse, commenting out the offending line.  Then use it as 
such:
  getRequestCycle().setResponse(new 
NonEncodingWebResponse((WebResponse)
 getRequestCycle().getResponse()));
 getRequestCycle().setRequestTarget(new
 RedirectRequestTarget(url));
 The source code is attached.


 -Don
 On Aug 4, 2010, at 2:22 AM, Martin Makundi wrote:

 Hi!

 I am doing something wrong? I am using:

   
 getResponse().redirect(getParameterFromRequest(RETURN_PAGE));

 But the URL contains jsessionid. I think this is wrong because the
 target server does not understand the jsessiond and it returns 404
 page not found.

 **
 Martin

 
-
 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: BIRT Wicket Integration

2010-08-06 Thread sylvia

Yes, i was able to re-arrange my code to get to what I needed. Now I'm trying
to get it into a div or panel instead of an iframe. I tried creating a
DocumentDiv, similar to your DocumentInlineFrame and using that, but it
doesn't seem to be working. Is there a limitation on what I can send the
byte array to? Thanks for help.
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/BIRT-Wicket-Integration-tp2315184p2316411.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



Re: AutoCompleteTextField and long result list in WebKit browsers

2010-08-06 Thread Thomas Gier
 same behavior in wicket examples 
http://wicketstuff.org/wicket14/ajax/autocomplete.1



Am 06.08.10 15:56, schrieb Martin Grigorov:

Try with newer Wicket. It could be fixed already.

On Fri, Aug 6, 2010 at 3:33 PM, Thomas Gierthomas.g...@qleo.de  wrote:


Hi,

I have problems with long result lists for an AutoCompleteTextField in
WebKit-based browsers. We're using wicket 1.4.0.

If the bottom of a result is outside the browser's viewport and you scroll
down so that now the text field itself is outside the view port, a selected
list entry is not copied over to the text field when selecting with the
mouse. Keyboard selection does work though.

Any ideas?


Cheers
Thomas Gier



-
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: BIRT Wicket Integration

2010-08-06 Thread sylvia

By the way, i'm just returning html, not the pdf. I have a pdf as a separate
report option. So really I would just like to take the html version of my
report and put it in a div tag. 
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/BIRT-Wicket-Integration-tp2315184p2316437.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



Re: Wicket adds jsessionid to redirect onto external page

2010-08-06 Thread Martin Makundi
Hi!

 And the Wicket SEO wiki provides a way to remove the JSessionId...
 https://cwiki.apache.org/WICKET/seo-search-engine-optimization.html

This particular code does not work for first browser hit.

 I understand why you would want to remove the jsessionid for bots, would
 it be safe to remove the jsessionid for all users to pretty up the urls?

I am stripping the jsessionid from remote redirects, because a
redirect like mywebiste - otherwebsite;jsessionid results in a crash
on the otherwebsite.

Anyways.. this turned out to be jetty bug as described before.


**
Martin




 Martin Makundi martin.maku...@koodaripalvelut.com
 08/04/2010 02:21 PM
 Please respond to
 users@wicket.apache.org


 To
 users@wicket.apache.org
 cc

 Subject
 Re: Wicket adds jsessionid to redirect onto external page






 Cool ;)

 2010/8/4 Don Ferguson don.fergu...@gmail.com:
 Right, it's really a jetty bug, and looks like it was fixed recently:

 http://dev.eclipse.org/mhonarc/lists/jetty-commit/msg01598.html


 On Aug 4, 2010, at 10:46 AM, Igor Vaynberg wrote:

 afair the servlet spec says all urls have to be passed through that
 method and thats what we do. if its not working the problem is with
 the servlet container.

 -igor

 On Wed, Aug 4, 2010 at 10:39 AM, Martin Makundi
 martin.maku...@koodaripalvelut.com wrote:
 Like a sledgehammer ;)

 But yes, so it's a bug in wicket framework design.

 **
 Martin

 2010/8/4 Don Ferguson don.fergu...@gmail.com:
 Ah, much better than my approach.

 On Aug 4, 2010, at 8:25 AM, Martin Makundi wrote:

 Hi!

 I worked around like this:

    ((org.mortbay.jetty.Request) ((WebRequest)

 RequestCycle.get().getRequest()).getHttpServletRequest()).setSessionManager(null);


 **
 Martin

 2010/8/4 Don Ferguson don.fergu...@gmail.com:
 Hi Martin,
 Yes, I've encountered this.  I think it's a bug in WebResponse.
  The culprit
 is the line:
 url = httpServletResponse.encodeRedirectURL(url);
 The url should only be encoded when redirecting to the originating
 site, but
 the code doesn't check.
 One workaround (short of fixing the bug) is to duplicate the
 functionality
 of WebResponse, commenting out the offending line.  Then use it as
 such:
      getRequestCycle().setResponse(new
 NonEncodingWebResponse((WebResponse)
 getRequestCycle().getResponse()));
             getRequestCycle().setRequestTarget(new
 RedirectRequestTarget(url));
 The source code is attached.


 -Don
 On Aug 4, 2010, at 2:22 AM, Martin Makundi wrote:

 Hi!

 I am doing something wrong? I am using:


  getResponse().redirect(getParameterFromRequest(RETURN_PAGE));

 But the URL contains jsessionid. I think this is wrong because the
 target server does not understand the jsessiond and it returns 404
 page not found.

 **
 Martin


 -
 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



 -
 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






 Notice: This communication, including any attachments, is intended solely
 for the use of the individual or entity to which it is addressed. This
 communication may contain information that is protected from disclosure
 under State and/or Federal law. Please notify the sender immediately if
 you have received this communication in error and delete this email from
 your system. If you are not the intended recipient, you are requested not
 to disclose, copy, distribute or take any action in reliance on the
 contents of this information.

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



Re: SV: back link

2010-08-06 Thread Leszek Gawron

On 2010-08-06 14:29, Wilhelmsen Tor Iver wrote:

public TargetPage( IModel?  model, final Page returnPage ) {


You should use PageReference objects instead to avoid issues with serialization.

- Tor Iver

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

AFAIU pages refered in other pages are in fact automatically serialized 
as PageReferences. Am I wrong? Has the serialization magic been removed?


lg

--
Leszek Gawron http://www.mobilebox.pl/krs.html
CTO at MobileBox Ltd.

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



Re: Wicket adds jsessionid to redirect onto external page

2010-08-06 Thread MZemeck
Yes I realize you've solved the jetty issue, but I was posing some 
additional questions relating to jsessionid...

1.  What are the implications of stripping jsessionid for all users...like 
so in app object...
CharSequence encodedUrl = super.encodeURL(url);
return Strings.stripJSessionId(encodedUrl);

1.  What does super.encodeURL(url); do and could the Wicket SEO wiki 
example 
https://cwiki.apache.org/WICKET/seo-search-engine-optimization.html
be modified to use...

CharSequence encodedUrl = super.encodeURL(url);
return isAgent(agent) ? Strings.stripJSessionId(encodedUrl) : encodedUrl;





Martin Makundi martin.maku...@koodaripalvelut.com 
08/06/2010 11:32 AM
Please respond to
users@wicket.apache.org


To
users@wicket.apache.org
cc

Subject
Re: Wicket adds jsessionid to redirect onto external page






Hi!

 And the Wicket SEO wiki provides a way to remove the JSessionId...
 https://cwiki.apache.org/WICKET/seo-search-engine-optimization.html

This particular code does not work for first browser hit.

 I understand why you would want to remove the jsessionid for bots, would
 it be safe to remove the jsessionid for all users to pretty up the 
urls?

I am stripping the jsessionid from remote redirects, because a
redirect like mywebiste - otherwebsite;jsessionid results in a crash
on the otherwebsite.

Anyways.. this turned out to be jetty bug as described before.


**
Martin




 Martin Makundi martin.maku...@koodaripalvelut.com
 08/04/2010 02:21 PM
 Please respond to
 users@wicket.apache.org


 To
 users@wicket.apache.org
 cc

 Subject
 Re: Wicket adds jsessionid to redirect onto external page






 Cool ;)

 2010/8/4 Don Ferguson don.fergu...@gmail.com:
 Right, it's really a jetty bug, and looks like it was fixed recently:

 http://dev.eclipse.org/mhonarc/lists/jetty-commit/msg01598.html


 On Aug 4, 2010, at 10:46 AM, Igor Vaynberg wrote:

 afair the servlet spec says all urls have to be passed through that
 method and thats what we do. if its not working the problem is with
 the servlet container.

 -igor

 On Wed, Aug 4, 2010 at 10:39 AM, Martin Makundi
 martin.maku...@koodaripalvelut.com wrote:
 Like a sledgehammer ;)

 But yes, so it's a bug in wicket framework design.

 **
 Martin

 2010/8/4 Don Ferguson don.fergu...@gmail.com:
 Ah, much better than my approach.

 On Aug 4, 2010, at 8:25 AM, Martin Makundi wrote:

 Hi!

 I worked around like this:

((org.mortbay.jetty.Request) ((WebRequest)

 
RequestCycle.get().getRequest()).getHttpServletRequest()).setSessionManager(null);


 **
 Martin

 2010/8/4 Don Ferguson don.fergu...@gmail.com:
 Hi Martin,
 Yes, I've encountered this.  I think it's a bug in WebResponse.
  The culprit
 is the line:
 url = httpServletResponse.encodeRedirectURL(url);
 The url should only be encoded when redirecting to the originating
 site, but
 the code doesn't check.
 One workaround (short of fixing the bug) is to duplicate the
 functionality
 of WebResponse, commenting out the offending line.  Then use it as
 such:
  getRequestCycle().setResponse(new
 NonEncodingWebResponse((WebResponse)
 getRequestCycle().getResponse()));
 getRequestCycle().setRequestTarget(new
 RedirectRequestTarget(url));
 The source code is attached.


 -Don
 On Aug 4, 2010, at 2:22 AM, Martin Makundi wrote:

 Hi!

 I am doing something wrong? I am using:


  getResponse().redirect(getParameterFromRequest(RETURN_PAGE));

 But the URL contains jsessionid. I think this is wrong because the
 target server does not understand the jsessiond and it returns 404
 page not found.

 **
 Martin


 -
 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



 -
 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






 Notice: This 

Re: Wicket adds jsessionid to redirect onto external page

2010-08-06 Thread Martin Makundi
Hi!

 1.  What are the implications of stripping jsessionid for all users...like
 so in app object...
 CharSequence encodedUrl = super.encodeURL(url);
 return Strings.stripJSessionId(encodedUrl);

As a side effect you will disable session for cookieless connections.

 2.  What does super.encodeURL(url); do and could the Wicket SEO wiki
 example
 https://cwiki.apache.org/WICKET/seo-search-engine-optimization.html
 be modified to use...

 CharSequence encodedUrl = super.encodeURL(url);
 return isAgent(agent) ? Strings.stripJSessionId(encodedUrl) : encodedUrl;

Depends what you want to strip/not-strip... skipping encoding also
strips but I am not sure if there is any other encoding happening...


**
Martin






 Martin Makundi martin.maku...@koodaripalvelut.com
 08/06/2010 11:32 AM
 Please respond to
 users@wicket.apache.org


 To
 users@wicket.apache.org
 cc

 Subject
 Re: Wicket adds jsessionid to redirect onto external page






 Hi!

 And the Wicket SEO wiki provides a way to remove the JSessionId...
 https://cwiki.apache.org/WICKET/seo-search-engine-optimization.html

 This particular code does not work for first browser hit.

 I understand why you would want to remove the jsessionid for bots, would
 it be safe to remove the jsessionid for all users to pretty up the
 urls?

 I am stripping the jsessionid from remote redirects, because a
 redirect like mywebiste - otherwebsite;jsessionid results in a crash
 on the otherwebsite.

 Anyways.. this turned out to be jetty bug as described before.


 **
 Martin




 Martin Makundi martin.maku...@koodaripalvelut.com
 08/04/2010 02:21 PM
 Please respond to
 users@wicket.apache.org


 To
 users@wicket.apache.org
 cc

 Subject
 Re: Wicket adds jsessionid to redirect onto external page






 Cool ;)

 2010/8/4 Don Ferguson don.fergu...@gmail.com:
 Right, it's really a jetty bug, and looks like it was fixed recently:

 http://dev.eclipse.org/mhonarc/lists/jetty-commit/msg01598.html


 On Aug 4, 2010, at 10:46 AM, Igor Vaynberg wrote:

 afair the servlet spec says all urls have to be passed through that
 method and thats what we do. if its not working the problem is with
 the servlet container.

 -igor

 On Wed, Aug 4, 2010 at 10:39 AM, Martin Makundi
 martin.maku...@koodaripalvelut.com wrote:
 Like a sledgehammer ;)

 But yes, so it's a bug in wicket framework design.

 **
 Martin

 2010/8/4 Don Ferguson don.fergu...@gmail.com:
 Ah, much better than my approach.

 On Aug 4, 2010, at 8:25 AM, Martin Makundi wrote:

 Hi!

 I worked around like this:

    ((org.mortbay.jetty.Request) ((WebRequest)


 RequestCycle.get().getRequest()).getHttpServletRequest()).setSessionManager(null);


 **
 Martin

 2010/8/4 Don Ferguson don.fergu...@gmail.com:
 Hi Martin,
 Yes, I've encountered this.  I think it's a bug in WebResponse.
  The culprit
 is the line:
 url = httpServletResponse.encodeRedirectURL(url);
 The url should only be encoded when redirecting to the originating
 site, but
 the code doesn't check.
 One workaround (short of fixing the bug) is to duplicate the
 functionality
 of WebResponse, commenting out the offending line.  Then use it as
 such:
      getRequestCycle().setResponse(new
 NonEncodingWebResponse((WebResponse)
 getRequestCycle().getResponse()));
             getRequestCycle().setRequestTarget(new
 RedirectRequestTarget(url));
 The source code is attached.


 -Don
 On Aug 4, 2010, at 2:22 AM, Martin Makundi wrote:

 Hi!

 I am doing something wrong? I am using:


  getResponse().redirect(getParameterFromRequest(RETURN_PAGE));

 But the URL contains jsessionid. I think this is wrong because the
 target server does not understand the jsessiond and it returns 404
 page not found.

 **
 Martin


 -
 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



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



 -
 To unsubscribe, e-mail: 

Re: Wicket adds jsessionid to redirect onto external page

2010-08-06 Thread MZemeck
As a side effect you will disable session for cookieless connections.

Wouldn't this be desired, ie bots...

Depends what you want to strip/not-strip... skipping encoding also
strips but I am not sure if there is any other encoding happening...

Right, I guess that's my question, what are you losing by not calling 
super.encodeURL(url), but it may not matter because its only omitted for 
bots in the SEO example




Martin Makundi martin.maku...@koodaripalvelut.com 
08/06/2010 12:58 PM
Please respond to
users@wicket.apache.org


To
users@wicket.apache.org
cc

Subject
Re: Wicket adds jsessionid to redirect onto external page






Hi!

 1.  What are the implications of stripping jsessionid for all 
users...like
 so in app object...
 CharSequence encodedUrl = super.encodeURL(url);
 return Strings.stripJSessionId(encodedUrl);

As a side effect you will disable session for cookieless connections.

 2.  What does super.encodeURL(url); do and could the Wicket SEO wiki
 example
 https://cwiki.apache.org/WICKET/seo-search-engine-optimization.html
 be modified to use...

 CharSequence encodedUrl = super.encodeURL(url);
 return isAgent(agent) ? Strings.stripJSessionId(encodedUrl) : 
encodedUrl;

Depends what you want to strip/not-strip... skipping encoding also
strips but I am not sure if there is any other encoding happening...


**
Martin






 Martin Makundi martin.maku...@koodaripalvelut.com
 08/06/2010 11:32 AM
 Please respond to
 users@wicket.apache.org


 To
 users@wicket.apache.org
 cc

 Subject
 Re: Wicket adds jsessionid to redirect onto external page






 Hi!

 And the Wicket SEO wiki provides a way to remove the JSessionId...
 https://cwiki.apache.org/WICKET/seo-search-engine-optimization.html

 This particular code does not work for first browser hit.

 I understand why you would want to remove the jsessionid for bots, 
would
 it be safe to remove the jsessionid for all users to pretty up the
 urls?

 I am stripping the jsessionid from remote redirects, because a
 redirect like mywebiste - otherwebsite;jsessionid results in a crash
 on the otherwebsite.

 Anyways.. this turned out to be jetty bug as described before.


 **
 Martin




 Martin Makundi martin.maku...@koodaripalvelut.com
 08/04/2010 02:21 PM
 Please respond to
 users@wicket.apache.org


 To
 users@wicket.apache.org
 cc

 Subject
 Re: Wicket adds jsessionid to redirect onto external page






 Cool ;)

 2010/8/4 Don Ferguson don.fergu...@gmail.com:
 Right, it's really a jetty bug, and looks like it was fixed recently:

 http://dev.eclipse.org/mhonarc/lists/jetty-commit/msg01598.html


 On Aug 4, 2010, at 10:46 AM, Igor Vaynberg wrote:

 afair the servlet spec says all urls have to be passed through that
 method and thats what we do. if its not working the problem is with
 the servlet container.

 -igor

 On Wed, Aug 4, 2010 at 10:39 AM, Martin Makundi
 martin.maku...@koodaripalvelut.com wrote:
 Like a sledgehammer ;)

 But yes, so it's a bug in wicket framework design.

 **
 Martin

 2010/8/4 Don Ferguson don.fergu...@gmail.com:
 Ah, much better than my approach.

 On Aug 4, 2010, at 8:25 AM, Martin Makundi wrote:

 Hi!

 I worked around like this:

((org.mortbay.jetty.Request) ((WebRequest)


 
RequestCycle.get().getRequest()).getHttpServletRequest()).setSessionManager(null);


 **
 Martin

 2010/8/4 Don Ferguson don.fergu...@gmail.com:
 Hi Martin,
 Yes, I've encountered this.  I think it's a bug in WebResponse.
  The culprit
 is the line:
 url = httpServletResponse.encodeRedirectURL(url);
 The url should only be encoded when redirecting to the 
originating
 site, but
 the code doesn't check.
 One workaround (short of fixing the bug) is to duplicate the
 functionality
 of WebResponse, commenting out the offending line.  Then use it 
as
 such:
  getRequestCycle().setResponse(new
 NonEncodingWebResponse((WebResponse)
 getRequestCycle().getResponse()));
 getRequestCycle().setRequestTarget(new
 RedirectRequestTarget(url));
 The source code is attached.


 -Don
 On Aug 4, 2010, at 2:22 AM, Martin Makundi wrote:

 Hi!

 I am doing something wrong? I am using:


  getResponse().redirect(getParameterFromRequest(RETURN_PAGE));

 But the URL contains jsessionid. I think this is wrong because 
the
 target server does not understand the jsessiond and it returns 
404
 page not found.

 **
 Martin


 -
 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: Wicket adds jsessionid to redirect onto external page

2010-08-06 Thread James Carman
On Fri, Aug 6, 2010 at 1:06 PM,  mzem...@osc.state.ny.us wrote:
 Right, I guess that's my question, what are you losing by not calling
 super.encodeURL(url), but it may not matter because its only omitted for
 bots in the SEO example


You're losing session support for folks who have said they don't want
to allow cookies.

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



Re: Wicket adds jsessionid to redirect onto external page

2010-08-06 Thread Martin Makundi
You don't lose for all fols if you check whether it is a bot or not...

but the question remains.. what else do you strip by skipping
super.encodeUrl except just jsessionid.. some other encoding happening
there?

**
Martin

2010/8/6 James Carman ja...@carmanconsulting.com:
 On Fri, Aug 6, 2010 at 1:06 PM,  mzem...@osc.state.ny.us wrote:
 Right, I guess that's my question, what are you losing by not calling
 super.encodeURL(url), but it may not matter because its only omitted for
 bots in the SEO example


 You're losing session support for folks who have said they don't want
 to allow cookies.

 -
 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



relationship of DAO to IDataProvider and DetachableLoadableModel

2010-08-06 Thread Chris Merrill
I've been away from server-side development for quite a while...working on a 
massively
multi-threaded network-centric Eclipse-based app .  I'm now working on a 
proof-of-concept for the
technology stack for an upcoming project web-based product and am trying to get 
my head around
Wicket, JPA, IOC, dependency injection, etc.

I have the first stage of the prototype together, but I'm not sure I have it 
assembled correctly,
specifically related to DetachableLoadableModel, IDataProvider and 
container-injected entity managers.

I'm using Spring to inject the Entity Manager into my DAO-ish DB logic wrapper 
(AppDAO).

There is a ItemsPage that lists items from a database table using a DataView 
with a
SortableItemProvider (SortableDataProviderItem) and a PagingNavigator.  It 
also has a member
AppDAO that is a @SpringBean. The page uses a SortableItemProvider 
(SortableDataProviderItem) to
provide data for the DataView.

The SortableItemProvider receives an AppDAO instance from the page (as a 
constructor parameter)
during the page constructor and stores it as a member variable.  It then passes 
the AppDAO off to
the DetachableItemModel (DetachableLoadableModelItem) when it creates them.

The DetachableItemModel also keeps the reference to the AppDAO so it can use it 
to load() the Item.


It seems to be working, but it doesn't feel right to be holding onto the AppDAO 
in the provider and
model. Actually, I'm a bit surprised it is working.  I expected it to break 
when navigating to the
second page in the table.  Is it going to break under concurrency or session 
serialization?

Is there a better way to do this?
(Have I even provided enough context to answer this question?)

TIA!
Chris

-- 
 -
Chris Merrill   |  Web Performance, Inc.
ch...@webperformance.com|  http://webperformance.com
919-433-1762|  919-845-7601

Web Performance: Website Load Testing Software  Services
 -

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



Re: relationship of DAO to IDataProvider and DetachableLoadableModel

2010-08-06 Thread Leszek Gawron

On 2010-08-06 20:43, Chris Merrill wrote:

I've been away from server-side development for quite a while...working on a 
massively
multi-threaded network-centric Eclipse-based app .  I'm now working on a 
proof-of-concept for the
technology stack for an upcoming project web-based product and am trying to get 
my head around
Wicket, JPA, IOC, dependency injection, etc.

I have the first stage of the prototype together, but I'm not sure I have it 
assembled correctly,
specifically related to DetachableLoadableModel, IDataProvider and 
container-injected entity managers.

I'm using Spring to inject the Entity Manager into my DAO-ish DB logic wrapper 
(AppDAO).

There is a ItemsPage that lists items from a database table using a DataView 
with a
SortableItemProvider (SortableDataProviderItem) and a PagingNavigator.  It 
also has a member
AppDAO that is a @SpringBean. The page uses a SortableItemProvider 
(SortableDataProviderItem) to
provide data for the DataView.

The SortableItemProvider receives an AppDAO instance from the page (as a 
constructor parameter)
during the page constructor and stores it as a member variable.  It then passes 
the AppDAO off to
the DetachableItemModel (DetachableLoadableModelItem) when it creates them.


public class MyDataProvider ... {

@SpringBean
private AppDAO appDao;

public MyDataProvider() {
 InjectorHolder.getInjector().inject( this );
}

}

and you'll be fine. You do not have to pass it from the page.

Injector injects a serializable proxy instead of the bean directly.

--
Leszek Gawron http://www.mobilebox.pl/krs.html
CTO at MobileBox Ltd.

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



Re: relationship of DAO to IDataProvider and DetachableLoadableModel

2010-08-06 Thread Chris Merrill
Wow, that was easy! Thanks!!

Now, do I do the same thing in my LoadableDetachableModel?  (so that load() can 
get
access to the DAO as well)  Should detach() be doing anything related to this?


Chris



On 8/6/2010 4:10 PM, Leszek Gawron wrote:
 public class MyDataProvider ... {
 
 @SpringBean
 private AppDAO appDao;
 
 public MyDataProvider() {
  InjectorHolder.getInjector().inject( this );
 }
 
 }
 
 and you'll be fine. You do not have to pass it from the page.
 
 Injector injects a serializable proxy instead of the bean directly.
 


-- 
 -
Chris Merrill   |  Web Performance, Inc.
ch...@webperformance.com|  http://webperformance.com
919-433-1762|  919-845-7601

Web Performance: Website Load Testing Software  Services
 -

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



Re: relationship of DAO to IDataProvider and DetachableLoadableModel

2010-08-06 Thread Leszek Gawron
On Fri, Aug 6, 2010 at 10:30 PM, Chris Merrill ch...@webperformance.com wrote:
 Wow, that was easy! Thanks!!

 Now, do I do the same thing in my LoadableDetachableModel?  (so that load() 
 can get
 access to the DAO as well)  Should detach() be doing anything related to this?

you can actually do it in any class you like :)
you do not have to do anything in detach() for this scenario

  lg

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



Re: relationship of DAO to IDataProvider and DetachableLoadableModel

2010-08-06 Thread Chris Merrill
On 8/6/2010 4:35 PM, Leszek Gawron wrote:
 you can actually do it in any class you like :)

So I was about to ask how this works on deserialization, since the constructor 
will not
be called.  Then I re-read your previous and I think I now understand this

Injector injects a serializable proxy instead of the bean directly.

So I guess this serializable proxy knows how to re-create the DAO when the bean 
is
deserialized (possibly on another server?).  Very nice!  I'm (slowly) starting 
to
understand the role that Spring plays.

Thanks!



-- 
 -
Chris Merrill   |  Web Performance, Inc.
ch...@webperformance.com|  http://webperformance.com
919-433-1762|  919-845-7601

Web Performance: Website Load Testing Software  Services
 -

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



Re: relationship of DAO to IDataProvider and DetachableLoadableModel

2010-08-06 Thread Leszek Gawron

On 2010-08-06 22:58, Chris Merrill wrote:

On 8/6/2010 4:35 PM, Leszek Gawron wrote:

you can actually do it in any class you like :)


So I was about to ask how this works on deserialization, since the constructor 
will not
be called.  Then I re-read your previous and I think I now understand this

Injector injects a serializable proxy instead of the bean directly.

So I guess this serializable proxy knows how to re-create the DAO when the bean 
is
deserialized (possibly on another server?).  Very nice!  I'm (slowly) starting 
to
understand the role that Spring plays.


in fact the dao is not re-created as re-looked up every time 
deserialization takes place. And yes - it does survive clustering (I 
never tried it though).


If you want more insight check the source code of wicket-spring module, 
especially:


org.apache.wicket.spring.injection.annot.AnnotSpringInjector

org.apache.wicket.spring.injection.annot.AnnotProxyFieldValueFactory [1]


javadoc:

lg

[1] 
http://wicketbyexample.com/api/wicket-spring/latest/org/apache/wicket/spring/injection/annot/AnnotProxyFieldValueFactory.html


--
Leszek Gawron http://www.mobilebox.pl/krs.html
CTO at MobileBox Ltd.

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



Re: FormComponentPanel and list edit

2010-08-06 Thread Igor Vaynberg
so make it extend it. the same way formcomponentpanel does but minus
the markup bits.

-igor

On Fri, Aug 6, 2010 at 6:01 AM, Joseph Pachod
josephpac...@thomas-daily.de wrote:
 hi

  
   ListContact convertedInput ;
  
   public void convertInput(){
    ListContact list= new ArrayListContact()
    // how to compose the list ?
      listeditor.convertinput();
     setConvertedInput(listeditor.getconvertedinput());

  -igorlisteditor isn't a FormComponent, so there's no convertinput to call in 
 it. That's the core of the issue in fact.

 ++
 joseph


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