Re: Stateless Wicket and Ajax

2011-03-12 Thread Serban Balamaci
Yes I was looking at jolira tools, but I get the exception unable to find
component   and looking at the source:
final Component component = page.get(pageRelativeComponentPath); 
if (component == null) {
throw new WicketRuntimeException(unable to find component with
path 
+ pageRelativeComponentPath
+  on stateless page 
+ page
+  it could be that the component is inside a
repeater make your component return false in getStatelessHint());
}

and yes I'm using it inside a ListView, so this means that
StatelessAjaxFallbackLink cannot be used inside a repeater(and have a
stateless page)?

Martin I see that you have not replaced StatelessWebRequestCodingStrategy in
your  https://github.com/martin-g/wicket-stateless
https://github.com/martin-g/wicket-stateless . So the problem with the ajax
link in the repeater remains?

I'm trying to understand if there is a known case of not using
StatelessAjaxFallbackLink inside repeaters. Or is it somehow my fault? My
repeater model does not change beetween renderings so the
pageRelativeComponentPath should be the same.

-
http://balamaci.wordpress.com 
--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Stateless-Wicket-and-Ajax-tp3348266p3350179.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: Stateless Wicket and Ajax

2011-03-12 Thread robert.mcguinness
Martin,

With a custom StatelessRequestMapper and and a the change to
Behaviors.getBehaviorById(int id) below I was able to get stateless
components to work in 1.5 using a clone
https://github.com/martin-g/wicket-stateless.  This is probably not the best
approach but it was a fun exercise.

http://apache-wicket.1842946.n4.nabble.com/file/n3350821/Behaviors.java
Behaviors.java 
http://apache-wicket.1842946.n4.nabble.com/file/n3350821/StatelessRequestMapper.java
StatelessRequestMapper.java 

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Stateless-Wicket-and-Ajax-tp3348266p3350821.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



New Wicket tutorial series

2011-03-12 Thread Tomasz Dziurko
Hello.

As I am using Wicket for over two years, some time ago I decided to start
sharing my knowledge and write tutorial where I am showing process of
creating Wicket application from scratch. Actually tutorial has six parts
and can be viewed here:

http://tomaszdziurko.pl/2011/03/wicket-tutorial-series-building-web-application-scratch/

As this is a my first tutorial, every comment or feedback how can I make it
better and more useful is more than welcome :)

-- 
Best regards
Tomasz Dziurko
 http://www.programatico.pl/


Re: Stateless Wicket and Ajax

2011-03-12 Thread robert.mcguinness
Serban,

If you make the change below in StatelessWebRequestCodingStrategy the
component should be found in the page.  It's a copy from
BookmarkableListenerInterfaceRequestTarget#processEvents.  Jolira noted this
might be needed in their comments.


private static Component getComponent(final Page page, final String
componentPath) {
final String pageRelativeComponentPath =
Strings.afterFirstPathComponent(componentPath, PATH_SEPARATOR);
 Component component = page.get(pageRelativeComponentPath);


if(component == null) {
page.prepareForRender(false);
component = page.get(pageRelativeComponentPath);

// See {@link
//
BookmarkableListenerInterfaceRequestTarget#processEvents(RequestCycle)}
// We make have to try to look for the component twice, 
if we hit the
// same condition.
if (component == null) {
throw new WicketRuntimeException(unable to 
find component with path  +
pageRelativeComponentPath +  on stateless page  + page
+  it could be that the 
component is inside a repeater make your
component return false in getStatelessHint());
}
}


return component;
}

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Stateless-Wicket-and-Ajax-tp3348266p3350985.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



inheriting abstract panels and pages

2011-03-12 Thread bht
Hi,

I was pleasantly surprised to see that Wicket inherits
MyPageAbstract.html for two page classes MyPage1.java extends
MyPageAbstract and MyPage2.java extends MyPageAbstract.

The two implementations work fine without having their own markup -
Wicket loads the markup MyPageAbstract.html for them.

But with panels, I get:

Markup of type 'html' for component 'MyPanel1' not found.

True, there is no such markup, but why can Wicket not load
MyPanelAbstract.html in the same way as with pages?


Thanks

Bernard


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



Re: inheriting abstract panels and pages

2011-03-12 Thread bht
Sorry, it actually works, had a typo :)

On Sun, 13 Mar 2011 16:24:55 +1300, you wrote:

Hi,

I was pleasantly surprised to see that Wicket inherits
MyPageAbstract.html for two page classes MyPage1.java extends
MyPageAbstract and MyPage2.java extends MyPageAbstract.

The two implementations work fine without having their own markup -
Wicket loads the markup MyPageAbstract.html for them.

But with panels, I get:

Markup of type 'html' for component 'MyPanel1' not found.

True, there is no such markup, but why can Wicket not load
MyPanelAbstract.html in the same way as with pages?


Thanks

Bernard


-
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