Re: [Wicket-user] wicket-ajax.js

2007-03-16 Thread Yoav Landman

Sorry, it is still broken.
I updated WICKET-387.


Matej Knopp-2 wrote:
 
 Actually, it should be fixed already. Can you please check if it works
 as it should?
 
 -Matej
 
 On 3/14/07, Vincent Demay [EMAIL PROTECTED] wrote:
 Hi

 I do not see difference between you two ;) samples

 but maybe you was talking about that :
 https://issues.apache.org/jira/browse/WICKET-387.

 I think, it will be fixed soon.

 cheers

 --
 Vincent
 http://www.demay-fr.net/blog/

 ChuckDeal a écrit :
  wicket-ajax.js (revision 518211) appears to have a problem.
 
  I think lines 296-299 should be
  var e = element.childNodes[i];
  if (e.tagName != null) {
result += Wicket.Form.serialize(e);
  }
 
  but right now they are
  var e = element.childNodes[i] {
if (e.tagName != null) {
result += Wicket.Form.serialize(e);
}
  }
 
  Chuck
 


 -
 Take Surveys. Earn Cash. Influence the Future of IT
 Join SourceForge.net's Techsay panel and you'll get the chance to share
 your
 opinions on IT  business topics through brief surveys-and earn cash
 http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user

 
 -
 Take Surveys. Earn Cash. Influence the Future of IT
 Join SourceForge.net's Techsay panel and you'll get the chance to share
 your
 opinions on IT  business topics through brief surveys-and earn cash
 http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user
 
 

-- 
View this message in context: 
http://www.nabble.com/wicket-ajax.js-tf3403817.html#a9509885
Sent from the Wicket - User mailing list archive at Nabble.com.


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Design questions: Use of controllers and wicket models

2007-03-16 Thread Gwyn Evans
Hi,
  (If Igor says anything different, just ignore this! :-))

  The change that I'd consider would the standard one of if it'd be
worth passing in a custom IMyBean interface derived from IModel, to
cover the case where I might want to use something like-but-not-a
MyBean, but I can't see anything wrong with passing it directly if
that's not the case.

/Gwyn

On 16/03/07, David Leangen [EMAIL PROTECTED] wrote:

 Ok, thanks for the info.

 Sorry for not letting this thread die... but one more question (and
 hopefully last):

 Right now, the page I refactored looks like this:

 MyPage page = new MyPage( MyBean bean )
 {
SomeComponent component = new Component( id, new MyModel( bean ) );
bla bla
Hi, Mom
 }


 So, I'm injecting my bean, as is, into the constructor of the page. The
 bean is created somewhere else. In the MyModel above, I'm actually using
 a field of a field of the model, so I get:

 class MyModel implements IModel
 {
   private MyThing thing;

   public MyModel( MyBean bean )
   {
   this.thing = bean.getField().getThing();
   }

   More bla bla
 }


 So:

 Is it ok to pass in the raw bean into the page contructor, or should I
 be passing in a model instead?

 Is there an even better way to go about all this that I haven't noticed?


 In any case, what I do really like about IModel is that it gives a
 direct translation between the controls and my bean. So cool!


 Cheers,
 David



 On Thu, 2007-03-15 at 07:27 -0800, Igor Vaynberg wrote:
  it is mostly internal and will be removed in the coming model refactor
 
  -igor
 
 
  On 3/14/07, David Leangen [EMAIL PROTECTED] wrote:
 
 
  Ok, thanks for your help, guys. I finally figured out what you
  meant by
  your last comments, and implemented one way to go about this.
  Not sure
  if it's the best way, but it's certainly much cleaner than
  before.
 
  Thanks!!
 
  Just one question remaining.
 
  What's the deal with getNestedModel( )?
 
  It sounds useful, but that never gets invoked.
 
 
  What is it for, and how would I use it?
 
 
  Cheers,
  Dave
 
 
 
 
 
 
  On Tue, 2007-03-13 at 16:07 +0900, David Leangen wrote:
   :-)
  
if you disable a formcomponent then neither a set or get
  will be
called
  
  
   Yes. But it's not disabled, and get is being called. Just
  not set.
  
   I must be doing something wrong or missing something in the
  impl here...
   but I don't see what it is. :-(
  
  
   Cheers,
   Dave
  
  
  
  
  
Sorry for pulling you guys back to my mail
  issue. ;-)
   
Since setObject() is not being called, I don't see
  how to
apply my
complex model to its children. I thought I could
  pull this off
with
setModel()... but it just ain't being called.
   
   
Ok, let's stick with the person object. The
  person has
attributes, and
one of these attributes may itself have
  attributes.
   
For example:
   
  Person:
isSingle?
   
if( isSingle )
   
  [ ] does dishes?
  [ ] makes bed?
   
else
   
  [ ] has kids?
  [ ] walks dog?
   
Whatever.
   
Point is, if the isSingle attribute is true, I
  want to
enable certain
checkboxes and bind those values DIRECTLY to the
  model. Same
goes if
isSingle is false.
   
Right now, I collect a boolean for each value and
  set them
back
manually into my model, which seems really
  messy.
   
Same thing for enabling/disabling my checkboxes
  above: I do
that
manually depending on the current value in the
  model.
   
   
What I'd really like to do is somehow bind all
  those controls
directly
to my model so I'm not duplicating parts of the
  model for each
control.
   
   
Any hints that would enlighten me on how to do
  this?
   
   
Thanks so much!!
   

Re: [Wicket-user] Design questions: Use of controllers and wicket models

2007-03-16 Thread David Leangen

That's not a bad idea at all. Thanks!



On Fri, 2007-03-16 at 08:55 +, Gwyn Evans wrote:
 Hi,
   (If Igor says anything different, just ignore this! :-))
 
   The change that I'd consider would the standard one of if it'd be
 worth passing in a custom IMyBean interface derived from IModel, to
 cover the case where I might want to use something like-but-not-a
 MyBean, but I can't see anything wrong with passing it directly if
 that's not the case.
 
 /Gwyn
 
 On 16/03/07, David Leangen [EMAIL PROTECTED] wrote:
 
  Ok, thanks for the info.
 
  Sorry for not letting this thread die... but one more question (and
  hopefully last):
 
  Right now, the page I refactored looks like this:
 
  MyPage page = new MyPage( MyBean bean )
  {
 SomeComponent component = new Component( id, new MyModel( bean ) );
 bla bla
 Hi, Mom
  }
 
 
  So, I'm injecting my bean, as is, into the constructor of the page. The
  bean is created somewhere else. In the MyModel above, I'm actually using
  a field of a field of the model, so I get:
 
  class MyModel implements IModel
  {
private MyThing thing;
 
public MyModel( MyBean bean )
{
this.thing = bean.getField().getThing();
}
 
More bla bla
  }
 
 
  So:
 
  Is it ok to pass in the raw bean into the page contructor, or should I
  be passing in a model instead?
 
  Is there an even better way to go about all this that I haven't noticed?
 
 
  In any case, what I do really like about IModel is that it gives a
  direct translation between the controls and my bean. So cool!
 
 
  Cheers,
  David
 
 
 
  On Thu, 2007-03-15 at 07:27 -0800, Igor Vaynberg wrote:
   it is mostly internal and will be removed in the coming model refactor
  
   -igor
  
  
   On 3/14/07, David Leangen [EMAIL PROTECTED] wrote:
  
  
   Ok, thanks for your help, guys. I finally figured out what you
   meant by
   your last comments, and implemented one way to go about this.
   Not sure
   if it's the best way, but it's certainly much cleaner than
   before.
  
   Thanks!!
  
   Just one question remaining.
  
   What's the deal with getNestedModel( )?
  
   It sounds useful, but that never gets invoked.
  
  
   What is it for, and how would I use it?
  
  
   Cheers,
   Dave
  
  
  
  
  
  
   On Tue, 2007-03-13 at 16:07 +0900, David Leangen wrote:
:-)
   
 if you disable a formcomponent then neither a set or get
   will be
 called
   
   
Yes. But it's not disabled, and get is being called. Just
   not set.
   
I must be doing something wrong or missing something in the
   impl here...
but I don't see what it is. :-(
   
   
Cheers,
Dave
   
   
   
   
   
 Sorry for pulling you guys back to my mail
   issue. ;-)

 Since setObject() is not being called, I don't see
   how to
 apply my
 complex model to its children. I thought I could
   pull this off
 with
 setModel()... but it just ain't being called.


 Ok, let's stick with the person object. The
   person has
 attributes, and
 one of these attributes may itself have
   attributes.

 For example:

   Person:
 isSingle?

 if( isSingle )

   [ ] does dishes?
   [ ] makes bed?

 else

   [ ] has kids?
   [ ] walks dog?

 Whatever.

 Point is, if the isSingle attribute is true, I
   want to
 enable certain
 checkboxes and bind those values DIRECTLY to the
   model. Same
 goes if
 isSingle is false.

 Right now, I collect a boolean for each value and
   set them
 back
 manually into my model, which seems really
   messy.

 Same thing for enabling/disabling my checkboxes
   above: I do
 that
 manually depending on the current value in the
   model.


 What I'd really like to do is somehow bind all
   those controls
 directly
 to my 

[Wicket-user] Example 1.2.5 Tree problem

2007-03-16 Thread Robert .

Hi,

I noticed a problem on the Tree pages of wicket-examples.1.2.5
If you do some actions on one of the tree pages and then switch to another
page, then the WICKET AJAX DEBUG link is not available, and the tree does
not work.
For example:
1) Goto Simple tree
2) Click Expand all nodes
3) Goto Tree table

It's always reproducable in both IE and Firefox. I use Tomcat 5.5.20
Should I file a JIRA issue?

Robert
-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Tapestry - Wicket | Action Service

2007-03-16 Thread Robert .

Hi!

A Tapestry service basically has a
public void service(RequestCycle) method.
Something like a PageService would do something like
cycle.activate(cycleparam[0])

Now I understand that I don't usually need a PageService. The onClick for
Link components are much easier to use. However what if I don't have a
component and
there is some javascript that wants to change the page? I'll try to write
about this more in the other replies in this thread.

Robert


On 3/15/07, Igor Vaynberg [EMAIL PROTECTED] wrote:


you wanted to know how to have an equivalent of a tapestry service. if i
remember correctly tapestry services return things. like an asset service
that streams images.

if all you want is a callback then you can use urlFor methods to build
such a callback url. see, for example, how Link component does it.

wicket is event driven. tapestry is also, but not to the same degree. in
wicket you rarely need to build urls yourself because we provide components
that do this for you.

for example Link has an onClick() method and a Button has onSubmit().
wicket takes care of wiring these methods with urls it generates.

-igor


On 3/15/07, Robert . [EMAIL PROTECTED] wrote:

 Really? A resource?
 But I have nothing to return from my service resource.

 Robert


 On 3/15/07, Igor Vaynberg  [EMAIL PROTECTED] wrote:
 
  wicket's equivalent of a service is a shared resource. you can
  register your own shared resources through your webapplication subclass.
 
  as far as selecting pages via javascript:
 
  wicket doesnt really have a page service. urls for pages are resolved
  internally. if you want a stable entry point into the page then you should
  mount it, also via the webapplication subclass, and then the javascript can
  redirect to the mounted url.
 
  -igor
 
 
  On 3/15/07, Robert .  [EMAIL PROTECTED] wrote:
 
   Hi,
  
   I have been examining how I can convert a web application product
   from Tapestry 3 to Wicket, and trying to adapt
   myself to the Wicket way of thinking about web flow.
  
   One part that I just can't seem to figure out from reading Pro
   Wicket and browsing through the apidocs is how to
   make something like Tapestry services.
  
   For example I have an action service in Tapestry that let's me send
   an action command, including additonal parameters,
   to the service by using javascript. I have such a service for both
   normal requests and XMLHTTP requests. But thinking
   about this further makes me realize I don't even know how to make
   something like a PageService where the page is determined by javascript.
  
   I feel like I am missing something.
  
   Robert
  
  
  
  
   -
   Take Surveys. Earn Cash. Influence the Future of IT
   Join SourceForge.net's Techsay panel and you'll get the chance to
   share your
   opinions on IT  business topics through brief surveys-and earn cash
  
   http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
   ___
   Wicket-user mailing list
   Wicket-user@lists.sourceforge.net
   https://lists.sourceforge.net/lists/listinfo/wicket-user
  
  
 
 
  -
  Take Surveys. Earn Cash. Influence the Future of IT
  Join SourceForge.net's Techsay panel and you'll get the chance to
  share your
  opinions on IT  business topics through brief surveys-and earn cash
 
  http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
  ___
  Wicket-user mailing list
  Wicket-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/wicket-user
 
 


 -
 Take Surveys. Earn Cash. Influence the Future of IT
 Join SourceForge.net's Techsay panel and you'll get the chance to share
 your
 opinions on IT  business topics through brief surveys-and earn cash

 http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user



-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share
your
opinions on IT  business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  

Re: [Wicket-user] Tapestry - Wicket | Action Service

2007-03-16 Thread Robert .

On 3/15/07, Eelco Hillenius [EMAIL PROTECTED] wrote:


 One part that I just can't seem to figure out from reading Pro Wicket
and
 browsing through the apidocs is how to
 make something like Tapestry services.

Contrary to what some people say on The Server Side etc, Wicket and
Tapestry are very different frameworks. This means that not everything
can be mapped from one framework to the other.



Yes, I have noticed that :)


Tapestry's services

seem to be pretty particular for that framework.



And without those services there is not much left in Tapestry.

The best way to go here is to forget about the facilities you had in

Tapestry, but just focus on what you want to accomplish. It will be
easier for us to help you out with specific use cases, or you might be
able to figure it out yourself.



What I need is a way to do have a call from javascript to trigger some
action.
Both through normal HTTP requests and XMLHTTP, but I will focus on the
normal part first.
There is no associated component in the page. It is just a javascript
controller object, that
wants to send commands to my application. The request cycle is enough for me
to continue
at that point.

Something else related to this is if I can have a Link where I can add
parameters to in javascript.
Looking at Wicket I get the feeling that the state is purely something that
is kept in pages and components
with its associated models. There does not seem to be room for the client
browser to keep any state.
I actually have a whole model-view-controller system in javascript for
certain complicated situations.

I tried to look at how a Tree component works, and see if I could learn
something by looking at how it's called.
But that part was just magic to me :)

Robert
-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] how do refresh the repeatview after close ajax modal window?

2007-03-16 Thread tooy li(Gmail)
  hi, I know i should add the parent to ajax request target, but it cannot work.
look the below code, please check my might fault
  WebMarkupContainer listContainer = new WebMarkupContainer(form, 
listContainer);
  RepeatingView listView = new RepeatingView(listContainer, dataList);

setWindowClosedCallback(new ModalWindow.WindowClosedCallback() {
   public void onClose(AjaxRequestTarget target) {
  target.addComponent(listContainer); 
   }
  });


 Message: 1
 Date: Thu, 15 Mar 2007 19:04:13 +0100
 From: Matej Knopp [EMAIL PROTECTED]
 Subject: Re: [Wicket-user] how do refresh the repeatview after close
 ajax modal window?
 To: wicket-user@lists.sourceforge.net
 Message-ID:
 [EMAIL PROTECTED]
 Content-Type: text/plain; charset=ISO-8859-1; format=flowed
 
 To refresh a repeater, you have to add it's parent (e.g.
 webmarkupcontainer) to ajax request target. Repeater itself has no
 markup.
 
 -Matej
 
 On 3/15/07, tooy li(Gmail) [EMAIL PROTECTED] wrote:
 for the defaultdatatable ,i only need add a parent container of datatable 
 into the target of  ajax modal window.
 But for the repeat view ,it cannot work !!. I also want to when the gridview 
 can work well in 2.0 version
 I used 2.0 version snapshot
 thx.
 -
 Take Surveys. Earn Cash. Influence the Future of IT
 Join SourceForge.net's Techsay panel and you'll get the chance to share your
 opinions on IT  business topics through brief surveys-and earn cash
 http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user

**
-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Tapestry - Wicket | Action Service

2007-03-16 Thread Robert .

I tried to look at those listeners. If I understand correctly you always
need to be a component to be a listener.
Each listener interface must have 1 method with 0 parameters. So it means
all state must be kept in the component.
You cannot pass any parameters to it? So in the case of a PageLink you must
know which page to render, before
the link has been clicked?

I'm just trying to sort things out in my head.
I would like to know more about how Wicket knows which ILinkListener to call
when a link is clicked. I found the apidocs
to be rather abstract about listeners. It felt like you already had to know
how they work before you can understand the docs.

Please don't take any off this as criticism against Wicket. I'm sure it is a
great project. And I will be using it in the future.
I'm just not sure if I should convert this project from Tapestry to Wicket.
I am beginning to think that it's not a good idea.


On 3/15/07, Jonathan Locke [EMAIL PROTECTED] wrote:




yes.  that and the ability to create new listeners.  there is nothing
special about the listeners that wicket pre-registers to handle various
kinds of requests such as resource requests or link clicks (although you
should definitely prefer the already existing event listeners!).  in fact,
below is the code in init that registers all the service listeners in
wicket
revealing that you can create your own if you're doing something special
that wicket does not (yet) support.

/**
 * @see wicket.IInitializer#init(wicket.Application)
 */
public void init(Application application)
{
// Register listener interfaces explicitly (even though
they implicitly
// register when loaded) because deserialization of an
object that
// implements an interface does not load the interfaces it
implements!
IBehaviorListener.INTERFACE.register();
IUnversionedBehaviorListener.INTERFACE.register();
IFormSubmitListener.INTERFACE.register();
ILinkListener.INTERFACE.register();
IOnChangeListener.INTERFACE.register();
IRedirectListener.INTERFACE.register();
IResourceListener.INTERFACE.register();
}

public interface ILinkListener extends IRequestListener
{
/** Listener interface */
public static final RequestListenerInterface INTERFACE = new
RequestListenerInterface(
ILinkListener.class);

/**
 * Called when a link is clicked.
 */
void onLinkClicked();
}


igor.vaynberg wrote:

 wicket's equivalent of a service is a shared resource. you can register
 your
 own shared resources through your webapplication subclass.

 as far as selecting pages via javascript:

 wicket doesnt really have a page service. urls for pages are resolved
 internally. if you want a stable entry point into the page then you
should
 mount it, also via the webapplication subclass, and then the javascript
 can
 redirect to the mounted url.

 -igor


 On 3/15/07, Robert . [EMAIL PROTECTED] wrote:

 Hi,

 I have been examining how I can convert a web application product from
 Tapestry 3 to Wicket, and trying to adapt
 myself to the Wicket way of thinking about web flow.

 One part that I just can't seem to figure out from reading Pro Wicket
and
 browsing through the apidocs is how to
 make something like Tapestry services.

 For example I have an action service in Tapestry that let's me send an
 action command, including additonal parameters,
 to the service by using javascript. I have such a service for both
normal
 requests and XMLHTTP requests. But thinking
 about this further makes me realize I don't even know how to make
 something like a PageService where the page is determined by
javascript.

 I feel like I am missing something.

 Robert




-
 Take Surveys. Earn Cash. Influence the Future of IT
 Join SourceForge.net's Techsay panel and you'll get the chance to share
 your
 opinions on IT  business topics through brief surveys-and earn cash

http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user




-
 Take Surveys. Earn Cash. Influence the Future of IT
 Join SourceForge.net's Techsay panel and you'll get the chance to share
 your
 opinions on IT  business topics through brief surveys-and earn cash

http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user



--
View this message in context:

[Wicket-user] how to config the wicket 2.0 application to accessable by domain name directorly?

2007-03-16 Thread tooy li(Gmail)
hi,

pardon for my poort english first.

I need deploy the application into web site which can be acess by domain name.
for example , www.toy.com   is refer to my app. but i cannot know how to config 
it in 2. 0 since it use filter instead of 
servlet.  it seems that i have to set the filterPath to something, so i only 
can access my app by   www.toy.com/myapp .

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Tapestry - Wicket | Action Service

2007-03-16 Thread Martijn Dashorst
Each component is unique in the hierarchy. The link listeners get a
session/page/version relative url that instructs Wicket to retrieve
the correct page/version from the pagemaps. This is the :0:1:2:3 part.
So it is possible to have a form that is a form submit listener, an
ILinkListener, or some other registered event.

The request parameters are available in the WebRequest, so you should
be able to get them. They just aren't passed on to the listener
interface directly.

This is one of the area's where Wicket wasn't designed for. It is
possible to accomplish, but not as elegantly as using components.

Martijn

On 3/16/07, Robert . [EMAIL PROTECTED] wrote:
 I tried to look at those listeners. If I understand correctly you always
 need to be a component to be a listener.
 Each listener interface must have 1 method with 0 parameters. So it means
 all state must be kept in the component.
 You cannot pass any parameters to it? So in the case of a PageLink you must
 know which page to render, before
 the link has been clicked?

 I'm just trying to sort things out in my head.
 I would like to know more about how Wicket knows which ILinkListener to call
 when a link is clicked. I found the apidocs
 to be rather abstract about listeners. It felt like you already had to know
 how they work before you can understand the docs.

 Please don't take any off this as criticism against Wicket. I'm sure it is a
 great project. And I will be using it in the future.
 I'm just not sure if I should convert this project from Tapestry to Wicket.
 I am beginning to think that it's not a good idea.



 On 3/15/07, Jonathan Locke [EMAIL PROTECTED] wrote:
 
 
  yes.  that and the ability to create new listeners.  there is nothing
  special about the listeners that wicket pre-registers to handle various
  kinds of requests such as resource requests or link clicks (although you
  should definitely prefer the already existing event listeners!).  in fact,
  below is the code in init that registers all the service listeners in
  wicket
  revealing that you can create your own if you're doing something special
  that wicket does not (yet) support.
 
  /**
   * @see wicket.IInitializer#init(wicket.Application)
   */
  public void init(Application application)
  {
  // Register listener interfaces explicitly (even though
 they implicitly
  // register when loaded) because deserialization of an
 object that
  // implements an interface does not load the interfaces it
 implements!
  IBehaviorListener.INTERFACE.register ();
 
 IUnversionedBehaviorListener.INTERFACE.register();
  IFormSubmitListener.INTERFACE.register();
  ILinkListener.INTERFACE.register();
  IOnChangeListener.INTERFACE.register ();
  IRedirectListener.INTERFACE.register();
  IResourceListener.INTERFACE.register();
  }
 
  public interface ILinkListener extends IRequestListener
  {
  /** Listener interface */
  public static final RequestListenerInterface INTERFACE = new
  RequestListenerInterface(
  ILinkListener.class);
 
  /**
   * Called when a link is clicked.
   */
  void onLinkClicked();
  }
 
 
  igor.vaynberg wrote:
  
   wicket's equivalent of a service is a shared resource. you can register
   your
   own shared resources through your webapplication subclass.
  
   as far as selecting pages via javascript:
  
   wicket doesnt really have a page service. urls for pages are resolved
   internally. if you want a stable entry point into the page then you
 should
   mount it, also via the webapplication subclass, and then the javascript
   can
   redirect to the mounted url.
  
   -igor
  
  
   On 3/15/07, Robert .  [EMAIL PROTECTED] wrote:
  
   Hi,
  
   I have been examining how I can convert a web application product from
   Tapestry 3 to Wicket, and trying to adapt
   myself to the Wicket way of thinking about web flow.
  
   One part that I just can't seem to figure out from reading Pro Wicket
 and
   browsing through the apidocs is how to
   make something like Tapestry services.
  
   For example I have an action service in Tapestry that let's me send an
   action command, including additonal parameters,
   to the service by using javascript. I have such a service for both
 normal
   requests and XMLHTTP requests. But thinking
   about this further makes me realize I don't even know how to make
   something like a PageService where the page is determined by
 javascript.
  
   I feel like I am missing something.
  
   Robert
  
  
  
  
 -
   Take Surveys. Earn Cash. Influence the Future of IT
   Join SourceForge.net's Techsay panel and you'll get the chance to share
   your
   opinions on IT  business topics through 

Re: [Wicket-user] how to config the wicket 2.0 application toaccessable by domain name directorly?

2007-03-16 Thread Korbinian Bachl
The key here is not wicket - its the webcontainer you use. If you use Tomcat
then there is a special ROOT configure directive (or Path - sorry here, but
havent had to do with it for long time) wich can be found in the Tomcat-Docs
(similar is jetty - just look for context root or context path)

if you use a real appserver e.g: SJAS you really want to go over the EAR or
WAR way and define the Context-Path to be /
in the container-web.xml (SJAS: sun-web.xml)
e.g: context-root//context-root

in the web.xml itself you only need to map it to /* (dont forget the *)
e.g:

   filter-nameNAME/filter-name
   filter-classwicket.protocol.http.WicketFilter/filter-class
   init-param
param-nameapplicationClassName/param-name
param-valueYOURAPPCLASS/param-value
/init-param
init-param
  param-namefilterPath/param-name
  param-value/

   filter-mapping
   filter-nameNAME/filter-name
   url-pattern/*/url-pattern
   /filter-mapping


so you then can configure it the way you want:

domain.com/context_name/filterpath
^container  ^web.xml 

Regards,

Korbinian

 

 -Ursprüngliche Nachricht-
 Von: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED] Im Auftrag 
 von tooy li(Gmail)
 Gesendet: Freitag, 16. März 2007 14:50
 An: wicket-user@lists.sourceforge.net
 Betreff: [Wicket-user] how to config the wicket 2.0 
 application toaccessable by domain name directorly?
 
 hi,
 
 pardon for my poort english first.
 
 I need deploy the application into web site which can be 
 acess by domain name.
 for example , www.toy.com   is refer to my app. but i cannot 
 know how to config it in 2. 0 since it use filter instead of 
 servlet.  it seems that i have to set the filterPath to 
 something, so i only can access my app by   www.toy.com/myapp .
 
 --
 ---
 Take Surveys. Earn Cash. Influence the Future of IT Join 
 SourceForge.net's Techsay panel and you'll get the chance to 
 share your opinions on IT  business topics through brief 
 surveys-and earn cash 
 http://www.techsay.com/default.php?page=join.phpp=sourceforge
CID=DEVDEV
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user
 


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] how do refresh the repeatview after close ajax modal window?

2007-03-16 Thread Matej Knopp
listContainer.setOutputMarkupId(true);

On 3/16/07, tooy li(Gmail) [EMAIL PROTECTED] wrote:
   hi, I know i should add the parent to ajax request target, but it cannot 
 work.
 look the below code, please check my might fault
   WebMarkupContainer listContainer = new WebMarkupContainer(form, 
 listContainer);
   RepeatingView listView = new RepeatingView(listContainer, dataList);

 setWindowClosedCallback(new ModalWindow.WindowClosedCallback() {
public void onClose(AjaxRequestTarget target) {
   target.addComponent(listContainer);
}
   });


  Message: 1
  Date: Thu, 15 Mar 2007 19:04:13 +0100
  From: Matej Knopp [EMAIL PROTECTED]
  Subject: Re: [Wicket-user] how do refresh the repeatview after close
  ajax modal window?
  To: wicket-user@lists.sourceforge.net
  Message-ID:
  [EMAIL PROTECTED]
  Content-Type: text/plain; charset=ISO-8859-1; format=flowed
 
  To refresh a repeater, you have to add it's parent (e.g.
  webmarkupcontainer) to ajax request target. Repeater itself has no
  markup.
 
  -Matej
 
  On 3/15/07, tooy li(Gmail) [EMAIL PROTECTED] wrote:
  for the defaultdatatable ,i only need add a parent container of datatable 
  into the target of  ajax modal window.
  But for the repeat view ,it cannot work !!. I also want to when the 
  gridview can work well in 2.0 version
  I used 2.0 version snapshot
  thx.
  -
  Take Surveys. Earn Cash. Influence the Future of IT
  Join SourceForge.net's Techsay panel and you'll get the chance to share 
  your
  opinions on IT  business topics through brief surveys-and earn cash
  http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
  ___
  Wicket-user mailing list
  Wicket-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/wicket-user
 
 **
 -
 Take Surveys. Earn Cash. Influence the Future of IT
 Join SourceForge.net's Techsay panel and you'll get the chance to share your
 opinions on IT  business topics through brief surveys-and earn cash
 http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] form processing - getting dropdown selection back to onSubmit method.

2007-03-16 Thread GS-ikiini

let me make sure i understand..
 add(new DropDownChoice(users,new PropertyModel(this, user),));
the Property model returns the User model. and the id of this dropdownchoice
is used to access that model? so get or setUsers on the User user of this?
if that is correct. can i do  add(new DropDownChoice(users,new
PropertyModel(mydataprovider, user),)); and get a model that is a
property over there set to something?

let me give a bit more detail..

I have a filter in my dataprovider that searches my DB using a service that
takes users and logTypes and returns a list. thats why i need to set them in
there. I have a list of all the users tied to a list and all the log types
tied to a list in the web page. i just want to take the once selected and
hand it to the dataprovider who will give me back a list of all the process
matching those 2 models it was given. I understand what you said but just
need some clarity on weither or not it would work in the way i am doing it.
or is there another way i should be approaching the problem. Thank you for
you repeated assistance.

-B
.

igor.vaynberg wrote:
 
 once you understand models it becomes quiet trivial :)
 below is the simple way (without using a compound property model)
 
 class mypage extends webpage {
 private user user;
 private logtype logtype;
 // getters setters (only necessary in 1.2.x, in later wicket will access
 private properties through property model)
 
 public mypage() {
   form form=new form();
   add(new DropDownChoice(users,new PropertyModel(this, user),));
   add(new DropDownChoice(logtypes, new PropertyModel(this,
 logtype),...));
 
add(new DataView(results,new MyDataProvider(),...
...
 
 
   private class MyDataProvider implements IDataProvider {
   public Iterator iterator(int f,int c) {
   return getlogs(user,logtype);
}
}
 }
 
 and thats all she wrote. makes sense?
 
 -igor
 
 
 
 
 On 3/15/07, GS-ikiini [EMAIL PROTECTED] wrote:


 The popilateItem as i know it is used within the dataview. That part i
 understand. let me re-explain myself.

 on my webpage class, i have a dataview component. i also have a
 dropdownview
 component . they are both children of a form component. i have a beans
 user,
 log and logtype. (I am using wicket along with spring.). now in my
 webpage
 i have a drop down class whic implements dropdownchoice. the list for the
 drop down is generated earlier in the webpage class. i have a drop down
 for
 the user. and a drop down for the log type. I want to get the user
 selection
 for these two, tie it back to the appropriate bean then set those beans
 in
 the implementation of the dataprovider then use the implementation of the
 data provider as the model for the dataview. My problem lies is getting
 the
 user selection from the drop down. I can't seem get it without having a
 model to tie it to.



 igor.vaynberg wrote:
 
  first of all the dataprovider is a readonly interface, it has no set
  method
  like the model.
 
  that said what you want is simple:
 
  populateitem(item item) {
 final imodel namemodel=new propertymodel(item.getmodel(), name);
 add(new dropdownchoice(names,namemodel,nameslist));
  }
 
  -igor
 
 
  On 3/15/07, GS-ikiini [EMAIL PROTECTED] wrote:
 
 
  i seei have a fair understaning of models this is what i am doing:
 I
  have
  a dataprovider that services a dataview. this data provider is the the
  model
  that i ultimately need to update. however the properties within this
 are
  beans i need to set them using the selection from the dropdown. so fo
  instancemy dataprovider has a property that is a saya user. this
 user
  itself has a property called name. which is a string. now in my
 webpage
  class i have a dropdown with a list of names. what i need to do is
 select
  a
  name and get the appropriate bean to pass it to the dataprovider so
 that
  it
  can do its thing and return its results to the dataview. how would i
 go
  about this?
 
  -B
 
 
  igor.vaynberg wrote:
  
   since you dont specify the model for the selection wicket will look
 for
  a
   compoundpropertymodel you have somewhere above. the value will go
 into
  the
   bean that is in the compoundpropertymodel into a property with the
 same
   name
   as the id of the dropdownchoice.
  
   there is a great page on models on our wiki
  
   -igor
  
  
   On 3/15/07, GS-ikiini [EMAIL PROTECTED] wrote:
  
  
   also how do i get the user selection from a drop down that uses the
   dropDownchoice(String id,list choinces) constrctor?
  
  
  
   Gwyn wrote:
   
I'm away from my main computer now, so can't check code, but have
  you
had a look at the Wicket examples, e.g.
   
  
 
 http://www.wicket-library.com/wicket-examples/compref?wicket:bookmarkablePage=:wicket.examples.compref.DropDownChoicePage
   
/Gwyn
   
On 15/03/07, GS-ikiini [EMAIL PROTECTED] wrote:
   
ok here is another question...how do i by pass the validating
 and
  form
processing 

Re: [Wicket-user] Example 1.2.5 Tree problem

2007-03-16 Thread Igor Vaynberg

this is fixed in wicket-1.2.x branch and will be available when 1.2.6 is
released.

-igor


On 3/16/07, Robert . [EMAIL PROTECTED] wrote:


Hi,

I noticed a problem on the Tree pages of wicket-examples.1.2.5
If you do some actions on one of the tree pages and then switch to another
page, then the WICKET AJAX DEBUG link is not available, and the tree does
not work.
For example:
1) Goto Simple tree
2) Click Expand all nodes
3) Goto Tree table

It's always reproducable in both IE and Firefox. I use Tomcat 5.5.20
Should I file a JIRA issue?

Robert


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share
your
opinions on IT  business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Tapestry - Wicket | Action Service

2007-03-16 Thread Igor Vaynberg

but this is just scope creep in tapestry. what you have just described is
almost exactly a service() method in a servlet. why not just build a servlet
to do what you want?

wicket is about the UI, if you need callbacks that have nothing to do with
UI like youve mentioned why use wicket for that?

wicket focuses on doing one thing but doing it very well. we do not provide
a generic request/response framework because that is what servlets do.

-igor


On 3/16/07, Robert . [EMAIL PROTECTED] wrote:


Hi!

A Tapestry service basically has a
public void service(RequestCycle) method.
Something like a PageService would do something like
cycle.activate(cycleparam[0])

Now I understand that I don't usually need a PageService. The onClick for
Link components are much easier to use. However what if I don't have a
component and
there is some javascript that wants to change the page? I'll try to write
about this more in the other replies in this thread.

Robert


On 3/15/07, Igor Vaynberg [EMAIL PROTECTED] wrote:

 you wanted to know how to have an equivalent of a tapestry service. if i
 remember correctly tapestry services return things. like an asset service
 that streams images.

 if all you want is a callback then you can use urlFor methods to build
 such a callback url. see, for example, how Link component does it.

 wicket is event driven. tapestry is also, but not to the same degree. in
 wicket you rarely need to build urls yourself because we provide components
 that do this for you.

 for example Link has an onClick() method and a Button has onSubmit().
 wicket takes care of wiring these methods with urls it generates.

 -igor


 On 3/15/07, Robert .  [EMAIL PROTECTED] wrote:
 
  Really? A resource?
  But I have nothing to return from my service resource.
 
  Robert
 
 
  On 3/15/07, Igor Vaynberg  [EMAIL PROTECTED] wrote:
  
   wicket's equivalent of a service is a shared resource. you can
   register your own shared resources through your webapplication subclass.
  
   as far as selecting pages via javascript:
  
   wicket doesnt really have a page service. urls for pages are
   resolved internally. if you want a stable entry point into the page then 
you
   should mount it, also via the webapplication subclass, and then the
   javascript can redirect to the mounted url.
  
   -igor
  
  
   On 3/15/07, Robert .  [EMAIL PROTECTED] wrote:
  
Hi,
   
I have been examining how I can convert a web application product
from Tapestry 3 to Wicket, and trying to adapt
myself to the Wicket way of thinking about web flow.
   
One part that I just can't seem to figure out from reading Pro
Wicket and browsing through the apidocs is how to
make something like Tapestry services.
   
For example I have an action service in Tapestry that let's me
send an action command, including additonal parameters,
to the service by using javascript. I have such a service for both
normal requests and XMLHTTP requests. But thinking
about this further makes me realize I don't even know how to make
something like a PageService where the page is determined by javascript.
   
I feel like I am missing something.
   
Robert
   
   
   
   

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to
share your
opinions on IT  business topics through brief surveys-and earn
cash
   

http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user
   
   
  
  
   -
   Take Surveys. Earn Cash. Influence the Future of IT
   Join SourceForge.net's Techsay panel and you'll get the chance to
   share your
   opinions on IT  business topics through brief surveys-and earn cash
  
   http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
   ___
   Wicket-user mailing list
   Wicket-user@lists.sourceforge.net
   https://lists.sourceforge.net/lists/listinfo/wicket-user
  
  
 
 
  -
  Take Surveys. Earn Cash. Influence the Future of IT
  Join SourceForge.net's Techsay panel and you'll get the chance to
  share your
  opinions on IT  business topics through brief surveys-and earn cash
 
  http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
  ___
  Wicket-user mailing list
  Wicket-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/wicket-user
 
 


 -
 Take Surveys. Earn Cash. Influence the 

Re: [Wicket-user] form processing - getting dropdown selection back to onSubmit method.

2007-03-16 Thread Igor Vaynberg

the id of dropdowns has nothing to do with their model. i am not using a
compound property model anywhere in the code, nor am i not specifying it
directly.

the model for each dropdown is specified as a propertymodel where this
refers to the page and the string refers to the property on that page.

so the selected user object will go into the user page property, and the
selected logtype will go into the page's logtype property just like the
property models specify.

then your dataprovider picks up those two properties and uses them to filter
the result just like the code shows.

the models are just glue between formcomponent and properties on some java
bean - which in this case happens to be the page.

-igor


On 3/16/07, GS-ikiini [EMAIL PROTECTED] wrote:



let me make sure i understand..
add(new DropDownChoice(users,new PropertyModel(this, user),));
the Property model returns the User model. and the id of this
dropdownchoice
is used to access that model? so get or setUsers on the User user of this?
if that is correct. can i do  add(new DropDownChoice(users,new
PropertyModel(mydataprovider, user),)); and get a model that is a
property over there set to something?

let me give a bit more detail..

I have a filter in my dataprovider that searches my DB using a service
that
takes users and logTypes and returns a list. thats why i need to set them
in
there. I have a list of all the users tied to a list and all the log types
tied to a list in the web page. i just want to take the once selected and
hand it to the dataprovider who will give me back a list of all the
process
matching those 2 models it was given. I understand what you said but just
need some clarity on weither or not it would work in the way i am doing
it.
or is there another way i should be approaching the problem. Thank you for
you repeated assistance.

-B
.

igor.vaynberg wrote:

 once you understand models it becomes quiet trivial :)
 below is the simple way (without using a compound property model)

 class mypage extends webpage {
 private user user;
 private logtype logtype;
 // getters setters (only necessary in 1.2.x, in later wicket will access
 private properties through property model)

 public mypage() {
   form form=new form();
   add(new DropDownChoice(users,new PropertyModel(this, user),));
   add(new DropDownChoice(logtypes, new PropertyModel(this,
 logtype),...));

add(new DataView(results,new MyDataProvider(),...
...


   private class MyDataProvider implements IDataProvider {
   public Iterator iterator(int f,int c) {
   return getlogs(user,logtype);
}
}
 }

 and thats all she wrote. makes sense?

 -igor




 On 3/15/07, GS-ikiini [EMAIL PROTECTED] wrote:


 The popilateItem as i know it is used within the dataview. That part i
 understand. let me re-explain myself.

 on my webpage class, i have a dataview component. i also have a
 dropdownview
 component . they are both children of a form component. i have a beans
 user,
 log and logtype. (I am using wicket along with spring.). now in my
 webpage
 i have a drop down class whic implements dropdownchoice. the list for
the
 drop down is generated earlier in the webpage class. i have a drop down
 for
 the user. and a drop down for the log type. I want to get the user
 selection
 for these two, tie it back to the appropriate bean then set those beans
 in
 the implementation of the dataprovider then use the implementation of
the
 data provider as the model for the dataview. My problem lies is getting
 the
 user selection from the drop down. I can't seem get it without having a
 model to tie it to.



 igor.vaynberg wrote:
 
  first of all the dataprovider is a readonly interface, it has no set
  method
  like the model.
 
  that said what you want is simple:
 
  populateitem(item item) {
 final imodel namemodel=new propertymodel(item.getmodel(), name);
 add(new dropdownchoice(names,namemodel,nameslist));
  }
 
  -igor
 
 
  On 3/15/07, GS-ikiini [EMAIL PROTECTED] wrote:
 
 
  i seei have a fair understaning of models this is what i am
doing:
 I
  have
  a dataprovider that services a dataview. this data provider is the
the
  model
  that i ultimately need to update. however the properties within this
 are
  beans i need to set them using the selection from the dropdown. so
fo
  instancemy dataprovider has a property that is a saya user. this
 user
  itself has a property called name. which is a string. now in my
 webpage
  class i have a dropdown with a list of names. what i need to do is
 select
  a
  name and get the appropriate bean to pass it to the dataprovider so
 that
  it
  can do its thing and return its results to the dataview. how would i
 go
  about this?
 
  -B
 
 
  igor.vaynberg wrote:
  
   since you dont specify the model for the selection wicket will
look
 for
  a
   compoundpropertymodel you have somewhere above. the value will go
 into
  the
   bean that is in the compoundpropertymodel into a property 

Re: [Wicket-user] Tapestry - Wicket | Action Service

2007-03-16 Thread Eelco Hillenius
 Please don't take any off this as criticism against Wicket. I'm sure it is a
 great project. And I will be using it in the future.
 I'm just not sure if I should convert this project from Tapestry to Wicket.
 I am beginning to think that it's not a good idea.

Imo, you always need a very good reason to convert your projects from
one technology to another to start with. It has to solve something for
you, and it has to be worth more than the pain you will inevitably be
going through. You know, the old if it aint broken, don't fix it.

Eelco

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Tapestry - Wicket | Action Service

2007-03-16 Thread Robert .

Because I still want/need the Wicket session, request cycle, application
context and all that.


On 3/16/07, Igor Vaynberg [EMAIL PROTECTED] wrote:


but this is just scope creep in tapestry. what you have just described is
almost exactly a service() method in a servlet. why not just build a servlet
to do what you want?

wicket is about the UI, if you need callbacks that have nothing to do with
UI like youve mentioned why use wicket for that?

wicket focuses on doing one thing but doing it very well. we do not
provide a generic request/response framework because that is what servlets
do.

-igor


On 3/16/07, Robert . [EMAIL PROTECTED] wrote:

 Hi!

 A Tapestry service basically has a
 public void service(RequestCycle) method.
 Something like a PageService would do something like
 cycle.activate(cycleparam[0])

 Now I understand that I don't usually need a PageService. The onClick
 for Link components are much easier to use. However what if I don't have a
 component and
 there is some javascript that wants to change the page? I'll try to
 write about this more in the other replies in this thread.

 Robert


 On 3/15/07, Igor Vaynberg [EMAIL PROTECTED] wrote:
 
  you wanted to know how to have an equivalent of a tapestry service. if
  i remember correctly tapestry services return things. like an asset service
  that streams images.
 
  if all you want is a callback then you can use urlFor methods to build
  such a callback url. see, for example, how Link component does it.
 
  wicket is event driven. tapestry is also, but not to the same degree.
  in wicket you rarely need to build urls yourself because we provide
  components that do this for you.
 
  for example Link has an onClick() method and a Button has onSubmit().
  wicket takes care of wiring these methods with urls it generates.
 
  -igor
 
 
  On 3/15/07, Robert .  [EMAIL PROTECTED] wrote:
  
   Really? A resource?
   But I have nothing to return from my service resource.
  
   Robert
  
  
   On 3/15/07, Igor Vaynberg  [EMAIL PROTECTED] wrote:
   
wicket's equivalent of a service is a shared resource. you can
register your own shared resources through your webapplication subclass.
   
as far as selecting pages via javascript:
   
wicket doesnt really have a page service. urls for pages are
resolved internally. if you want a stable entry point into the page 
then you
should mount it, also via the webapplication subclass, and then the
javascript can redirect to the mounted url.
   
-igor
   
   
On 3/15/07, Robert .  [EMAIL PROTECTED] wrote:
   
 Hi,

 I have been examining how I can convert a web application
 product from Tapestry 3 to Wicket, and trying to adapt
 myself to the Wicket way of thinking about web flow.

 One part that I just can't seem to figure out from reading Pro
 Wicket and browsing through the apidocs is how to
 make something like Tapestry services.

 For example I have an action service in Tapestry that let's me
 send an action command, including additonal parameters,
 to the service by using javascript. I have such a service for
 both normal requests and XMLHTTP requests. But thinking
 about this further makes me realize I don't even know how to
 make something like a PageService where the page is determined by
 javascript.

 I feel like I am missing something.

 Robert




 
-
 Take Surveys. Earn Cash. Influence the Future of IT
 Join SourceForge.net's Techsay panel and you'll get the chance
 to share your
 opinions on IT  business topics through brief surveys-and earn
 cash

 
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user


   
   

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to
share your
opinions on IT  business topics through brief surveys-and earn
cash
   

http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user
   
   
  
  
   -
   Take Surveys. Earn Cash. Influence the Future of IT
   Join SourceForge.net's Techsay panel and you'll get the chance to
   share your
   opinions on IT  business topics through brief surveys-and earn cash
  
   http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
   

Re: [Wicket-user] form processing - getting dropdown selection back to onSubmit method.

2007-03-16 Thread GS-ikiini

I see..I am still thinking in old java style...let me try again...

i have my dataprovider class/model. my page class and 2 beans. in my
dataprovider class.model, the 2 beans are properties. that i need to set via
drop down choice. so i set them as specified here. what i don't understand
is where does the user object that we set come from? if i select string x
from the drop down how do we get the object that sting x in the drop down
list belongs to.? i have many users objects is my point. Can you explain
that part to me please. is ther some special way i generate the list for the
drop down...maybe thats waht i'm not getting..

-B



igor.vaynberg wrote:
 
 the id of dropdowns has nothing to do with their model. i am not using a
 compound property model anywhere in the code, nor am i not specifying it
 directly.
 
 the model for each dropdown is specified as a propertymodel where this
 refers to the page and the string refers to the property on that page.
 
 so the selected user object will go into the user page property, and the
 selected logtype will go into the page's logtype property just like the
 property models specify.
 
 then your dataprovider picks up those two properties and uses them to
 filter
 the result just like the code shows.
 
 the models are just glue between formcomponent and properties on some java
 bean - which in this case happens to be the page.
 
 -igor
 
 
 On 3/16/07, GS-ikiini [EMAIL PROTECTED] wrote:


 let me make sure i understand..
 add(new DropDownChoice(users,new PropertyModel(this, user),));
 the Property model returns the User model. and the id of this
 dropdownchoice
 is used to access that model? so get or setUsers on the User user of
 this?
 if that is correct. can i do  add(new DropDownChoice(users,new
 PropertyModel(mydataprovider, user),)); and get a model that is a
 property over there set to something?

 let me give a bit more detail..

 I have a filter in my dataprovider that searches my DB using a service
 that
 takes users and logTypes and returns a list. thats why i need to set them
 in
 there. I have a list of all the users tied to a list and all the log
 types
 tied to a list in the web page. i just want to take the once selected and
 hand it to the dataprovider who will give me back a list of all the
 process
 matching those 2 models it was given. I understand what you said but just
 need some clarity on weither or not it would work in the way i am doing
 it.
 or is there another way i should be approaching the problem. Thank you
 for
 you repeated assistance.

 -B
 .

 igor.vaynberg wrote:
 
  once you understand models it becomes quiet trivial :)
  below is the simple way (without using a compound property model)
 
  class mypage extends webpage {
  private user user;
  private logtype logtype;
  // getters setters (only necessary in 1.2.x, in later wicket will
 access
  private properties through property model)
 
  public mypage() {
form form=new form();
add(new DropDownChoice(users,new PropertyModel(this,
 user),));
add(new DropDownChoice(logtypes, new PropertyModel(this,
  logtype),...));
 
 add(new DataView(results,new MyDataProvider(),...
 ...
 
 
private class MyDataProvider implements IDataProvider {
public Iterator iterator(int f,int c) {
return getlogs(user,logtype);
 }
 }
  }
 
  and thats all she wrote. makes sense?
 
  -igor
 
 
 
 
  On 3/15/07, GS-ikiini [EMAIL PROTECTED] wrote:
 
 
  The popilateItem as i know it is used within the dataview. That part i
  understand. let me re-explain myself.
 
  on my webpage class, i have a dataview component. i also have a
  dropdownview
  component . they are both children of a form component. i have a beans
  user,
  log and logtype. (I am using wicket along with spring.). now in my
  webpage
  i have a drop down class whic implements dropdownchoice. the list for
 the
  drop down is generated earlier in the webpage class. i have a drop
 down
  for
  the user. and a drop down for the log type. I want to get the user
  selection
  for these two, tie it back to the appropriate bean then set those
 beans
  in
  the implementation of the dataprovider then use the implementation of
 the
  data provider as the model for the dataview. My problem lies is
 getting
  the
  user selection from the drop down. I can't seem get it without having
 a
  model to tie it to.
 
 
 
  igor.vaynberg wrote:
  
   first of all the dataprovider is a readonly interface, it has no set
   method
   like the model.
  
   that said what you want is simple:
  
   populateitem(item item) {
  final imodel namemodel=new propertymodel(item.getmodel(),
 name);
  add(new dropdownchoice(names,namemodel,nameslist));
   }
  
   -igor
  
  
   On 3/15/07, GS-ikiini [EMAIL PROTECTED] wrote:
  
  
   i seei have a fair understaning of models this is what i am
 doing:
  I
   have
   a dataprovider that services a dataview. this data provider is the
 the
   

Re: [Wicket-user] Tapestry - Wicket | Action Service

2007-03-16 Thread Igor Vaynberg

we have a WicketSessionFilter, not sure if that is an exact name, that you
can map onto your servlet. it will give you access to wicket session, and
from there to application.

not sure why you need the request cycle, since that encapsulates
wicket-specific workflow.

-igor


On 3/16/07, Robert . [EMAIL PROTECTED] wrote:


Because I still want/need the Wicket session, request cycle, application
context and all that.


On 3/16/07, Igor Vaynberg  [EMAIL PROTECTED] wrote:

 but this is just scope creep in tapestry. what you have just described
 is almost exactly a service() method in a servlet. why not just build a
 servlet to do what you want?

 wicket is about the UI, if you need callbacks that have nothing to do
 with UI like youve mentioned why use wicket for that?

 wicket focuses on doing one thing but doing it very well. we do not
 provide a generic request/response framework because that is what servlets
 do.

 -igor


 On 3/16/07, Robert . [EMAIL PROTECTED] wrote:
 
  Hi!
 
  A Tapestry service basically has a
  public void service(RequestCycle) method.
  Something like a PageService would do something like
  cycle.activate(cycleparam[0])
 
  Now I understand that I don't usually need a PageService. The onClick
  for Link components are much easier to use. However what if I don't have a
  component and
  there is some javascript that wants to change the page? I'll try to
  write about this more in the other replies in this thread.
 
  Robert
 
 
  On 3/15/07, Igor Vaynberg [EMAIL PROTECTED] wrote:
  
   you wanted to know how to have an equivalent of a tapestry service.
   if i remember correctly tapestry services return things. like an asset
   service that streams images.
  
   if all you want is a callback then you can use urlFor methods to
   build such a callback url. see, for example, how Link component does it.
  
   wicket is event driven. tapestry is also, but not to the same
   degree. in wicket you rarely need to build urls yourself because we 
provide
   components that do this for you.
  
   for example Link has an onClick() method and a Button has
   onSubmit(). wicket takes care of wiring these methods with urls it
   generates.
  
   -igor
  
  
   On 3/15/07, Robert .  [EMAIL PROTECTED] wrote:
   
Really? A resource?
But I have nothing to return from my service resource.
   
Robert
   
   
On 3/15/07, Igor Vaynberg  [EMAIL PROTECTED] wrote:

 wicket's equivalent of a service is a shared resource. you can
 register your own shared resources through your webapplication 
subclass.

 as far as selecting pages via javascript:

 wicket doesnt really have a page service. urls for pages are
 resolved internally. if you want a stable entry point into the page 
then you
 should mount it, also via the webapplication subclass, and then the
 javascript can redirect to the mounted url.

 -igor


 On 3/15/07, Robert .  [EMAIL PROTECTED] wrote:

  Hi,
 
  I have been examining how I can convert a web application
  product from Tapestry 3 to Wicket, and trying to adapt
  myself to the Wicket way of thinking about web flow.
 
  One part that I just can't seem to figure out from reading Pro
  Wicket and browsing through the apidocs is how to
  make something like Tapestry services.
 
  For example I have an action service in Tapestry that let's me
  send an action command, including additonal parameters,
  to the service by using javascript. I have such a service for
  both normal requests and XMLHTTP requests. But thinking
  about this further makes me realize I don't even know how to
  make something like a PageService where the page is determined by
  javascript.
 
  I feel like I am missing something.
 
  Robert
 
 
 
 
  
-
  Take Surveys. Earn Cash. Influence the Future of IT
  Join SourceForge.net's Techsay panel and you'll get the chance
  to share your
  opinions on IT  business topics through brief surveys-and
  earn cash
 
  
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
  ___
  Wicket-user mailing list
  Wicket-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/wicket-user
 
 


 
-
 Take Surveys. Earn Cash. Influence the Future of IT
 Join SourceForge.net's Techsay panel and you'll get the chance
 to share your
 opinions on IT  business topics through brief surveys-and earn
 cash

 
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 

Re: [Wicket-user] Tapestry - Wicket | Action Service

2007-03-16 Thread Robert .

On 3/16/07, Eelco Hillenius [EMAIL PROTECTED] wrote:


 Please don't take any off this as criticism against Wicket. I'm sure it
is a
 great project. And I will be using it in the future.
 I'm just not sure if I should convert this project from Tapestry to
Wicket.
 I am beginning to think that it's not a good idea.

Imo, you always need a very good reason to convert your projects from
one technology to another to start with. It has to solve something for
you, and it has to be worth more than the pain you will inevitably be
going through. You know, the old if it aint broken, don't fix it.



Of course, of course! But unfortunately it is a bit broken :)
We have a problem of random failures in ognl expressions. Perhaps due to the
fact templates are compiled at runtime.
And since Howard never responded to any of the bugs I posted...
-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Tapestry - Wicket | Action Service

2007-03-16 Thread Paolo Di Tommaso

It could be useful in situation where UI components are not mapped to Wicket
components, but you wants access to page state.

For example just think about a javascript input dialog. How to send the user
input value in a wicket page?

Or in any other situation where you use third parts UI widgets not supported
by Wicket, but you want to interact with the server side page status.


Paolo

On 3/16/07, Igor Vaynberg [EMAIL PROTECTED] wrote:


but this is just scope creep in tapestry. what you have just described is
almost exactly a service() method in a servlet. why not just build a servlet
to do what you want?

wicket is about the UI, if you need callbacks that have nothing to do with
UI like youve mentioned why use wicket for that?

wicket focuses on doing one thing but doing it very well. we do not
provide a generic request/response framework because that is what servlets
do.

-igor


On 3/16/07, Robert . [EMAIL PROTECTED] wrote:

 Hi!

 A Tapestry service basically has a
 public void service(RequestCycle) method.
 Something like a PageService would do something like
 cycle.activate(cycleparam[0])

 Now I understand that I don't usually need a PageService. The onClick
 for Link components are much easier to use. However what if I don't have a
 component and
 there is some javascript that wants to change the page? I'll try to
 write about this more in the other replies in this thread.

 Robert


 On 3/15/07, Igor Vaynberg [EMAIL PROTECTED] wrote:
 
  you wanted to know how to have an equivalent of a tapestry service. if
  i remember correctly tapestry services return things. like an asset service
  that streams images.
 
  if all you want is a callback then you can use urlFor methods to build
  such a callback url. see, for example, how Link component does it.
 
  wicket is event driven. tapestry is also, but not to the same degree.
  in wicket you rarely need to build urls yourself because we provide
  components that do this for you.
 
  for example Link has an onClick() method and a Button has onSubmit().
  wicket takes care of wiring these methods with urls it generates.
 
  -igor
 
 
  On 3/15/07, Robert .  [EMAIL PROTECTED] wrote:
  
   Really? A resource?
   But I have nothing to return from my service resource.
  
   Robert
  
  
   On 3/15/07, Igor Vaynberg  [EMAIL PROTECTED] wrote:
   
wicket's equivalent of a service is a shared resource. you can
register your own shared resources through your webapplication subclass.
   
as far as selecting pages via javascript:
   
wicket doesnt really have a page service. urls for pages are
resolved internally. if you want a stable entry point into the page 
then you
should mount it, also via the webapplication subclass, and then the
javascript can redirect to the mounted url.
   
-igor
   
   
On 3/15/07, Robert .  [EMAIL PROTECTED] wrote:
   
 Hi,

 I have been examining how I can convert a web application
 product from Tapestry 3 to Wicket, and trying to adapt
 myself to the Wicket way of thinking about web flow.

 One part that I just can't seem to figure out from reading Pro
 Wicket and browsing through the apidocs is how to
 make something like Tapestry services.

 For example I have an action service in Tapestry that let's me
 send an action command, including additonal parameters,
 to the service by using javascript. I have such a service for
 both normal requests and XMLHTTP requests. But thinking
 about this further makes me realize I don't even know how to
 make something like a PageService where the page is determined by
 javascript.

 I feel like I am missing something.

 Robert




 
-
 Take Surveys. Earn Cash. Influence the Future of IT
 Join SourceForge.net's Techsay panel and you'll get the chance
 to share your
 opinions on IT  business topics through brief surveys-and earn
 cash

 
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user


   
   

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to
share your
opinions on IT  business topics through brief surveys-and earn
cash
   

http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user
   
   
  
  
   -
   Take 

Re: [Wicket-user] form processing - getting dropdown selection back to onSubmit method.

2007-03-16 Thread Igor Vaynberg

first the properties are on the page, not on the dataprovider. since
dataprovider is an inner non-static class it has access to page properties.

second - the particular user object or logtype will come from the dropdown.
you give the dropdown a list of users and logtypes you said earlier no?

dropdowns work like this

DropDownT(String id, IModelT, IModelListT, IChoiceRendererT)

so you give it a list of objects and it will push the selected object into
the model.

if all you are giving it is a list of strings then the selected object will
also be of type string.

-igor


On 3/16/07, GS-ikiini [EMAIL PROTECTED] wrote:



I see..I am still thinking in old java style...let me try again...

i have my dataprovider class/model. my page class and 2 beans. in my
dataprovider class.model, the 2 beans are properties. that i need to set
via
drop down choice. so i set them as specified here. what i don't understand
is where does the user object that we set come from? if i select string x
from the drop down how do we get the object that sting x in the drop down
list belongs to.? i have many users objects is my point. Can you explain
that part to me please. is ther some special way i generate the list for
the
drop down...maybe thats waht i'm not getting..

-B



igor.vaynberg wrote:

 the id of dropdowns has nothing to do with their model. i am not using a
 compound property model anywhere in the code, nor am i not specifying it
 directly.

 the model for each dropdown is specified as a propertymodel where this
 refers to the page and the string refers to the property on that page.

 so the selected user object will go into the user page property, and
the
 selected logtype will go into the page's logtype property just like
the
 property models specify.

 then your dataprovider picks up those two properties and uses them to
 filter
 the result just like the code shows.

 the models are just glue between formcomponent and properties on some
java
 bean - which in this case happens to be the page.

 -igor


 On 3/16/07, GS-ikiini [EMAIL PROTECTED] wrote:


 let me make sure i understand..
 add(new DropDownChoice(users,new PropertyModel(this, user),));
 the Property model returns the User model. and the id of this
 dropdownchoice
 is used to access that model? so get or setUsers on the User user of
 this?
 if that is correct. can i do  add(new DropDownChoice(users,new
 PropertyModel(mydataprovider, user),)); and get a model that is a
 property over there set to something?

 let me give a bit more detail..

 I have a filter in my dataprovider that searches my DB using a service
 that
 takes users and logTypes and returns a list. thats why i need to set
them
 in
 there. I have a list of all the users tied to a list and all the log
 types
 tied to a list in the web page. i just want to take the once selected
and
 hand it to the dataprovider who will give me back a list of all the
 process
 matching those 2 models it was given. I understand what you said but
just
 need some clarity on weither or not it would work in the way i am doing
 it.
 or is there another way i should be approaching the problem. Thank you
 for
 you repeated assistance.

 -B
 .

 igor.vaynberg wrote:
 
  once you understand models it becomes quiet trivial :)
  below is the simple way (without using a compound property model)
 
  class mypage extends webpage {
  private user user;
  private logtype logtype;
  // getters setters (only necessary in 1.2.x, in later wicket will
 access
  private properties through property model)
 
  public mypage() {
form form=new form();
add(new DropDownChoice(users,new PropertyModel(this,
 user),));
add(new DropDownChoice(logtypes, new PropertyModel(this,
  logtype),...));
 
 add(new DataView(results,new MyDataProvider(),...
 ...
 
 
private class MyDataProvider implements IDataProvider {
public Iterator iterator(int f,int c) {
return getlogs(user,logtype);
 }
 }
  }
 
  and thats all she wrote. makes sense?
 
  -igor
 
 
 
 
  On 3/15/07, GS-ikiini [EMAIL PROTECTED] wrote:
 
 
  The popilateItem as i know it is used within the dataview. That part
i
  understand. let me re-explain myself.
 
  on my webpage class, i have a dataview component. i also have a
  dropdownview
  component . they are both children of a form component. i have a
beans
  user,
  log and logtype. (I am using wicket along with spring.). now in my
  webpage
  i have a drop down class whic implements dropdownchoice. the list
for
 the
  drop down is generated earlier in the webpage class. i have a drop
 down
  for
  the user. and a drop down for the log type. I want to get the user
  selection
  for these two, tie it back to the appropriate bean then set those
 beans
  in
  the implementation of the dataprovider then use the implementation
of
 the
  data provider as the model for the dataview. My problem lies is
 getting
  the
  user selection from the drop down. I can't seem get 

Re: [Wicket-user] Tapestry - Wicket | Action Service

2007-03-16 Thread Eelco Hillenius
Bare with me, I'm looking at creating a little example with those listeners...

Eelco

On 3/16/07, Robert . [EMAIL PROTECTED] wrote:


 On 3/16/07, Eelco Hillenius [EMAIL PROTECTED] wrote:
   Please don't take any off this as criticism against Wicket. I'm sure it
 is a
   great project. And I will be using it in the future.
   I'm just not sure if I should convert this project from Tapestry to
 Wicket.
   I am beginning to think that it's not a good idea.
 
  Imo, you always need a very good reason to convert your projects from
  one technology to another to start with. It has to solve something for
  you, and it has to be worth more than the pain you will inevitably be
  going through. You know, the old if it aint broken, don't fix it.

 Of course, of course! But unfortunately it is a bit broken :)
 We have a problem of random failures in ognl expressions. Perhaps due to the
 fact templates are compiled at runtime.
 And since Howard never responded to any of the bugs I posted...



 -
 Take Surveys. Earn Cash. Influence the Future of IT
 Join SourceForge.net's Techsay panel and you'll get the chance to share your
 opinions on IT  business topics through brief surveys-and earn cash
 http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user



-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Tapestry - Wicket | Action Service

2007-03-16 Thread Igor Vaynberg

if this is the case then you build a listener using our requestcycle.urlfor()
methods. once robert has a specific usecase i can help him with that, but
what he described up till now is perfectly fulfilled via servlets.

-igor


On 3/16/07, Paolo Di Tommaso [EMAIL PROTECTED] wrote:


It could be useful in situation where UI components are not mapped to
Wicket components, but you wants access to page state.

For example just think about a javascript input dialog. How to send the
user input value in a wicket page?

Or in any other situation where you use third parts UI widgets not
supported by Wicket, but you want to interact with the server side page
status.


Paolo

On 3/16/07, Igor Vaynberg [EMAIL PROTECTED] wrote:

 but this is just scope creep in tapestry. what you have just described
 is almost exactly a service() method in a servlet. why not just build a
 servlet to do what you want?

 wicket is about the UI, if you need callbacks that have nothing to do
 with UI like youve mentioned why use wicket for that?

 wicket focuses on doing one thing but doing it very well. we do not
 provide a generic request/response framework because that is what servlets
 do.

 -igor


 On 3/16/07, Robert . [EMAIL PROTECTED] wrote:
 
  Hi!
 
  A Tapestry service basically has a
  public void service(RequestCycle) method.
  Something like a PageService would do something like
  cycle.activate(cycleparam[0])
 
  Now I understand that I don't usually need a PageService. The onClick
  for Link components are much easier to use. However what if I don't have a
  component and
  there is some javascript that wants to change the page? I'll try to
  write about this more in the other replies in this thread.
 
  Robert
 
 
  On 3/15/07, Igor Vaynberg [EMAIL PROTECTED] wrote:
  
   you wanted to know how to have an equivalent of a tapestry service.
   if i remember correctly tapestry services return things. like an asset
   service that streams images.
  
   if all you want is a callback then you can use urlFor methods to
   build such a callback url. see, for example, how Link component does it.
  
   wicket is event driven. tapestry is also, but not to the same
   degree. in wicket you rarely need to build urls yourself because we 
provide
   components that do this for you.
  
   for example Link has an onClick() method and a Button has
   onSubmit(). wicket takes care of wiring these methods with urls it
   generates.
  
   -igor
  
  
   On 3/15/07, Robert .  [EMAIL PROTECTED] wrote:
   
Really? A resource?
But I have nothing to return from my service resource.
   
Robert
   
   
On 3/15/07, Igor Vaynberg  [EMAIL PROTECTED] wrote:

 wicket's equivalent of a service is a shared resource. you can
 register your own shared resources through your webapplication 
subclass.

 as far as selecting pages via javascript:

 wicket doesnt really have a page service. urls for pages are
 resolved internally. if you want a stable entry point into the page 
then you
 should mount it, also via the webapplication subclass, and then the
 javascript can redirect to the mounted url.

 -igor


 On 3/15/07, Robert .  [EMAIL PROTECTED] wrote:

  Hi,
 
  I have been examining how I can convert a web application
  product from Tapestry 3 to Wicket, and trying to adapt
  myself to the Wicket way of thinking about web flow.
 
  One part that I just can't seem to figure out from reading Pro
  Wicket and browsing through the apidocs is how to
  make something like Tapestry services.
 
  For example I have an action service in Tapestry that let's me
  send an action command, including additonal parameters,
  to the service by using javascript. I have such a service for
  both normal requests and XMLHTTP requests. But thinking
  about this further makes me realize I don't even know how to
  make something like a PageService where the page is determined by
  javascript.
 
  I feel like I am missing something.
 
  Robert
 
 
 
 
  
-
  Take Surveys. Earn Cash. Influence the Future of IT
  Join SourceForge.net's Techsay panel and you'll get the chance
  to share your
  opinions on IT  business topics through brief surveys-and
  earn cash
 
  
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
  ___
  Wicket-user mailing list
  Wicket-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/wicket-user
 
 


 
-
 Take Surveys. Earn Cash. Influence the Future of IT
 Join SourceForge.net's Techsay panel and you'll get the chance
 to share your
 opinions on IT  business topics 

Re: [Wicket-user] form processing - getting dropdown selection back to onSubmit method.

2007-03-16 Thread GS-ikiini

hey i think i figured it outi am passing a list of the object ideed and
the toSting method is automatically called to display what the user sees. I
need to go look up how to alter that using the ichoiceRender..once i get
that then i think it would work the way i want it to...you've been a big
help. Thank you so much. can you point me to the wiki please. Thanks again.

-B



igor.vaynberg wrote:
 
 the id of dropdowns has nothing to do with their model. i am not using a
 compound property model anywhere in the code, nor am i not specifying it
 directly.
 
 the model for each dropdown is specified as a propertymodel where this
 refers to the page and the string refers to the property on that page.
 
 so the selected user object will go into the user page property, and the
 selected logtype will go into the page's logtype property just like the
 property models specify.
 
 then your dataprovider picks up those two properties and uses them to
 filter
 the result just like the code shows.
 
 the models are just glue between formcomponent and properties on some java
 bean - which in this case happens to be the page.
 
 -igor
 
 
 On 3/16/07, GS-ikiini [EMAIL PROTECTED] wrote:


 let me make sure i understand..
 add(new DropDownChoice(users,new PropertyModel(this, user),));
 the Property model returns the User model. and the id of this
 dropdownchoice
 is used to access that model? so get or setUsers on the User user of
 this?
 if that is correct. can i do  add(new DropDownChoice(users,new
 PropertyModel(mydataprovider, user),)); and get a model that is a
 property over there set to something?

 let me give a bit more detail..

 I have a filter in my dataprovider that searches my DB using a service
 that
 takes users and logTypes and returns a list. thats why i need to set them
 in
 there. I have a list of all the users tied to a list and all the log
 types
 tied to a list in the web page. i just want to take the once selected and
 hand it to the dataprovider who will give me back a list of all the
 process
 matching those 2 models it was given. I understand what you said but just
 need some clarity on weither or not it would work in the way i am doing
 it.
 or is there another way i should be approaching the problem. Thank you
 for
 you repeated assistance.

 -B
 .

 igor.vaynberg wrote:
 
  once you understand models it becomes quiet trivial :)
  below is the simple way (without using a compound property model)
 
  class mypage extends webpage {
  private user user;
  private logtype logtype;
  // getters setters (only necessary in 1.2.x, in later wicket will
 access
  private properties through property model)
 
  public mypage() {
form form=new form();
add(new DropDownChoice(users,new PropertyModel(this,
 user),));
add(new DropDownChoice(logtypes, new PropertyModel(this,
  logtype),...));
 
 add(new DataView(results,new MyDataProvider(),...
 ...
 
 
private class MyDataProvider implements IDataProvider {
public Iterator iterator(int f,int c) {
return getlogs(user,logtype);
 }
 }
  }
 
  and thats all she wrote. makes sense?
 
  -igor
 
 
 
 
  On 3/15/07, GS-ikiini [EMAIL PROTECTED] wrote:
 
 
  The popilateItem as i know it is used within the dataview. That part i
  understand. let me re-explain myself.
 
  on my webpage class, i have a dataview component. i also have a
  dropdownview
  component . they are both children of a form component. i have a beans
  user,
  log and logtype. (I am using wicket along with spring.). now in my
  webpage
  i have a drop down class whic implements dropdownchoice. the list for
 the
  drop down is generated earlier in the webpage class. i have a drop
 down
  for
  the user. and a drop down for the log type. I want to get the user
  selection
  for these two, tie it back to the appropriate bean then set those
 beans
  in
  the implementation of the dataprovider then use the implementation of
 the
  data provider as the model for the dataview. My problem lies is
 getting
  the
  user selection from the drop down. I can't seem get it without having
 a
  model to tie it to.
 
 
 
  igor.vaynberg wrote:
  
   first of all the dataprovider is a readonly interface, it has no set
   method
   like the model.
  
   that said what you want is simple:
  
   populateitem(item item) {
  final imodel namemodel=new propertymodel(item.getmodel(),
 name);
  add(new dropdownchoice(names,namemodel,nameslist));
   }
  
   -igor
  
  
   On 3/15/07, GS-ikiini [EMAIL PROTECTED] wrote:
  
  
   i seei have a fair understaning of models this is what i am
 doing:
  I
   have
   a dataprovider that services a dataview. this data provider is the
 the
   model
   that i ultimately need to update. however the properties within
 this
  are
   beans i need to set them using the selection from the dropdown. so
 fo
   instancemy dataprovider has a property that is a saya user.
 this
  user
   itself has a property 

[Wicket-user] Cannot work well after upgrading to the snapshot of 10 mar

2007-03-16 Thread tooy li(Gmail)
1. the ajax modal window cannot work at IE 6, and fine at firefox. it will 
generate a script error.

Wicket.Ajax.Call is null or not a Object.  I try the ajax example of the 
example application, it's same eorror.



2. Crypted URL cannot work , add the below code into application, and generate 
a  class cast . 

// protected IRequestCycleProcessor newRequestCycleProcessor() {
//  return new WebRequestCycleProcessor() {
//   protected IRequestCodingStrategy newRequestCodingStrategy() {
//return new CryptedUrlWebRequestCodingStrategy(
//  new WebRequestCodingStrategy());
//   }
//  };
// }

the below is error stack
221219 [btpool0-4] ERROR wicket.RequestCycle - [Ljava.lang.String;
java.lang.ClassCastException: [Ljava.lang.String;
 at 
wicket.protocol.http.request.CryptedUrlWebRequestCodingStrategy$DecodedUrlRequest.getParameter(CryptedUrlWebRequestCodingStrategy.java:458)
 at 
wicket.protocol.http.request.AbstractWebRequestCodingStrategy.decode(AbstractWebRequestCodingStrategy.java:102)
-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] form processing - getting dropdown selection back to onSubmit method.

2007-03-16 Thread Igor Vaynberg

you are welcome. the wiki is here:

http://cwiki.apache.org/WICKET/

-igor


On 3/16/07, GS-ikiini [EMAIL PROTECTED] wrote:



hey i think i figured it outi am passing a list of the object ideed
and
the toSting method is automatically called to display what the user sees.
I
need to go look up how to alter that using the ichoiceRender..once i get
that then i think it would work the way i want it to...you've been a big
help. Thank you so much. can you point me to the wiki please. Thanks
again.

-B



igor.vaynberg wrote:

 the id of dropdowns has nothing to do with their model. i am not using a
 compound property model anywhere in the code, nor am i not specifying it
 directly.

 the model for each dropdown is specified as a propertymodel where this
 refers to the page and the string refers to the property on that page.

 so the selected user object will go into the user page property, and
the
 selected logtype will go into the page's logtype property just like
the
 property models specify.

 then your dataprovider picks up those two properties and uses them to
 filter
 the result just like the code shows.

 the models are just glue between formcomponent and properties on some
java
 bean - which in this case happens to be the page.

 -igor


 On 3/16/07, GS-ikiini [EMAIL PROTECTED] wrote:


 let me make sure i understand..
 add(new DropDownChoice(users,new PropertyModel(this, user),));
 the Property model returns the User model. and the id of this
 dropdownchoice
 is used to access that model? so get or setUsers on the User user of
 this?
 if that is correct. can i do  add(new DropDownChoice(users,new
 PropertyModel(mydataprovider, user),)); and get a model that is a
 property over there set to something?

 let me give a bit more detail..

 I have a filter in my dataprovider that searches my DB using a service
 that
 takes users and logTypes and returns a list. thats why i need to set
them
 in
 there. I have a list of all the users tied to a list and all the log
 types
 tied to a list in the web page. i just want to take the once selected
and
 hand it to the dataprovider who will give me back a list of all the
 process
 matching those 2 models it was given. I understand what you said but
just
 need some clarity on weither or not it would work in the way i am doing
 it.
 or is there another way i should be approaching the problem. Thank you
 for
 you repeated assistance.

 -B
 .

 igor.vaynberg wrote:
 
  once you understand models it becomes quiet trivial :)
  below is the simple way (without using a compound property model)
 
  class mypage extends webpage {
  private user user;
  private logtype logtype;
  // getters setters (only necessary in 1.2.x, in later wicket will
 access
  private properties through property model)
 
  public mypage() {
form form=new form();
add(new DropDownChoice(users,new PropertyModel(this,
 user),));
add(new DropDownChoice(logtypes, new PropertyModel(this,
  logtype),...));
 
 add(new DataView(results,new MyDataProvider(),...
 ...
 
 
private class MyDataProvider implements IDataProvider {
public Iterator iterator(int f,int c) {
return getlogs(user,logtype);
 }
 }
  }
 
  and thats all she wrote. makes sense?
 
  -igor
 
 
 
 
  On 3/15/07, GS-ikiini [EMAIL PROTECTED] wrote:
 
 
  The popilateItem as i know it is used within the dataview. That part
i
  understand. let me re-explain myself.
 
  on my webpage class, i have a dataview component. i also have a
  dropdownview
  component . they are both children of a form component. i have a
beans
  user,
  log and logtype. (I am using wicket along with spring.). now in my
  webpage
  i have a drop down class whic implements dropdownchoice. the list
for
 the
  drop down is generated earlier in the webpage class. i have a drop
 down
  for
  the user. and a drop down for the log type. I want to get the user
  selection
  for these two, tie it back to the appropriate bean then set those
 beans
  in
  the implementation of the dataprovider then use the implementation
of
 the
  data provider as the model for the dataview. My problem lies is
 getting
  the
  user selection from the drop down. I can't seem get it without
having
 a
  model to tie it to.
 
 
 
  igor.vaynberg wrote:
  
   first of all the dataprovider is a readonly interface, it has no
set
   method
   like the model.
  
   that said what you want is simple:
  
   populateitem(item item) {
  final imodel namemodel=new propertymodel(item.getmodel(),
 name);
  add(new dropdownchoice(names,namemodel,nameslist));
   }
  
   -igor
  
  
   On 3/15/07, GS-ikiini [EMAIL PROTECTED] wrote:
  
  
   i seei have a fair understaning of models this is what i am
 doing:
  I
   have
   a dataprovider that services a dataview. this data provider is
the
 the
   model
   that i ultimately need to update. however the properties within
 this
  are
   beans i need to set them using the selection from the 

Re: [Wicket-user] Tapestry - Wicket | Action Service

2007-03-16 Thread Eelco Hillenius
Here is a super-simple example of creating a custom request listener.

First, you create the new listener interface:

public interface IHelloListener extends IRequestListener
{
public static final RequestListenerInterface INTERFACE = new
RequestListenerInterface(
IHelloListener.class);

void onHello();
}

Note that it has a single method without parameters. This is a
requirement as you can read from IRequestListener's JavaDocs. The
other thing to note is the INTERFACE field; by instantiating a
RequestListenerInterface you register the interface, and the field
exposes a handle for constructing URLs using RequestCycle's UrlFor
methods.

Next, I simple patched the HelloWorld example like this:

public class HelloWorld extends WicketExamplePage implements IHelloListener
{
public HelloWorld()
{
add(new Label(message, Hello World!));
WebMarkupContainer link = new WebMarkupContainer(link);
link.add(new SimpleAttributeModifier(href, 
RequestCycle.get().urlFor(this,
IHelloListener.INTERFACE)));
add(link);
}

public void onHello()
{
RequestCycle.get().setRequestTarget(new IRequestTarget()
{
public void detach(RequestCycle requestCycle)
{
}

public void respond(RequestCycle requestCycle)
{

requestCycle.getResponse().write(htmlbodyHELLO!/body/html);
}
});
}
}

The html is straightforward, with the link defined like: a
wicket:id=linkclick me/a

And that's all there is to it: we created a new kind of listener for requests.

Note that it is (still) bound to a page (or any arbitrary component).
It is entirely possible to decouple this further, from the top of my
head by providing a custom WebRequestCodingStrategy and override
doEncode for your specific purpose. But if you are doing that, you
probably might as well just create your own servlet.

It is certainly a design goal for Wicket to be very extensible.
However, it is *also* a goal to have different levels in our
abstraction. I agree with Igor that having services so upfront in the
architecture is or at least encourages scope creep, as it makes it too
obvious for users to start coding their own as if they were a
replacement for servlets and don't take the time to fully get into the
component mind set. As you can see from the example, there are pretty
much no limits to what you can do with Wicket, but we hope that doing
things like creating custom listeners are only used as a last resort.
And if you think you find a really good use, we'd appreciate it if you
would communicate it as there might be something we missed and can
result in a useful addition to Wicket.

My 2c, and again, if you have good and specific use cases, share them :)

Eelco

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Tapestry - Wicket | Action Service

2007-03-16 Thread Matej Knopp
Easiest way to call a wicket method from javascript is imho to extends
AbstractDefaultAjaxBehavior - implement the respond() method, call
getCallbackScript() to obtain javascript that needs to be executed to
call the respond() method. The behavior must be added to a component
(or page, as page itself is also a component).

-Matej

On 3/16/07, Eelco Hillenius [EMAIL PROTECTED] wrote:
 Here is a super-simple example of creating a custom request listener.

 First, you create the new listener interface:

 public interface IHelloListener extends IRequestListener
 {
 public static final RequestListenerInterface INTERFACE = new
 RequestListenerInterface(
 IHelloListener.class);

 void onHello();
 }

 Note that it has a single method without parameters. This is a
 requirement as you can read from IRequestListener's JavaDocs. The
 other thing to note is the INTERFACE field; by instantiating a
 RequestListenerInterface you register the interface, and the field
 exposes a handle for constructing URLs using RequestCycle's UrlFor
 methods.

 Next, I simple patched the HelloWorld example like this:

 public class HelloWorld extends WicketExamplePage implements IHelloListener
 {
 public HelloWorld()
 {
 add(new Label(message, Hello World!));
 WebMarkupContainer link = new WebMarkupContainer(link);
 link.add(new SimpleAttributeModifier(href, 
 RequestCycle.get().urlFor(this,
 IHelloListener.INTERFACE)));
 add(link);
 }

 public void onHello()
 {
 RequestCycle.get().setRequestTarget(new IRequestTarget()
 {
 public void detach(RequestCycle requestCycle)
 {
 }

 public void respond(RequestCycle requestCycle)
 {
 
 requestCycle.getResponse().write(htmlbodyHELLO!/body/html);
 }
 });
 }
 }

 The html is straightforward, with the link defined like: a
 wicket:id=linkclick me/a

 And that's all there is to it: we created a new kind of listener for requests.

 Note that it is (still) bound to a page (or any arbitrary component).
 It is entirely possible to decouple this further, from the top of my
 head by providing a custom WebRequestCodingStrategy and override
 doEncode for your specific purpose. But if you are doing that, you
 probably might as well just create your own servlet.

 It is certainly a design goal for Wicket to be very extensible.
 However, it is *also* a goal to have different levels in our
 abstraction. I agree with Igor that having services so upfront in the
 architecture is or at least encourages scope creep, as it makes it too
 obvious for users to start coding their own as if they were a
 replacement for servlets and don't take the time to fully get into the
 component mind set. As you can see from the example, there are pretty
 much no limits to what you can do with Wicket, but we hope that doing
 things like creating custom listeners are only used as a last resort.
 And if you think you find a really good use, we'd appreciate it if you
 would communicate it as there might be something we missed and can
 result in a useful addition to Wicket.

 My 2c, and again, if you have good and specific use cases, share them :)

 Eelco

 -
 Take Surveys. Earn Cash. Influence the Future of IT
 Join SourceForge.net's Techsay panel and you'll get the chance to share your
 opinions on IT  business topics through brief surveys-and earn cash
 http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] was at legitimacy

2007-03-16 Thread Patrick Stover


It is going to be HUGE..

Lookup: GTAPCurrent: $2.36 5 Day Target price: $5Expected: Steadily climb for 
the top.


This sym is gaining momentum!!!



See the news, Wicket-user!!!


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Tapestry - Wicket | Action Service

2007-03-16 Thread Jonathan Locke


Wicket == component-oriented manipulation of markup.  

As such, Wicket is primarily a UI framework, not a framework for creating
web services.  Igor is right that this idea that Wicket should handle any
kind of request over HTTP is scope creep.  That job is for some other
framework.


Robert ... wrote:
 
 Hi!
 
 A Tapestry service basically has a
 public void service(RequestCycle) method.
 Something like a PageService would do something like
 cycle.activate(cycleparam[0])
 
 Now I understand that I don't usually need a PageService. The onClick for
 Link components are much easier to use. However what if I don't have a
 component and
 there is some javascript that wants to change the page? I'll try to write
 about this more in the other replies in this thread.
 
 Robert
 
 
 On 3/15/07, Igor Vaynberg [EMAIL PROTECTED] wrote:

 you wanted to know how to have an equivalent of a tapestry service. if i
 remember correctly tapestry services return things. like an asset service
 that streams images.

 if all you want is a callback then you can use urlFor methods to build
 such a callback url. see, for example, how Link component does it.

 wicket is event driven. tapestry is also, but not to the same degree. in
 wicket you rarely need to build urls yourself because we provide
 components
 that do this for you.

 for example Link has an onClick() method and a Button has onSubmit().
 wicket takes care of wiring these methods with urls it generates.

 -igor


 On 3/15/07, Robert . [EMAIL PROTECTED] wrote:
 
  Really? A resource?
  But I have nothing to return from my service resource.
 
  Robert
 
 
  On 3/15/07, Igor Vaynberg  [EMAIL PROTECTED] wrote:
  
   wicket's equivalent of a service is a shared resource. you can
   register your own shared resources through your webapplication
 subclass.
  
   as far as selecting pages via javascript:
  
   wicket doesnt really have a page service. urls for pages are resolved
   internally. if you want a stable entry point into the page then you
 should
   mount it, also via the webapplication subclass, and then the
 javascript can
   redirect to the mounted url.
  
   -igor
  
  
   On 3/15/07, Robert .  [EMAIL PROTECTED] wrote:
  
Hi,
   
I have been examining how I can convert a web application product
from Tapestry 3 to Wicket, and trying to adapt
myself to the Wicket way of thinking about web flow.
   
One part that I just can't seem to figure out from reading Pro
Wicket and browsing through the apidocs is how to
make something like Tapestry services.
   
For example I have an action service in Tapestry that let's me send
an action command, including additonal parameters,
to the service by using javascript. I have such a service for both
normal requests and XMLHTTP requests. But thinking
about this further makes me realize I don't even know how to make
something like a PageService where the page is determined by
 javascript.
   
I feel like I am missing something.
   
Robert
   
   
   
   
   
 -
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to
share your
opinions on IT  business topics through brief surveys-and earn
 cash
   
   
 http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user
   
   
  
  
  
 -
   Take Surveys. Earn Cash. Influence the Future of IT
   Join SourceForge.net's Techsay panel and you'll get the chance to
   share your
   opinions on IT  business topics through brief surveys-and earn cash
  
  
 http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
   ___
   Wicket-user mailing list
   Wicket-user@lists.sourceforge.net
   https://lists.sourceforge.net/lists/listinfo/wicket-user
  
  
 
 
 
 -
  Take Surveys. Earn Cash. Influence the Future of IT
  Join SourceForge.net's Techsay panel and you'll get the chance to share
  your
  opinions on IT  business topics through brief surveys-and earn cash
 
 
 http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
  ___
  Wicket-user mailing list
  Wicket-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/wicket-user
 
 

 -
 Take Surveys. Earn Cash. Influence the Future of IT
 Join SourceForge.net's Techsay panel and you'll get the chance to share
 your
 opinions on IT  business topics through brief surveys-and earn cash
 

Re: [Wicket-user] Tapestry - Wicket | Action Service

2007-03-16 Thread Jonathan Locke


yes, state is mainly kept in server side components by design (programming
model and security are two good reasons for this).  however, state can also
reside in url parameters (bookmarkable page links) if you explicitly put it
there.  and then of course there's javascript / ajax.


Robert ... wrote:
 
 
 Something else related to this is if I can have a Link where I can add
 parameters to in javascript.
 Looking at Wicket I get the feeling that the state is purely something
 that
 is kept in pages and components
 with its associated models. There does not seem to be room for the client
 browser to keep any state.
 I actually have a whole model-view-controller system in javascript for
 certain complicated situations.
 
 I tried to look at how a Tree component works, and see if I could learn
 something by looking at how it's called.
 But that part was just magic to me :)
 
 Robert
 
 

-- 
View this message in context: 
http://www.nabble.com/Tapestry--%3E-Wicket-%7C-Action-Service-tf3408177.html#a9521396
Sent from the Wicket - User mailing list archive at Nabble.com.


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Tapestry - Wicket | Action Service

2007-03-16 Thread Jonathan Locke


yes.  and that design was not accidental.  in a framework, making 
some things harder is as important as making other things easier.  

for example, we could have provided easy access to the HttpSession.
there are people who do need access to that.  but it gives people the
wrong idea about how to do things in wicket.  

more is not necessarily better.  and i think that's true here.  more 
support for client state and/or better support for generic web services
would actually move people in the wrong direction in terms of wicket's
stated goal to provide component-oriented manipulation of markup.


Martijn Dashorst wrote:
 
 This is one of the area's where Wicket wasn't designed for. It is
 possible to accomplish, but not as elegantly as using components.
 
 Martijn
 
 On 3/16/07, Robert . [EMAIL PROTECTED] wrote:
 I tried to look at those listeners. If I understand correctly you always
 need to be a component to be a listener.
 Each listener interface must have 1 method with 0 parameters. So it means
 all state must be kept in the component.
 You cannot pass any parameters to it? So in the case of a PageLink you
 must
 know which page to render, before
 the link has been clicked?

 I'm just trying to sort things out in my head.
 I would like to know more about how Wicket knows which ILinkListener to
 call
 when a link is clicked. I found the apidocs
 to be rather abstract about listeners. It felt like you already had to
 know
 how they work before you can understand the docs.

 Please don't take any off this as criticism against Wicket. I'm sure it
 is a
 great project. And I will be using it in the future.
 I'm just not sure if I should convert this project from Tapestry to
 Wicket.
 I am beginning to think that it's not a good idea.



 On 3/15/07, Jonathan Locke [EMAIL PROTECTED] wrote:
 
 
  yes.  that and the ability to create new listeners.  there is nothing
  special about the listeners that wicket pre-registers to handle various
  kinds of requests such as resource requests or link clicks (although
 you
  should definitely prefer the already existing event listeners!).  in
 fact,
  below is the code in init that registers all the service listeners in
  wicket
  revealing that you can create your own if you're doing something
 special
  that wicket does not (yet) support.
 
  /**
   * @see wicket.IInitializer#init(wicket.Application)
   */
  public void init(Application application)
  {
  // Register listener interfaces explicitly (even though
 they implicitly
  // register when loaded) because deserialization of an
 object that
  // implements an interface does not load the interfaces
 it
 implements!
  IBehaviorListener.INTERFACE.register ();
 
 IUnversionedBehaviorListener.INTERFACE.register();
  IFormSubmitListener.INTERFACE.register();
  ILinkListener.INTERFACE.register();
  IOnChangeListener.INTERFACE.register ();
  IRedirectListener.INTERFACE.register();
  IResourceListener.INTERFACE.register();
  }
 
  public interface ILinkListener extends IRequestListener
  {
  /** Listener interface */
  public static final RequestListenerInterface INTERFACE = new
  RequestListenerInterface(
  ILinkListener.class);
 
  /**
   * Called when a link is clicked.
   */
  void onLinkClicked();
  }
 
 
  igor.vaynberg wrote:
  
   wicket's equivalent of a service is a shared resource. you can
 register
   your
   own shared resources through your webapplication subclass.
  
   as far as selecting pages via javascript:
  
   wicket doesnt really have a page service. urls for pages are resolved
   internally. if you want a stable entry point into the page then you
 should
   mount it, also via the webapplication subclass, and then the
 javascript
   can
   redirect to the mounted url.
  
   -igor
  
  
   On 3/15/07, Robert .  [EMAIL PROTECTED] wrote:
  
   Hi,
  
   I have been examining how I can convert a web application product
 from
   Tapestry 3 to Wicket, and trying to adapt
   myself to the Wicket way of thinking about web flow.
  
   One part that I just can't seem to figure out from reading Pro
 Wicket
 and
   browsing through the apidocs is how to
   make something like Tapestry services.
  
   For example I have an action service in Tapestry that let's me send
 an
   action command, including additonal parameters,
   to the service by using javascript. I have such a service for both
 normal
   requests and XMLHTTP requests. But thinking
   about this further makes me realize I don't even know how to make
   something like a PageService where the page is determined by
 javascript.
  
   I feel like I am missing something.
  
   Robert
  
  
  
  
 -
   Take 

Re: [Wicket-user] form processing - getting dropdown selection back to onSubmit method.

2007-03-16 Thread GS-ikiini

hey,

is there way to get the select one option to remain in the selection list
after the user has made a selection? 

-B


igor.vaynberg wrote:
 
 the id of dropdowns has nothing to do with their model. i am not using a
 compound property model anywhere in the code, nor am i not specifying it
 directly.
 
 the model for each dropdown is specified as a propertymodel where this
 refers to the page and the string refers to the property on that page.
 
 so the selected user object will go into the user page property, and the
 selected logtype will go into the page's logtype property just like the
 property models specify.
 
 then your dataprovider picks up those two properties and uses them to
 filter
 the result just like the code shows.
 
 the models are just glue between formcomponent and properties on some java
 bean - which in this case happens to be the page.
 
 -igor
 
 
 On 3/16/07, GS-ikiini [EMAIL PROTECTED] wrote:


 let me make sure i understand..
 add(new DropDownChoice(users,new PropertyModel(this, user),));
 the Property model returns the User model. and the id of this
 dropdownchoice
 is used to access that model? so get or setUsers on the User user of
 this?
 if that is correct. can i do  add(new DropDownChoice(users,new
 PropertyModel(mydataprovider, user),)); and get a model that is a
 property over there set to something?

 let me give a bit more detail..

 I have a filter in my dataprovider that searches my DB using a service
 that
 takes users and logTypes and returns a list. thats why i need to set them
 in
 there. I have a list of all the users tied to a list and all the log
 types
 tied to a list in the web page. i just want to take the once selected and
 hand it to the dataprovider who will give me back a list of all the
 process
 matching those 2 models it was given. I understand what you said but just
 need some clarity on weither or not it would work in the way i am doing
 it.
 or is there another way i should be approaching the problem. Thank you
 for
 you repeated assistance.

 -B
 .

 igor.vaynberg wrote:
 
  once you understand models it becomes quiet trivial :)
  below is the simple way (without using a compound property model)
 
  class mypage extends webpage {
  private user user;
  private logtype logtype;
  // getters setters (only necessary in 1.2.x, in later wicket will
 access
  private properties through property model)
 
  public mypage() {
form form=new form();
add(new DropDownChoice(users,new PropertyModel(this,
 user),));
add(new DropDownChoice(logtypes, new PropertyModel(this,
  logtype),...));
 
 add(new DataView(results,new MyDataProvider(),...
 ...
 
 
private class MyDataProvider implements IDataProvider {
public Iterator iterator(int f,int c) {
return getlogs(user,logtype);
 }
 }
  }
 
  and thats all she wrote. makes sense?
 
  -igor
 
 
 
 
  On 3/15/07, GS-ikiini [EMAIL PROTECTED] wrote:
 
 
  The popilateItem as i know it is used within the dataview. That part i
  understand. let me re-explain myself.
 
  on my webpage class, i have a dataview component. i also have a
  dropdownview
  component . they are both children of a form component. i have a beans
  user,
  log and logtype. (I am using wicket along with spring.). now in my
  webpage
  i have a drop down class whic implements dropdownchoice. the list for
 the
  drop down is generated earlier in the webpage class. i have a drop
 down
  for
  the user. and a drop down for the log type. I want to get the user
  selection
  for these two, tie it back to the appropriate bean then set those
 beans
  in
  the implementation of the dataprovider then use the implementation of
 the
  data provider as the model for the dataview. My problem lies is
 getting
  the
  user selection from the drop down. I can't seem get it without having
 a
  model to tie it to.
 
 
 
  igor.vaynberg wrote:
  
   first of all the dataprovider is a readonly interface, it has no set
   method
   like the model.
  
   that said what you want is simple:
  
   populateitem(item item) {
  final imodel namemodel=new propertymodel(item.getmodel(),
 name);
  add(new dropdownchoice(names,namemodel,nameslist));
   }
  
   -igor
  
  
   On 3/15/07, GS-ikiini [EMAIL PROTECTED] wrote:
  
  
   i seei have a fair understaning of models this is what i am
 doing:
  I
   have
   a dataprovider that services a dataview. this data provider is the
 the
   model
   that i ultimately need to update. however the properties within
 this
  are
   beans i need to set them using the selection from the dropdown. so
 fo
   instancemy dataprovider has a property that is a saya user.
 this
  user
   itself has a property called name. which is a string. now in my
  webpage
   class i have a dropdown with a list of names. what i need to do is
  select
   a
   name and get the appropriate bean to pass it to the dataprovider so
  that
   it
   can do its thing and return its 

Re: [Wicket-user] how to config the wicket 2.0 application toaccessable by domain name directorly?

2007-03-16 Thread tooy li(Gmail)
thx, i know container context config, but i 'm so stupid that i don't know 
param-namefilterPath/param-name  can be empty .  it cannot work when i try 
/* ,* .

thx a lot, it work well now.:-)

 Message: 2
 Date: Fri, 16 Mar 2007 15:38:47 +0100
 From: Korbinian Bachl [EMAIL PROTECTED]
 Subject: Re: [Wicket-user] how to config the wicket 2.0 application
 toaccessable by domain name directorly?
 To: wicket-user@lists.sourceforge.net
 Message-ID: [EMAIL PROTECTED]
 Content-Type: text/plain; charset=iso-8859-1
 
 The key here is not wicket - its the webcontainer you use. If you use Tomcat
 then there is a special ROOT configure directive (or Path - sorry here, but
 havent had to do with it for long time) wich can be found in the Tomcat-Docs
 (similar is jetty - just look for context root or context path)
 
 if you use a real appserver e.g: SJAS you really want to go over the EAR or
 WAR way and define the Context-Path to be /
 in the container-web.xml (SJAS: sun-web.xml)
 e.g: context-root//context-root
 
 in the web.xml itself you only need to map it to /* (dont forget the *)
 e.g:
 
   filter-nameNAME/filter-name
   filter-classwicket.protocol.http.WicketFilter/filter-class
   init-param
param-nameapplicationClassName/param-name
param-valueYOURAPPCLASS/param-value
/init-param
init-param
  param-namefilterPath/param-name
  param-value/
 
   filter-mapping
   filter-nameNAME/filter-name
   url-pattern/*/url-pattern
   /filter-mapping
 
 
 so you then can configure it the way you want:
 
 domain.com/context_name/filterpath
^container  ^web.xml 
 
 Regards,
 
 Korbinian
 
 
 
 -Urspr?ngliche Nachricht-
 Von: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED] Im Auftrag 
 von tooy li(Gmail)
 Gesendet: Freitag, 16. M?rz 2007 14:50
 An: wicket-user@lists.sourceforge.net
 Betreff: [Wicket-user] how to config the wicket 2.0 
 application toaccessable by domain name directorly?
 
 hi,
 
 pardon for my poort english first.
 
 I need deploy the application into web site which can be 
 acess by domain name.
 for example , www.toy.com   is refer to my app. but i cannot 
 know how to config it in 2. 0 since it use filter instead of 
 servlet.  it seems that i have to set the filterPath to 
 something, so i only can access my app by   www.toy.com/myapp .
 
 --
 ---
 Take Surveys. Earn Cash. Influence the Future of IT Join 
 SourceForge.net's Techsay panel and you'll get the chance to 
 share your opinions on IT  business topics through brief 
 surveys-and earn cash 
 http://www.techsay.com/default.php?page=join.phpp=sourceforge
 CID=DEVDEV
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user
 
 
 
 
 
-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Hibernate/Spring and Wicket architecture request for validation (was Wicket's questions)

2007-03-16 Thread Jonathan Locke


you don't have to choose.  you can wrap a compoundpropertymodel around a
detachablemodel and get both access convenience and detachability.  wicket
models are much more flexible and powerful than most people realize at
first.


ZedroS Schwart wrote:
 
 Thanks for your comment Igor, I really appreciate.
 
 Just some questions : do you use CompoundPropertyModel or the detachable
 one ?
 
 For the form beans, the user profile page I'm working on really proves
 you right. I was willing at first to avoid yet another bean but in
 fact it seems indeed to be the easiest way.
 
 For the optimistic locking, I've read
 http://www.hibernate.org/hib_docs/reference/en/html/transactions.html#transactions-optimistic
 Is it what you had in mind ?
 
 Thanks again
 
 ZedroS
 
 -
 Take Surveys. Earn Cash. Influence the Future of IT
 Join SourceForge.net's Techsay panel and you'll get the chance to share
 your
 opinions on IT  business topics through brief surveys-and earn cash
 http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user
 
 

-- 
View this message in context: 
http://www.nabble.com/Re%3A-Hibernate-Spring-and-Wicket-architecture-%22request-for-validation%22-%28was-Wicket%27s-questions%29-tf3405475.html#a9526281
Sent from the Wicket - User mailing list archive at Nabble.com.


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user