Re: Workaround for "AjaxEditableLabel yields java.lang.IllegalAccessError (WICKET-1239)"?

2008-01-30 Thread Edvin Syse

Advanced Technology® skrev:

Check Per solution :
http://www.nabble.com/AjaxEditableLabel-in-1.3.0-tp14675483p14687720.html


Thanks! Worked like a charm. For some reason this didn't make it into 
1.3.1, though..


-- Edvin

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Why are new sessions created until wicket form

2008-01-30 Thread Damian Penney

Thanks so much Igor, the quick reply is much appreciated.

Damian


Igor Vaynberg wrote:

your page is stateless because it just has a label on it. stateless
pages do not create a session. if a stateless page is hit and no
session is yet created wicket will create a fake session so that
getsession() still returns something meaningful - but this session
object will not be stored into the httpsession. your page that has a
form on it is no longer stateless and thus needs to be stored in
httpsession - so wicket persists its session into httpsession once
that page is hit. if you want to force wicket to create session call
getsession().bind();

-igor


On Jan 30, 2008 7:01 PM, Damian Penney <[EMAIL PROTECTED]> wrote:
  

Why are new sessions created until wicket finds a form?

I have a Session subclass that has a field clicks.

On page A I grab the session and show the number of clicks. Everytime I
refresh the click count is 0, and the newSession method is called in
WebApplication.

add(new Label("clickCount", ((HelloSession)getSession()).getClickCount()));

getClickCount() return clicks++;


If I head to page B that has a form on it the session sticks, and my
click count starts to increment and the calls to newSession end.

So my question is, why is newSession called repeatedly until I hit a
form and how do I change this behavior (or am I missing something
fundamental here)

Thanks, Damian

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
  


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: is there wicket had per-defined the Thread for the form component

2008-01-30 Thread Igor Vaynberg
the order in which you add components in java seldom matters, the true
ordering is defined by markup.

-igor


On Jan 30, 2008 9:34 PM, kenixwong <[EMAIL PROTECTED]> wrote:
>
> thanks for reply in a short time, igor
>
> But here , i found the problem,...
>
>  In my page constructor, i defined the component modalWindow, feedbackPanel,
> a form in sequence. So, in common sense, it will call the modalWindow ( i
> wish to auto pop up once the page is load )  first follow by the other. The
> problem i faced here is the modal window run at the end once the page is
> finish loaded.  Cnan i know the reason here... ?
>
> my page constructor :
>
> public LineChart() {
> /// modal window use panel..
>  add(modalWindow);
>
>  // to auto pop up the modal window.
>  ajaxLink = new AjaxLink("cancelReportModalLink"){
> @Override
> public void onClick(AjaxRequestTarget target) {
> cancelReportModal.show(target);
> }
> };
>  add(ajaxLink);
>
>   //  Fire the ajaxLink onclick function
>  getBodyContainer().addOnLoadModifier(new ClickOnceOnLoadModel( ajaxLink
> ), null );
>
>  add(feedback);
>  add(new LineChartForm("LineChartForm"));
> }
>
>
> private class LineChartForm extends Form {
> // execute query
> // result as in JFreeChart
> }
>
>
> From the above partial code, the modal window should call then only form.
> Can anyone give the explanation ?
>
>
> and is it possible i stop the form process if the user click the cancel
> button from the modal window ?
>
>
> thanks in advance
>
>
>
>
>
> igor.vaynberg wrote:
> >
> > it doesnt have anything to do with server side threading, but with how
> > browser processes html and javascript.
> >
> > -igor
> >
> >
> > On Jan 30, 2008 9:16 PM, kenixwong <[EMAIL PROTECTED]> wrote:
> >>
> >> hi,
> >>
> >> for the above case, for example... my page constructor: i add the
> >> component
> >> ( modal window, feedBackPanel, form ) . Once i load the page, why the
> >> modal
> >> window will only display when the page is finish loaded. Is that the
> >> wicket
> >> had default set the main thread for the form component?
> >>
> >> Thanks in advance
> >> --
> >> View this message in context:
> >> http://www.nabble.com/is-there-wicket-had-per-defined-the-Thread-for-the-form-component-tp15198385p15198385.html
> >> Sent from the Wicket - User mailing list archive at Nabble.com.
> >>
> >>
> >> -
> >> To unsubscribe, e-mail: [EMAIL PROTECTED]
> >> For additional commands, e-mail: [EMAIL PROTECTED]
> >>
> >>
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> >
>
> --
> View this message in context: 
> http://www.nabble.com/is-there-wicket-had-per-defined-the-Thread-for-the-form-component-tp15198385p15198494.html
>
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: is there wicket had per-defined the Thread for the form component

2008-01-30 Thread kenixwong

thanks for reply in a short time, igor

But here , i found the problem,...

 In my page constructor, i defined the component modalWindow, feedbackPanel,
a form in sequence. So, in common sense, it will call the modalWindow ( i
wish to auto pop up once the page is load )  first follow by the other. The
problem i faced here is the modal window run at the end once the page is
finish loaded.  Cnan i know the reason here... ?

my page constructor :

public LineChart() {
/// modal window use panel..
 add(modalWindow);

 // to auto pop up the modal window.
 ajaxLink = new AjaxLink("cancelReportModalLink"){
@Override
public void onClick(AjaxRequestTarget target) {
cancelReportModal.show(target);
}
};
 add(ajaxLink);

  //  Fire the ajaxLink onclick function
 getBodyContainer().addOnLoadModifier(new ClickOnceOnLoadModel( ajaxLink
), null );
 
 add(feedback);
 add(new LineChartForm("LineChartForm"));
}


private class LineChartForm extends Form {
// execute query
// result as in JFreeChart
}
   

>From the above partial code, the modal window should call then only form.
Can anyone give the explanation ? 


and is it possible i stop the form process if the user click the cancel
button from the modal window ?


thanks in advance 




igor.vaynberg wrote:
> 
> it doesnt have anything to do with server side threading, but with how
> browser processes html and javascript.
> 
> -igor
> 
> 
> On Jan 30, 2008 9:16 PM, kenixwong <[EMAIL PROTECTED]> wrote:
>>
>> hi,
>>
>> for the above case, for example... my page constructor: i add the
>> component
>> ( modal window, feedBackPanel, form ) . Once i load the page, why the
>> modal
>> window will only display when the page is finish loaded. Is that the
>> wicket
>> had default set the main thread for the form component?
>>
>> Thanks in advance
>> --
>> View this message in context:
>> http://www.nabble.com/is-there-wicket-had-per-defined-the-Thread-for-the-form-component-tp15198385p15198385.html
>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/is-there-wicket-had-per-defined-the-Thread-for-the-form-component-tp15198385p15198494.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Ajax Busy Indicator

2008-01-30 Thread Igor Vaynberg
if ajaxbutton works for you thats great. i was simply trying to
explain that iajaxindicatoraware is decoupled from ajaxbutton - it
will work on any component to which you add an ajax behavior.

-igor

On Jan 30, 2008 9:04 PM, Martin Makundi
<[EMAIL PROTECTED]> wrote:
> > no, you dont need to extend an ajaxbutton, IAjaxIndicatorAware works
> > on any component that has any kind of ajax behavior added to it
>
> This means? I tried using AjaxButton and adding an
> AjaxFormSubmitBehavior implements IAjaxIndicatorAware but that never
> received the submit event. I also tried a SubmitLink button with the
> same behavior, but it did not work.
>
> Finally, extending AjaxButton and implementing IAjaxIndicatorAware
> received the event, but lost the feedback functionality. I am still a
> bit clueless with this new frame ;) So how whould you have done it
> exactly right?
>
> t. Martin
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: is there wicket had per-defined the Thread for the form component

2008-01-30 Thread Igor Vaynberg
it doesnt have anything to do with server side threading, but with how
browser processes html and javascript.

-igor


On Jan 30, 2008 9:16 PM, kenixwong <[EMAIL PROTECTED]> wrote:
>
> hi,
>
> for the above case, for example... my page constructor: i add the component
> ( modal window, feedBackPanel, form ) . Once i load the page, why the modal
> window will only display when the page is finish loaded. Is that the wicket
> had default set the main thread for the form component?
>
> Thanks in advance
> --
> View this message in context: 
> http://www.nabble.com/is-there-wicket-had-per-defined-the-Thread-for-the-form-component-tp15198385p15198385.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Why are new sessions created until wicket form

2008-01-30 Thread Igor Vaynberg
your page is stateless because it just has a label on it. stateless
pages do not create a session. if a stateless page is hit and no
session is yet created wicket will create a fake session so that
getsession() still returns something meaningful - but this session
object will not be stored into the httpsession. your page that has a
form on it is no longer stateless and thus needs to be stored in
httpsession - so wicket persists its session into httpsession once
that page is hit. if you want to force wicket to create session call
getsession().bind();

-igor


On Jan 30, 2008 7:01 PM, Damian Penney <[EMAIL PROTECTED]> wrote:
> Why are new sessions created until wicket finds a form?
>
> I have a Session subclass that has a field clicks.
>
> On page A I grab the session and show the number of clicks. Everytime I
> refresh the click count is 0, and the newSession method is called in
> WebApplication.
>
> add(new Label("clickCount", ((HelloSession)getSession()).getClickCount()));
>
> getClickCount() return clicks++;
>
>
> If I head to page B that has a form on it the session sticks, and my
> click count starts to increment and the calls to newSession end.
>
> So my question is, why is newSession called repeatedly until I hit a
> form and how do I change this behavior (or am I missing something
> fundamental here)
>
> Thanks, Damian
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



is there wicket had per-defined the Thread for the form component

2008-01-30 Thread kenixwong

hi,

for the above case, for example... my page constructor: i add the component
( modal window, feedBackPanel, form ) . Once i load the page, why the modal
window will only display when the page is finish loaded. Is that the wicket
had default set the main thread for the form component? 

Thanks in advance
-- 
View this message in context: 
http://www.nabble.com/is-there-wicket-had-per-defined-the-Thread-for-the-form-component-tp15198385p15198385.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Sorting using a DataTable

2008-01-30 Thread Igor Vaynberg
usually sorting is done in the database. if you get that list outside
the database, then yes, you have to sort it using your own
comparators.

-igor


On Jan 30, 2008 5:54 PM, Karen Schaper <[EMAIL PROTECTED]> wrote:
> Hello,
>
> I am using a SortableDataProvider with a DefaultDataTable.
>
> From my understanding, it seems that for every column that I wish to sort
> on,   I need to add code to the iterator method of the
> data provider.  None of the columns were sorting and when I added some code
> in the iterator method (see below) I was able to sort on the street column.
>
> Is this the best way to sort columns?  I am using wicket 1.3.
>
> Thanks Karen
>
> iterator method from a SortableDataProvider  
>
> public Iterator iterator( int first, int count ){
>
> final SortParam sp = getSort();
> EventList  list = getInterruptionList();
> if ( sp.getProperty().equals("street") ){
> Collections.sort(list, new Comparator()
> {
> public int compare(Object arg0, Object arg1){
> if ( sp.isAscending() )
> return
> ((Interrupt)arg0).getStreet().compareTo(((Interrupt)arg1).getStreet());
> else
> return
> ((Interrupt)arg1).getStreet().compareTo(((Interrupt)arg0).getStreet());
> }
> });
> }
> return list.listIterator( first );
> }
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Feedback Panel and Ajax Busy Indicator

2008-01-30 Thread Martin Makundi
> and please rename arg0 to "target" :) It's a good idea to attach
> Wicket sources to your IDE (e.g. mvn -DdownloadSources=true eclipse:eclipse)
> because then this tends to happen automatically.

I have been thinking of attaching the sources... I found some example
of adding all sources of all packages in the repository. Is there a
way to limit this to e.g., specific packages? This way I can lazy-load
the sources whenever needed. And does it require some additional setup
from Eclipse (e.g., pom.xml/project properties) or will it
automatically find the existing sources from maven repository?

> > > add(new FeedbackPanel("feedback"));
> Change this to
> add(new FeedbackPanel("feedback").setOutputPlaceHolderTag(true));

I will try these and comment.
> > >   /**
> > >* This method TODO
> > >*/
> ...and it would be a good idea to cleanup code formatting
> and remove these comments...

I prefer to comment all non-private members and the template gives me a TODO...

> > > try {
> > >   Thread.sleep(5000);
> > > } catch (InterruptedException e) {
> > >   e.printStackTrace();
> > > }
> ...and fix the exception handling, throw new RuntimeException(e);

Relax, it's just mock-up-code, but yes, I completely agree with you on this ;)

**
Martin

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Ajax Busy Indicator

2008-01-30 Thread Martin Makundi
> no, you dont need to extend an ajaxbutton, IAjaxIndicatorAware works
> on any component that has any kind of ajax behavior added to it

This means? I tried using AjaxButton and adding an
AjaxFormSubmitBehavior implements IAjaxIndicatorAware but that never
received the submit event. I also tried a SubmitLink button with the
same behavior, but it did not work.

Finally, extending AjaxButton and implementing IAjaxIndicatorAware
received the event, but lost the feedback functionality. I am still a
bit clueless with this new frame ;) So how whould you have done it
exactly right?

t. Martin

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Workaround for "AjaxEditableLabel yields java.lang.IllegalAccessError (WICKET-1239)"?

2008-01-30 Thread Advanced Technology®
Check Per solution :
http://www.nabble.com/AjaxEditableLabel-in-1.3.0-tp14675483p14687720.html

AT

2008/1/31, Edvin Syse <[EMAIL PROTECTED]>:
>
> Hi,
>
> I really need the AjaxEditableLabel in my application, but because of
> https://issues.apache.org/jira/browse/WICKET-1239, it seems useless at
> the time. (Just tested with Linux/Java 1.6_04/Wicket 1.3.1).
>
> Does anyone know of a workaround in the meantime?
>
> java.lang.IllegalAccessError: tried to access method
> org.apache.wicket.Component.onModelChanging()V from class
> org.apache.wicket.extensions.ajax.markup.html.AjaxEditableLabel$1
>
> -- Edvin
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
AT(R)


Re: Feedback Panel and Ajax Busy Indicator

2008-01-30 Thread Timo Rantalaiho
On Wed, 30 Jan 2008, Martin Makundi wrote:
> I got the Ajax busy indicator working with the code below, but I have
> run into a new problem: the feedbackpanel does not display the
> feedbacks anymore. Does anyone know what I managed to do wrong
> eventually? And more importantly, how to fix the feedback panel?
...
> >   final AjaxButton loginButton = new MyAjaxButton("loginButton",
> > loginForm) {
> > @Override
> > protected void onSubmit(AjaxRequestTarget arg0, Form arg1) {
> >   simulateLoginTransaction();
> > }

In onSubmit, also call

  target.addComponent(IndicatorLogin.this.get("feedback"));

and please rename arg0 to "target" :) It's a good idea to attach
Wicket sources to your IDE (e.g. 
mvn -DdownloadSources=true eclipse:eclipse) because then 
this tends to happen automatically.

> > add(new FeedbackPanel("feedback"));

Change this to 

add(new FeedbackPanel("feedback").setOutputPlaceHolderTag(true));

> > add(loginForm);
> > }
> >
> >   /**
> >* This method TODO
> >*/

...and it would be a good idea to cleanup code formatting
and remove these comments...

> >   synchronized void simulateLoginTransaction() {
> > System.out.println("Transaction begin.");
> > try {
> >   Thread.sleep(5000);
> > } catch (InterruptedException e) {
> >   e.printStackTrace();
> > }

...and fix the exception handling, throw new RuntimeException(e);

Best wishes,
Timo

-- 
Timo Rantalaiho   
Reaktor Innovations Oyhttp://www.ri.fi/ >

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: can auto fire the ajaxLink onClick function without click on the link?

2008-01-30 Thread kenixwong

thanks for reply , Matthijs

i get it. but apply in the modal window instead of ajaxLink here
cancelReportModal.add(new AbstractAjaxTimerBehavior(Duration.seconds(1))
{ // pop out every second   @Override
protected void onTimer(AjaxRequestTarget target) {
cancelReportModal.show(target);
}
});

but if i just want it to show one time. How i stop it? from the code above,
it will call every 1 second.

Another question here. In my page constructor, i defined the component
modalWindow, feedbackPanel, a form in sequence. So, in common sense, it will
call the modalWindow ( i wish to auto pop up once the page is load )  first
follow by the other. The problem i faced here is the modal window run at the
end once the page is finish loaded. Is that the wicket had per-defined a
Thread for the form component once the page constructor is called ? Can
anyone give me more details on it?

i want the modal window load once the page is run. The main purpose for the
modal window is feasible the user whether want to cancel the page loading or
continue. 


Thanks in advance


Matthijs Wensveen-2 wrote:
> 
> kenixwong wrote:
>> Hi
>>
>> i wish once the page is load, it will auto pop up the modal window. From
>> the
>> wicket example, the modal window will only display once the user click on
>> the ajaxLink. So, is there any solution to auto fire the onClick function
>> without click the ajax Link.? 
>>
>> my page constructor  involved the modal window and the ajaxLink:
>>
>> final ModalWindow cancelModal = new ModalWindow("cancelModal ");
>>  cancelModal .setPageMapName("cancelModal ");
>>  cancelModal .setCookieName("cancelModal ");
>>  cancelModal .setResizable(false);   
>>  cancelModal setInitialWidth(30);
>>  cancelModal .setInitialHeight(12);
>>  cancelModal .setWidthUnit("em");
>>  cancelModal .setHeightUnit("em");
>>  
>>  
>>  cancelModal .setPageCreator(new ModalWindow.PageCreator()  
>>  {
>>  public Page createPage()
>>  {
>>  return new  
>> CancelModal Page(CurrentPage.this);
>>  }
>>  });
>>  add(cancelModal );
>>  cancelModal .setOutputMarkupId(true);
>>
>> add(link = new AjaxLink("cancelReportModalLink")
>> {
>>  public void onClick(AjaxRequestTarget target)
>>  {
>>  triggerTarget = target;
>>  cancelReportModal.show(target);
>>  }
>> });
>>  
>> // is there i wrote in this way, the onClick function will fire
>> once
>> the page is load  
>> link.onClick(triggerTarget);  
>>
>>
>> can anyone give help ? or any idea on it...
>>
>>
>> thanks in advance
>>
>>
>>   
> You only need an AjaxRequestTarget, not necessarily from onClick. You 
> might add an AbstractAjaxTimerBehavior to cancelReportModal and then in 
> onTimer(ART t) { target.add(cRM); cRM.show(t); this.stop(); /* you only 
> want this once */ }
> 
> Or something alike (if it doesn't work, maybe add the behavior to the 
> container or something)
> 
> Matthijs
> 
> -- 
> Matthijs Wensveen
> Func. Internet Integration
> W http://www.func.nl
> T +31 20 423
> F +31 20 4223500 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/can-auto-fire-the-ajaxLink-onClick-function-without-click-on-the-link--tp15175973p15197512.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Why are new sessions created until wicket form

2008-01-30 Thread Damian Penney

Why are new sessions created until wicket finds a form?

I have a Session subclass that has a field clicks.

On page A I grab the session and show the number of clicks. Everytime I 
refresh the click count is 0, and the newSession method is called in 
WebApplication.


add(new Label("clickCount", ((HelloSession)getSession()).getClickCount()));

getClickCount() return clicks++;


If I head to page B that has a form on it the session sticks, and my 
click count starts to increment and the calls to newSession end.


So my question is, why is newSession called repeatedly until I hit a 
form and how do I change this behavior (or am I missing something 
fundamental here)


Thanks, Damian

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Sorting using a DataTable

2008-01-30 Thread Karen Schaper
Hello,

I am using a SortableDataProvider with a DefaultDataTable.

>From my understanding, it seems that for every column that I wish to sort
on,   I need to add code to the iterator method of the
data provider.  None of the columns were sorting and when I added some code
in the iterator method (see below) I was able to sort on the street column.

Is this the best way to sort columns?  I am using wicket 1.3.

Thanks Karen

iterator method from a SortableDataProvider  

public Iterator iterator( int first, int count ){

final SortParam sp = getSort();
EventList  list = getInterruptionList();
if ( sp.getProperty().equals("street") ){
Collections.sort(list, new Comparator()
{
public int compare(Object arg0, Object arg1){
if ( sp.isAscending() )
return
((Interrupt)arg0).getStreet().compareTo(((Interrupt)arg1).getStreet());
else
return
((Interrupt)arg1).getStreet().compareTo(((Interrupt)arg0).getStreet());
}
});
}
return list.listIterator( first );
}


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Custom components which accept multiple models

2008-01-30 Thread Igor Vaynberg
you can make a model that wraps both and returns result { boolean
master, object value }

then you bind your textfield with ("setting.value") and your
checkbox/flag with "setting.master"

-igor


On Jan 30, 2008 4:49 PM, Sam Barnum <[EMAIL PROTECTED]> wrote:
> I'm writing an settings admin page for editing a bunch of Boolean
> settings.  I'm using a custom component to edit the boolean values.
> This custom component needs access to two settings objects
> (masterSettings, customSettings) to determine if a custom setting is
> overridden by a master setting.
>
> some pseudocode:
>
> public class SettingsEditPage extends WebPage {
>
> public SettingsEditPage(Settings masterSettings, Settings
> customSettings) {
> Model masterModel = new CompoundPropertyModel(new
> LoadableDetachableModel(masterSettings){/* load method omitted */});
> Model cutomModel = new CompoundPropertyModel(new
> LoadableDetachableModel(customSettings){/* load method omitted */});
> //
> add(new SettingsEditComponent("canDeleteWidgets", masterModel,
> customModel));
> add(new SettingsEditComponent("canCreateWidgets", masterModel,
> customModel));
> add(new SettingsEditComponent("allowsReturns", masterModel,
> customModel));
> }
> }
>
> I'd like to use the component id for the SettingsEditComponent as a
> property expression, like in a CompoundPropertyModel.  This would be
> used to query the master settings first. If that returns null, use
> the value from the custom settings.  I also need the ability to
> display to the user whether a value came from the masterSettings or
> customSettings.
>
> It's not clear to me what the best way to architect this is.
>
> Should I make a custom model that wraps both the masterSettings and
> customSettings objects? It would need a boolean method to determine
> whether a given propertyExpression is taken from the master or custom
> settings.  If I do this, the SettingsEditComponent constructor would
> need to only accept that specific model type (or an interface with
> the boolean method, which is overkill).
>
> Or, should I pass both settings objects into the
> SettingsEditComponent, as pictured above?  It seems like it would be
> harder to have detachable models in this case (I guess I'd just need
> to override detatchModels()).
>
> Or, some other option that I'm missing...
>
> Thanks!
>
> --
> Sam Barnum
> http://www.360works.com
> 415.865.0952
>
>
>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Custom components which accept multiple models

2008-01-30 Thread Sam Barnum
I'm writing an settings admin page for editing a bunch of Boolean  
settings.  I'm using a custom component to edit the boolean values.   
This custom component needs access to two settings objects  
(masterSettings, customSettings) to determine if a custom setting is  
overridden by a master setting.


some pseudocode:

public class SettingsEditPage extends WebPage {

	public SettingsEditPage(Settings masterSettings, Settings  
customSettings) {
		Model masterModel = new CompoundPropertyModel(new  
LoadableDetachableModel(masterSettings){/* load method omitted */});
		Model cutomModel = new CompoundPropertyModel(new  
LoadableDetachableModel(customSettings){/* load method omitted */});

//
		add(new SettingsEditComponent("canDeleteWidgets", masterModel,  
customModel));
		add(new SettingsEditComponent("canCreateWidgets", masterModel,  
customModel));
		add(new SettingsEditComponent("allowsReturns", masterModel,  
customModel));

}
}

I'd like to use the component id for the SettingsEditComponent as a  
property expression, like in a CompoundPropertyModel.  This would be  
used to query the master settings first. If that returns null, use  
the value from the custom settings.  I also need the ability to  
display to the user whether a value came from the masterSettings or  
customSettings.


It's not clear to me what the best way to architect this is.

Should I make a custom model that wraps both the masterSettings and  
customSettings objects? It would need a boolean method to determine  
whether a given propertyExpression is taken from the master or custom  
settings.  If I do this, the SettingsEditComponent constructor would  
need to only accept that specific model type (or an interface with  
the boolean method, which is overkill).


Or, should I pass both settings objects into the  
SettingsEditComponent, as pictured above?  It seems like it would be  
harder to have detachable models in this case (I guess I'd just need  
to override detatchModels()).


Or, some other option that I'm missing...

Thanks!

--
Sam Barnum
http://www.360works.com
415.865.0952





is there way to use CryptedUrlWebRequestCodingStrategy for single page mount?

2008-01-30 Thread i ii

is there way to use CryptedUrlWebRequestCodingStrategy for single page mount? 
something like

mount(new HybridUrlCodingStrategy("/somepath", SomeWebPage.class));

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How can I use onComponentTag for a PasswordTextField?

2008-01-30 Thread Igor Vaynberg
behaviors are meant to implement crosscutting component concerns. that
is why they are their own entity.

-igor


On Jan 30, 2008 2:55 PM, Gerolf Seitz <[EMAIL PROTECTED]> wrote:
> On Jan 30, 2008 11:50 PM, i ii <[EMAIL PROTECTED]> wrote:
>
> >
> > thank you for your fast reply. from what you said i found
> >
> > link.add(new AttributeAppender("onmouseover", new Model("foo();return
> > false;"), ";"));
> >
> > what benefit is to use AttributeAppender versus onComponentTag? why two
> > ways?
> >
>
>
> because sometimes onComponentTag is final ;)
>
> there are lots of situations where using an AttributeAppender is just
> shorter (codewise).
> so instead of creating an anonymous inner class and overriding
> onComponentTag,
> you can just add an AttributeAppender -> one-liner
>
> notice, AttributeAppender is a bit "heavier" than overriding onComponentTag
> for obvious reasons.
>
>   gerolf
>
>
> >
> > 
> > > Date: Wed, 30 Jan 2008 23:44:54 +0100
> > > From: [EMAIL PROTECTED]
> > > To: users@wicket.apache.org
> > > Subject: Re: How can I use onComponentTag for a PasswordTextField?
> > >
> > > you could use an AttributeModifier/AttributeAppender
> > >
> > >   gerolf
> > >
> > > On Jan 30, 2008 11:42 PM, i ii  wrote:
> > >
> > >>
> > >> how can i use onComponentTag for a PasswordTextField? method is final?
> > >>
> > >> i need to add dynamic javascript to onfocus
> > >> -
> > >> To unsubscribe, e-mail: [EMAIL PROTECTED]
> > >> For additional commands, e-mail: [EMAIL PROTECTED]
> > >>
> > >>
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: How can I use onComponentTag for a PasswordTextField?

2008-01-30 Thread i ii

i get it now. i need to use onComponentTag most times because it is not as 
heavy, but if i cannot then i need AttributeAppender! thank you!


> Date: Wed, 30 Jan 2008 23:55:49 +0100
> From: [EMAIL PROTECTED]
> To: users@wicket.apache.org
> Subject: Re: How can I use onComponentTag for a PasswordTextField?
> 
> On Jan 30, 2008 11:50 PM, i ii  wrote:
> 
>>
>> thank you for your fast reply. from what you said i found
>>
>> link.add(new AttributeAppender("onmouseover", new Model("foo();return
>> false;"), ";"));
>>
>> what benefit is to use AttributeAppender versus onComponentTag? why two
>> ways?
>>
> 
> 
> because sometimes onComponentTag is final ;)
> 
> there are lots of situations where using an AttributeAppender is just
> shorter (codewise).
> so instead of creating an anonymous inner class and overriding
> onComponentTag,
> you can just add an AttributeAppender -> one-liner
> 
> notice, AttributeAppender is a bit "heavier" than overriding onComponentTag
> for obvious reasons.
> 
>   gerolf
> 
>>
>> 
>>> Date: Wed, 30 Jan 2008 23:44:54 +0100
>>> From: [EMAIL PROTECTED]
>>> To: users@wicket.apache.org
>>> Subject: Re: How can I use onComponentTag for a PasswordTextField?
>>>
>>> you could use an AttributeModifier/AttributeAppender
>>>
>>>   gerolf
>>>
>>> On Jan 30, 2008 11:42 PM, i ii  wrote:
>>>

 how can i use onComponentTag for a PasswordTextField? method is final?

 i need to add dynamic javascript to onfocus
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How can I use onComponentTag for a PasswordTextField?

2008-01-30 Thread Gerolf Seitz
On Jan 30, 2008 11:50 PM, i ii <[EMAIL PROTECTED]> wrote:

>
> thank you for your fast reply. from what you said i found
>
> link.add(new AttributeAppender("onmouseover", new Model("foo();return
> false;"), ";"));
>
> what benefit is to use AttributeAppender versus onComponentTag? why two
> ways?
>


because sometimes onComponentTag is final ;)

there are lots of situations where using an AttributeAppender is just
shorter (codewise).
so instead of creating an anonymous inner class and overriding
onComponentTag,
you can just add an AttributeAppender -> one-liner

notice, AttributeAppender is a bit "heavier" than overriding onComponentTag
for obvious reasons.

  gerolf

>
> 
> > Date: Wed, 30 Jan 2008 23:44:54 +0100
> > From: [EMAIL PROTECTED]
> > To: users@wicket.apache.org
> > Subject: Re: How can I use onComponentTag for a PasswordTextField?
> >
> > you could use an AttributeModifier/AttributeAppender
> >
> >   gerolf
> >
> > On Jan 30, 2008 11:42 PM, i ii  wrote:
> >
> >>
> >> how can i use onComponentTag for a PasswordTextField? method is final?
> >>
> >> i need to add dynamic javascript to onfocus
> >> -
> >> To unsubscribe, e-mail: [EMAIL PROTECTED]
> >> For additional commands, e-mail: [EMAIL PROTECTED]
> >>
> >>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


RE: How can I use onComponentTag for a PasswordTextField?

2008-01-30 Thread i ii

thank you for your fast reply. from what you said i found

link.add(new AttributeAppender("onmouseover", new Model("foo();return false;"), 
";"));

what benefit is to use AttributeAppender versus onComponentTag? why two ways?



> Date: Wed, 30 Jan 2008 23:44:54 +0100
> From: [EMAIL PROTECTED]
> To: users@wicket.apache.org
> Subject: Re: How can I use onComponentTag for a PasswordTextField?
> 
> you could use an AttributeModifier/AttributeAppender
> 
>   gerolf
> 
> On Jan 30, 2008 11:42 PM, i ii  wrote:
> 
>>
>> how can i use onComponentTag for a PasswordTextField? method is final?
>>
>> i need to add dynamic javascript to onfocus
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Ajax Busy Indicator

2008-01-30 Thread Igor Vaynberg
no, you dont need to extend an ajaxbutton, IAjaxIndicatorAware works
on any component that has any kind of ajax behavior added to it

-igor


On Jan 30, 2008 1:34 PM, Martin Makundi
<[EMAIL PROTECTED]> wrote:
> Hi!
>
> Tnx Igor, I finally got it working after quite some wrestling.. I
> understood I must extend the AjaxButton? I shall play around with it
> some more in order to more fully understand it.
>
> However, in case someone else needs it too, my complete code and
> markup is available below for ajax busy indicator for form submit
> button.
>
> /**
>  * This class TODO
>  */
> public class IndicatorLogin extends WebPage {
>   private static final long serialVersionUID = 1L;
> /**
>  * Constructor for TODO
>  */
> @SuppressWarnings("serial")
> public IndicatorLogin() {
> final Form loginForm = new Form("loginForm", new Model());
> final AjaxIndicatorContainer indicatorContainer = new
> AjaxIndicatorContainer(loginForm);
> {
>   TextField userIdField = new TextField("userId", new Model());
>   userIdField.setRequired(true);
>   loginForm.add(userIdField);
> }
> {
>   PasswordTextField passwdField = new
> PasswordTextField("password", new Model());
>   passwdField.setResetPassword(false);
>   loginForm.add(passwdField);
> }
> {
>   final AjaxButton loginButton = new MyAjaxButton("loginButton",
> loginForm) {
> @Override
> protected void onSubmit(AjaxRequestTarget arg0, Form arg1) {
>   simulateLoginTransaction();
> }
>
> public String getAjaxIndicatorMarkupId() {
>   return indicatorContainer.getMarkupId();
> }
>   };
>   loginForm.add(loginButton);
> }
> add(new FeedbackPanel("feedback"));
> add(loginForm);
> }
>
>   /**
>* This method TODO
>*/
>   synchronized void simulateLoginTransaction() {
> System.out.println("Transaction begin.");
> try {
>   Thread.sleep(5000);
> } catch (InterruptedException e) {
>   e.printStackTrace();
> }
> System.out.println("Transaction complete.");
>   }
> }
>
> /**
>  * This class TODO
>  */
> @SuppressWarnings("serial")
> class AjaxIndicatorContainer extends WebMarkupContainer {
>   /**
>* Constructor for TODO
>* @param form
>*/
>   public AjaxIndicatorContainer(Form form) {
> super("ajaxIndicator"); // wicket:id
> setOutputMarkupId(true);
> setMarkupId("ajaxIndicatorId"); // markup:id
> form.add(this);
>   }
>
>   /**
>* @see 
> org.apache.wicket.Component#onComponentTag(org.apache.wicket.markup.ComponentTag)
>*/
>   @Override
>   protected void onComponentTag(ComponentTag tag) {
> super.onComponentTag(tag);
> tag.put("src",urlFor(AbstractDefaultAjaxBehavior.INDICATOR));
>   }
> }
>
> abstract class MyAjaxButton extends AjaxButton implements IAjaxIndicatorAware 
> {
>   /**
>* Constructor for TODO
>*
>* @param id
>* @param form
>*/
>   public MyAjaxButton(String id, Form form) {
> super(id, form);
>   }
> };
>
>
> http://wicket.sourceforge.net";>
> 
> Login form
> 
> 
> Login
> Feedback messages will be here.
> 
> 
> 
> Username:
> 
> 
> 
> Password: 
> 
>  wicket:id="ajaxIndicator"/>
> 
> 
> 
> 
> 
> 
>
>
> **
> Martin
>
>
> 2008/1/30, Igor Vaynberg <[EMAIL PROTECTED]>:
> >  > id="ajaxIndicatorImage"/> should get you started :)
> >
> > the only caveat is if that image component for some reason has
> > setoutputmarkupid(true) set on it, in which case the id attr you put
> > into markup will be overwritten, to make this thing work dynamically
> > you would
> >
> > final Image image=new Image("ajxIndicatorImage", ...);
> > image.setOutputMarkupId(true);
> > image.setMarkupId('whatever-you-want-but-make-sure-its-unique');
> >
> > pass that markup id to your iajaxindicatorware component
> >
> > alternatively you can wire up the two components so the use wicket's
> > automatically generated markup id which is available via
> > component.getmarkupid() but the caveat is that it is only available
> > during render
> >
> > -igor
> >
> > class abstract mycomponent implements iajaxindicatoraware {
> > };
> >
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How can I use onComponentTag for a PasswordTextField?

2008-01-30 Thread Gerolf Seitz
you could use an AttributeModifier/AttributeAppender

  gerolf

On Jan 30, 2008 11:42 PM, i ii <[EMAIL PROTECTED]> wrote:

>
> how can i use onComponentTag for a PasswordTextField? method is final?
>
> i need to add dynamic javascript to onfocus
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


How can I use onComponentTag for a PasswordTextField?

2008-01-30 Thread i ii

how can i use onComponentTag for a PasswordTextField? method is final? 

i need to add dynamic javascript to onfocus
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Workaround for "AjaxEditableLabel yields java.lang.IllegalAccessError (WICKET-1239)"?

2008-01-30 Thread Edvin Syse

Hi,

I really need the AjaxEditableLabel in my application, but because of https://issues.apache.org/jira/browse/WICKET-1239, it seems useless at 
the time. (Just tested with Linux/Java 1.6_04/Wicket 1.3.1).


Does anyone know of a workaround in the meantime?

java.lang.IllegalAccessError: tried to access method org.apache.wicket.Component.onModelChanging()V from class 
org.apache.wicket.extensions.ajax.markup.html.AjaxEditableLabel$1


-- Edvin

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Page Expired when going back to an ajax page

2008-01-30 Thread Andrew Williams
Bad form to reply to myself, but if anyone else had problems with this  
there is an undocumented protected method "onlyTargetActivePage()"  
which should be called from an overridden constructor.


Best wishes,
Andrew

On 27 Jan 2008, at 15:01, Andrew Williams wrote:


I have a peculiar problem that I hope can be solved by the experts!

I have on my application pages a panel that is updated using an  
AbstractAjaxTimerBehavior to update the style attribute making it  
visible or not.
This works just fine on the current page. If, however, I press the  
back button in the browser to show a page that is no longer in the  
current session this problem occurs:


After the time of the ajax timer passes the request is sent for the  
panel update and the whole page is replaced by the standard "Page  
Expired" exception page.


Is there a way to change this behaviour so it simply does not update  
instead of causing this exception to be thrown?


Many thanks in advance,
Andrew

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Hello World Program is not working

2008-01-30 Thread Wilko Hische

Hi Gurvinder,


"Caused by: java.lang.ClassNotFoundException:
org.apache.wicket.examples.helloworld.HelloWorldApplication"

I would suggest to play with http://wicket.apache.org/quickstart.html first

Success,

Wilko




Gurvinder Pal Singh wrote:
> 
> Hi, i created a project as mentioned in
> http://wicket.apache.org/examplehelloworld.html, and tried to run it on
> tomcat server. But it is giving me errors. Error Log from tomcat is shown
> below:
> 
> 
> 2008-01-29 11:33:54 StandardContext[/HelloWorld]: Exception starting
> filter HelloWorldApplication
> org.apache.wicket.WicketRuntimeException: Unable to create application of
> class org.apache.wicket.examples.helloworld.HelloWorldApplication
> .
> Caused by: java.lang.ClassNotFoundException:
> org.apache.wicket.examples.helloworld.HelloWorldApplication
>   at
> org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1428)
>   at
> org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1274)
>   at
> org.apache.wicket.protocol.http.ContextParamWebApplicationFactory.createApplication(ContextParamWebApplicationFactory.java:68)
>   ... 45 more 
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Hello-World-Program-is-not-working-tp15153342p15193213.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Feedback Panel and Ajax Busy Indicator

2008-01-30 Thread Martin Makundi
Hi!

I got the Ajax busy indicator working with the code below, but I have
run into a new problem: the feedbackpanel does not display the
feedbacks anymore. Does anyone know what I managed to do wrong
eventually? And more importantly, how to fix the feedback panel?

**
Martin

2008/1/30, Martin Makundi <[EMAIL PROTECTED]>:
> Hi!
>
> Tnx Igor, I finally got it working after quite some wrestling.. I
> understood I must extend the AjaxButton? I shall play around with it
> some more in order to more fully understand it.
>
> However, in case someone else needs it too, my complete code and
> markup is available below for ajax busy indicator for form submit
> button.
>
> /**
>  * This class TODO
>  */
> public class IndicatorLogin extends WebPage {
>   private static final long serialVersionUID = 1L;
> /**
>  * Constructor for TODO
>  */
> @SuppressWarnings("serial")
> public IndicatorLogin() {
> final Form loginForm = new Form("loginForm", new Model());
> final AjaxIndicatorContainer indicatorContainer = new
> AjaxIndicatorContainer(loginForm);
> {
>   TextField userIdField = new TextField("userId", new Model());
>   userIdField.setRequired(true);
>   loginForm.add(userIdField);
> }
> {
>   PasswordTextField passwdField = new
> PasswordTextField("password", new Model());
>   passwdField.setResetPassword(false);
>   loginForm.add(passwdField);
> }
> {
>   final AjaxButton loginButton = new MyAjaxButton("loginButton",
> loginForm) {
> @Override
> protected void onSubmit(AjaxRequestTarget arg0, Form arg1) {
>   simulateLoginTransaction();
> }
>
> public String getAjaxIndicatorMarkupId() {
>   return indicatorContainer.getMarkupId();
> }
>   };
>   loginForm.add(loginButton);
> }
> add(new FeedbackPanel("feedback"));
> add(loginForm);
> }
>
>   /**
>* This method TODO
>*/
>   synchronized void simulateLoginTransaction() {
> System.out.println("Transaction begin.");
> try {
>   Thread.sleep(5000);
> } catch (InterruptedException e) {
>   e.printStackTrace();
> }
> System.out.println("Transaction complete.");
>   }
> }
>
> /**
>  * This class TODO
>  */
> @SuppressWarnings("serial")
> class AjaxIndicatorContainer extends WebMarkupContainer {
>   /**
>* Constructor for TODO
>* @param form
>*/
>   public AjaxIndicatorContainer(Form form) {
> super("ajaxIndicator"); // wicket:id
> setOutputMarkupId(true);
> setMarkupId("ajaxIndicatorId"); // markup:id
> form.add(this);
>   }
>
>   /**
>* @see 
> org.apache.wicket.Component#onComponentTag(org.apache.wicket.markup.ComponentTag)
>*/
>   @Override
>   protected void onComponentTag(ComponentTag tag) {
> super.onComponentTag(tag);
> tag.put("src",urlFor(AbstractDefaultAjaxBehavior.INDICATOR));
>   }
> }
>
> abstract class MyAjaxButton extends AjaxButton implements IAjaxIndicatorAware 
> {
>   /**
>* Constructor for TODO
>*
>* @param id
>* @param form
>*/
>   public MyAjaxButton(String id, Form form) {
> super(id, form);
>   }
> };
>
>
> http://wicket.sourceforge.net";>
> 
> Login form
> 
> 
> Login
> Feedback messages will be here.
> 
> 
> 
> Username:
> 
> 
> 
> Password: 
> 
>  wicket:id="ajaxIndicator"/>
> 
> 
> 
> 
> 
> 
>
>
> **
> Martin
>
>
> 2008/1/30, Igor Vaynberg <[EMAIL PROTECTED]>:
> >  > id="ajaxIndicatorImage"/> should get you started :)
> >
> > the only caveat is if that image component for some reason has
> > setoutputmarkupid(true) set on it, in which case the id attr you put
> > into markup will be overwritten, to make this thing work dynamically
> > you would
> >
> > final Image image=new Image("ajxIndicatorImage", ...);
> > image.setOutputMarkupId(true);
> > image.setMarkupId('whatever-you-want-but-make-sure-its-unique');
> >
> > pass that markup id to your iajaxindicatorware component
> >
> > alternatively you can wire up the two components so the use wicket's
> > automatically generated markup id which is available via
> > component.getmarkupid() but the caveat is that it is only available
> > during render
> >
> > -igor
> >
> > class abstract mycomponent implements iajaxindicatoraware {
> > };
> >
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Exposing a web service from a Wicket app

2008-01-30 Thread Ryan Sonnek
I know where you're coming from Zach.  I went through something
similar when creating RSS/Atom feeds with Wicket.

You may want to look into the wicketstuff-rome project to see details
on how I integrated these features into Wicket.  It ended up being
pretty clean using the Wicket Resource API's, and I think you could do
the same thing for REST API's.

On Jan 30, 2008 3:36 PM, Konstantin Ignatyev <[EMAIL PROTECTED]> wrote:
>  http://xstream.codehaus.org/ takes care of it, why wicket should be used?
>
> Konstantin Ignatyev
>
>
>
>
> - Original Message 
> From: Martijn Dashorst <[EMAIL PROTECTED]>
> To: users@wicket.apache.org
> Sent: Wednesday, January 30, 2008 1:24:44 PM
> Subject: Re: Exposing a web service from a Wicket app
>
>
> It
> could,
> but
> that
> would
> be
> using
> a
> ferrari
> to
> do
> grocery
> shopping
> :-)
>
> I
> guess
> you
> could
> mount
> an
> XML
> document
> as
> a
> page
> (easy
> to
> achieve,
> wiki
> should
> have
> documents
> on
> this).
>
> I'm
> not
> 100%
> sure
> that
> json
> would
> be
> a
> good
> fit,
> as
> Wicket
> likes
> to
> manipulate
> (XML-like)
> markup,
> not
> text
> templates.
>
> Martijn
>
> On
> 1/30/08,
> Zach
> Cox
> <[EMAIL PROTECTED]>
> wrote:
> >
> >
> We're
> creating
> a
> web
> app
> using
> Wicket
> and
> would
> like
> to
> expose
> several
> >
> simple
> features
> via
> a
> RESTful
> web
> service.
> So
> basically,
> several
> URLs
> >
> would
> return
> XML
> or
> JSON
> formatted
> data
> instead
> of
> HTML.
> >
> >
> Is
> there
> an
> easy
> way
> to
> do
> this
> in
> Wicket
> to
> provide
> a
> very
> simple
> web
> >
> service,
> or
> should
> we
> just
> look
> into
> something
> separate
> like
> Jersey
> >
> (https://jersey.dev.java.net/)?
> >
> >
> -
> >
> To
> unsubscribe,
> e-mail:
> [EMAIL PROTECTED]
> >
> For
> additional
> commands,
> e-mail:
> [EMAIL PROTECTED]
> >
> >
>
>
> --
> Buy
> Wicket
> in
> Action:
> http://manning.com/dashorst
> Apache
> Wicket
> 1.3.0
> is
> released
> Get
> it
> now:
> http://www.apache.org/dyn/closer.cgi/wicket/1.3.0
>
>
>
>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Exposing a web service from a Wicket app

2008-01-30 Thread Konstantin Ignatyev
 http://xstream.codehaus.org/ takes care of it, why wicket should be used?
 
Konstantin Ignatyev 



- Original Message 
From: Martijn Dashorst <[EMAIL PROTECTED]>
To: users@wicket.apache.org
Sent: Wednesday, January 30, 2008 1:24:44 PM
Subject: Re: Exposing a web service from a Wicket app


It 
could, 
but 
that 
would 
be 
using 
a 
ferrari 
to 
do 
grocery 
shopping 
:-)

I 
guess 
you 
could 
mount 
an 
XML 
document 
as 
a 
page 
(easy 
to 
achieve, 
wiki
should 
have 
documents 
on 
this).

I'm 
not 
100% 
sure 
that 
json 
would 
be 
a 
good 
fit, 
as 
Wicket 
likes 
to
manipulate 
(XML-like) 
markup, 
not 
text 
templates.

Martijn

On 
1/30/08, 
Zach 
Cox 
<[EMAIL PROTECTED]> 
wrote:
>
> 
We're 
creating 
a 
web 
app 
using 
Wicket 
and 
would 
like 
to 
expose 
several
> 
simple 
features 
via 
a 
RESTful 
web 
service.  
So 
basically, 
several 
URLs
> 
would 
return 
XML 
or 
JSON 
formatted 
data 
instead 
of 
HTML.
>
> 
Is 
there 
an 
easy 
way 
to 
do 
this 
in 
Wicket 
to 
provide 
a 
very 
simple 
web
> 
service, 
or 
should 
we 
just 
look 
into 
something 
separate 
like 
Jersey
> 
(https://jersey.dev.java.net/)?
>
> 
-
> 
To 
unsubscribe, 
e-mail: 
[EMAIL PROTECTED]
> 
For 
additional 
commands, 
e-mail: 
[EMAIL PROTECTED]
>
>


-- 
Buy 
Wicket 
in 
Action: 
http://manning.com/dashorst
Apache 
Wicket 
1.3.0 
is 
released
Get 
it 
now: 
http://www.apache.org/dyn/closer.cgi/wicket/1.3.0






Re: Ajax Busy Indicator

2008-01-30 Thread Martin Makundi
Hi!

Tnx Igor, I finally got it working after quite some wrestling.. I
understood I must extend the AjaxButton? I shall play around with it
some more in order to more fully understand it.

However, in case someone else needs it too, my complete code and
markup is available below for ajax busy indicator for form submit
button.

/**
 * This class TODO
 */
public class IndicatorLogin extends WebPage {
  private static final long serialVersionUID = 1L;
/**
 * Constructor for TODO
 */
@SuppressWarnings("serial")
public IndicatorLogin() {
final Form loginForm = new Form("loginForm", new Model());
final AjaxIndicatorContainer indicatorContainer = new
AjaxIndicatorContainer(loginForm);
{
  TextField userIdField = new TextField("userId", new Model());
  userIdField.setRequired(true);
  loginForm.add(userIdField);
}
{
  PasswordTextField passwdField = new
PasswordTextField("password", new Model());
  passwdField.setResetPassword(false);
  loginForm.add(passwdField);
}
{
  final AjaxButton loginButton = new MyAjaxButton("loginButton",
loginForm) {
@Override
protected void onSubmit(AjaxRequestTarget arg0, Form arg1) {
  simulateLoginTransaction();
}

public String getAjaxIndicatorMarkupId() {
  return indicatorContainer.getMarkupId();
}
  };
  loginForm.add(loginButton);
}
add(new FeedbackPanel("feedback"));
add(loginForm);
}

  /**
   * This method TODO
   */
  synchronized void simulateLoginTransaction() {
System.out.println("Transaction begin.");
try {
  Thread.sleep(5000);
} catch (InterruptedException e) {
  e.printStackTrace();
}
System.out.println("Transaction complete.");
  }
}

/**
 * This class TODO
 */
@SuppressWarnings("serial")
class AjaxIndicatorContainer extends WebMarkupContainer {
  /**
   * Constructor for TODO
   * @param form
   */
  public AjaxIndicatorContainer(Form form) {
super("ajaxIndicator"); // wicket:id
setOutputMarkupId(true);
setMarkupId("ajaxIndicatorId"); // markup:id
form.add(this);
  }

  /**
   * @see 
org.apache.wicket.Component#onComponentTag(org.apache.wicket.markup.ComponentTag)
   */
  @Override
  protected void onComponentTag(ComponentTag tag) {
super.onComponentTag(tag);
tag.put("src",urlFor(AbstractDefaultAjaxBehavior.INDICATOR));
  }
}

abstract class MyAjaxButton extends AjaxButton implements IAjaxIndicatorAware {
  /**
   * Constructor for TODO
   *
   * @param id
   * @param form
   */
  public MyAjaxButton(String id, Form form) {
super(id, form);
  }
};


http://wicket.sourceforge.net";>

Login form


Login
Feedback messages will be here.



Username:



Password: 










**
Martin


2008/1/30, Igor Vaynberg <[EMAIL PROTECTED]>:
>  id="ajaxIndicatorImage"/> should get you started :)
>
> the only caveat is if that image component for some reason has
> setoutputmarkupid(true) set on it, in which case the id attr you put
> into markup will be overwritten, to make this thing work dynamically
> you would
>
> final Image image=new Image("ajxIndicatorImage", ...);
> image.setOutputMarkupId(true);
> image.setMarkupId('whatever-you-want-but-make-sure-its-unique');
>
> pass that markup id to your iajaxindicatorware component
>
> alternatively you can wire up the two components so the use wicket's
> automatically generated markup id which is available via
> component.getmarkupid() but the caveat is that it is only available
> during render
>
> -igor
>
> class abstract mycomponent implements iajaxindicatoraware {
> };
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Exposing a web service from a Wicket app

2008-01-30 Thread Martijn Dashorst
It could, but that would be using a ferrari to do grocery shopping :-)

I guess you could mount an XML document as a page (easy to achieve, wiki
should have documents on this).

I'm not 100% sure that json would be a good fit, as Wicket likes to
manipulate (XML-like) markup, not text templates.

Martijn

On 1/30/08, Zach Cox <[EMAIL PROTECTED]> wrote:
>
> We're creating a web app using Wicket and would like to expose several
> simple features via a RESTful web service.  So basically, several URLs
> would return XML or JSON formatted data instead of HTML.
>
> Is there an easy way to do this in Wicket to provide a very simple web
> service, or should we just look into something separate like Jersey
> (https://jersey.dev.java.net/)?
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
Buy Wicket in Action: http://manning.com/dashorst
Apache Wicket 1.3.0 is released
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0


Exposing a web service from a Wicket app

2008-01-30 Thread Zach Cox
We're creating a web app using Wicket and would like to expose several
simple features via a RESTful web service.  So basically, several URLs
would return XML or JSON formatted data instead of HTML.

Is there an easy way to do this in Wicket to provide a very simple web
service, or should we just look into something separate like Jersey
(https://jersey.dev.java.net/)?

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Scrollbar in popup window?

2008-01-30 Thread palun

That's exactly what I needed! Works fine now. (Should have spotted that one
myself, sorry.)
Thanks.
/ulf

Don't know if this is what you want...

add(new BookmarkablePageLink("instrLink", InstructionsPopupPage.class,
params).setPopupSettings(PopupSettings.SCROLLBARS));



-- 
View this message in context: 
http://www.nabble.com/Scrollbar-in-popup-window--tp15182160p15191400.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: AJAX: form components not being updated

2008-01-30 Thread Michael Mehrle
I called it on the form, which houses the model and it worked :-) Thanks
a bunch Igor!

Michael

-Original Message-
From: Igor Vaynberg [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, January 29, 2008 6:02 PM
To: users@wicket.apache.org
Subject: Re: AJAX: form components not being updated

getModel().setObject(foo); on the component that is housing the
CompoundPropertyModel instance...

-igor


On Jan 29, 2008 5:01 PM, Michael Mehrle <[EMAIL PROTECTED]> wrote:
> Anyone? All I need to know is how to assign a generated model to my
form
> components. The original (empty) one is a CompoundPropertyModel.
>
> Michael
>
>
> -Original Message-
> From: Michael Mehrle [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, January 29, 2008 3:58 PM
> To: users@wicket.apache.org
> Subject: AJAX: form components not being updated
>
> I've got something similar to this call:
>
> myAutoCompleteTextField.add(new AjaxFormSubmitBehavior(form,
"onchange")
> {
> protected void onSubmit(AjaxRequestTarget target) {
>
> String selection =
> myAutoCompleteTextField.getModelObjectAsString();
>
> MyPOJO backingModel = someFunkyModelFactory(selection);
>
> myModel = new CompoundPropertyModel(backingModel);
>
> target.addComponent(firstComp);
> target.addComponent(secondComp);
> ...
> }
>
> For some reason my form components are not being updated to the new
> model. What am I doing wrong here?
>
> Any pointers would be welcome - thanks!
>
> Michael
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Pagemap null is still locked by blah exception, help!! why does wicket have to lock the pagemap

2008-01-30 Thread cemeterygate

yea, i am using a thread pool. thanks

Eelco Hillenius wrote:
> 
> On Jan 30, 2008 10:00 AM, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
>> what you have now is better - doing a search in a different thread -
>> because it doesnt bogged on servlet contains's threadpool.
> 
> The only thing to consider is that you might want to limit the number
> of threads you can spawn. Consider using a thread pool.
> 
> Eelco
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Pagemap-null-is-still-locked-by-blah-exception%2C-help%21%21-why-does-wicket-have-to-lock-the-pagemap-tp15146763p15190992.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Pagemap null is still locked by blah exception, help!! why does wicket have to lock the pagemap

2008-01-30 Thread cemeterygate

I agreed, able to interupt previous request and start a new is nice to have
:) i am pulling per 1 second because some queries actually come back pretty
quick. i hope this is not going to put stress on the server when there are
excessive number of long requests. 

Thanks for answering my questions.


igor.vaynberg wrote:
> 
> what you have now is better - doing a search in a different thread -
> because it doesnt bogged on servlet contains's threadpool.
> 
> -igor
> 
> 
> On Jan 30, 2008 9:11 AM, cemeterygate <[EMAIL PROTECTED]> wrote:
>>
>> arrrg, I've already changed the implementation by using auto refresh,
>> which
>> isn't that bad either, I can interupt the previous search request. but if
>> i
>> have saw ur post earlier, i wouldn't go long way to make those changes.
>>
>> Thanks anyway.
>>
>>
>>
>> Johan Compagner wrote:
>> >
>> > If 1 page instance can be accessed by multiply threads we suddenly have
>> to
>> > have synchronize blocks all over the place
>> > in our wicket code (especially the response area, rendering)
>> >
>> > Also in the request phase where you can alter components and so on.
>> Also
>> > needs to be synched. (add/remove of components, behaviours or
>> validatiors)
>> >
>> > Even when i just quickly think about it, there are s many things
>> that
>> > can go horrible wrong.. that i even dont dare to start coding for that.
>> >
>> > What you can do is post your search to a bookmarkable page. Those are
>> not
>> > locked because you create a new instance
>> >
>> > johan
>> >
>> >
>> > On Jan 29, 2008 4:51 PM, cemeterygate <[EMAIL PROTECTED]> wrote:
>> >
>> >>
>> >> that's right, i am screwed anyway if request takes too long, but from
>> the
>> >> browser user decide to give up current search by click the stop button
>> >> and
>> >> fire a new search. Since the pagemap is still locked by previous
>> request,
>> >> the second request will have to wait. sounds like i will end up handle
>> >> this
>> >> senario by pulling. is it possible to have a page that's not single
>> >> thread
>> >> model? Can we have two interface, such as SingleThreadPage, and
>> >> ConcurrentThreadPage?
>> >>
>> >>
>> >> igor.vaynberg wrote:
>> >> >
>> >> > yeah, if it takes a while the browser will timeout and you are
>> screwed
>> >> > anyways...
>> >> >
>> >> > what do you mean they cant start a new search? you mean they no
>> longer
>> >> > for the results of the currently running search and just press the
>> >> > search button again?
>> >> >
>> >> > if they would open a new tab with the search page, and you had
>> >> > automultiwindowsupport option enabled that new opened page would be
>> >> > created in a new pagemap, and so you wouldnt have a locking
>> problem...
>> >> >
>> >> > -igor
>> >> >
>> >> >
>> >> > On Jan 28, 2008 2:51 PM, Johan Compagner <[EMAIL PROTECTED]>
>> wrote:
>> >> >> shared resources are not synced thats one way of going round it.
>> >> >>
>> >> >> the other way is as igor describes. do the search in a seperate
>> >> thread.
>> >> >> If it really takes that long then you do know that browsers also
>> can
>> >> just
>> >> >> time out after they don't get anything for a while?
>> >> >>
>> >> >> If it really takes that long then you should build a page where
>> people
>> >> >> can
>> >> >> fire searches to the system
>> >> >> and the page is just displayig the searches they did and then if
>> the
>> >> >> search
>> >> >> is finished that page can bring them to the result
>> >> >>
>> >> >> johan
>> >> >>
>> >> >>
>> >> >>
>> >> >>
>> >> >> On Jan 28, 2008 11:46 PM, cemeterygate <[EMAIL PROTECTED]>
>> wrote:
>> >> >>
>> >> >> >
>> >> >> > that's nice to have but is there a way to work around this issue?
>> >> Our
>> >> >> > application for customer service and they perform a lot search on
>> a
>> >> >> huge
>> >> >> > database, in some cases, customer service would like to start new
>> >> >> search.
>> >> >> > Since wicket is locked by page path, there is no way for CSR to
>> >> start
>> >> a
>> >> >> > new
>> >> >> > request until previous one is finished.
>> >> >> >
>> >> >> >
>> >> >> > igor.vaynberg wrote:
>> >> >> > >
>> >> >> > > the pages are locked on the pagemap. so you cannot have two
>> >> >> concurrent
>> >> >> > > requests from the same user to the same pagemap. this is so
>> when
>> >> you
>> >> >> > > are coding your pages you can use the much simpler
>> single-threaded
>> >> >> > > model.
>> >> >> > >
>> >> >> > > every have fields in your servlet implementation? those have to
>> be
>> >> >> > > synchronized or you will run into threading issues. this is the
>> >> stuff
>> >> >> > > we make sure you dont have to worry about.
>> >> >> > >
>> >> >> > > the trade off is that if you have long running requests you
>> should
>> >> >> > > probably process them in a different thread and let the UI poll
>> >> for
>> >> >> > > status.
>> >> >> > >
>> >> >> > > -igor
>> >> >> > >
>> >> >> > >
>> >> >> > > On Jan 28, 2008 2:08 PM, cemeterygate <[EMAIL PROTECTED]>
>> >> wrote:
>> 

Re: Scrollbar in popup window?

2008-01-30 Thread Andy Czerwonka
Is there a way to do it within a div right on a page?

"palun" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]
>
> How do I get vertical scrollbar in a popup window with (too) long content?
> Popup is created like so:
>
> add(new BookmarkablePageLink("instrLink", InstructionsPopupPage.class,
> params).setPopupSettings(popupSettings));
>
> The purpose is to show a rather long information text in a separate window
> whenever user clicks an info icon. Content is static html. If anyone has
> comments / suggestions on how to best do this from a wicket app, please 
> let
> me know.
>
> Many thanks
> /ulf
> -- 
> View this message in context: 
> http://www.nabble.com/Scrollbar-in-popup-window--tp15182160p15182160.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
> 




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Monitoring Wicket using JAMon

2008-01-30 Thread Eelco Hillenius
On Jan 30, 2008 11:20 AM, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
> but per page...

Why don't you just answer then.

Eelco

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Monitoring Wicket using JAMon

2008-01-30 Thread Igor Vaynberg
but per page...

-igor


On Jan 30, 2008 11:18 AM, Eelco Hillenius <[EMAIL PROTECTED]> wrote:
> On Jan 30, 2008 11:14 AM, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
> > because he wants to know what page instance was accessed?
>
> He wants to monitor performance of requests from what I read.
>
>
> Eelco
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Monitoring Wicket using JAMon

2008-01-30 Thread Eelco Hillenius
On Jan 30, 2008 11:14 AM, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
> because he wants to know what page instance was accessed?

He wants to monitor performance of requests from what I read.

Eelco

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Pagemap null is still locked by blah exception, help!! why does wicket have to lock the pagemap

2008-01-30 Thread Eelco Hillenius
On Jan 30, 2008 10:00 AM, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
> what you have now is better - doing a search in a different thread -
> because it doesnt bogged on servlet contains's threadpool.

The only thing to consider is that you might want to limit the number
of threads you can spawn. Consider using a thread pool.

Eelco

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Monitoring Wicket using JAMon

2008-01-30 Thread Igor Vaynberg
because he wants to know what page instance was accessed?

-igor


On Jan 30, 2008 11:11 AM, Eelco Hillenius <[EMAIL PROTECTED]> wrote:
> > 1. ISessionStore.onBeginRequest and ISessionStore.onEndRequest
> > 2. RequestCycle.onBeginRequest and RequestCycle.onEndRequest.
> >
> > For now I choose to override the ISessionStore because that one is
> > called before and after the RequestCycle methods. I want to check with
> > you guys if this is the best option or not. Which one do you
> > recommend? Is there maybe another candidate I overlooked?
>
> Logically, 2 is nicer, but 1 might give you more clean results. Why
> not use WicketFilter though? If you need/ want separate methods, you
> could just create your own variant of WicketFilter.
>
> Eelco
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Monitoring Wicket using JAMon

2008-01-30 Thread Eelco Hillenius
> 1. ISessionStore.onBeginRequest and ISessionStore.onEndRequest
> 2. RequestCycle.onBeginRequest and RequestCycle.onEndRequest.
>
> For now I choose to override the ISessionStore because that one is
> called before and after the RequestCycle methods. I want to check with
> you guys if this is the best option or not. Which one do you
> recommend? Is there maybe another candidate I overlooked?

Logically, 2 is nicer, but 1 might give you more clean results. Why
not use WicketFilter though? If you need/ want separate methods, you
could just create your own variant of WicketFilter.

Eelco

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Mounting strategies for shared components bundled in a jar ?

2008-01-30 Thread mfs

Thanks...does the job..

mfs wrote:
> 
> Guys,
> 
> How would i go about mounting the pages bundled in a jar that are being
> re-used by different web apps. 
> 
> I don't want to mount them in every web-application that uses them, rather
> would prefer keeping the mounting logic in the shared library itself..
> 
> Any ideas ? 
> 

-- 
View this message in context: 
http://www.nabble.com/Mounting-strategies-for-shared-components-bundled-in-a-jar---tp15173739p15188775.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Simple edit form and models

2008-01-30 Thread Edvin Syse
First of all I want to congratulate Wicket guys for their work. 
Until today I have developed applications based mainly on SWT/RCP and
JSP/Servlets. 
Currently we are evaluating various frameworks in order to initiate a new

project, which will expose many of our in-house developed system (SWT/RCP)
functions through web.
It seems that Wicket is very close to what we are looking for, because more
or less we have the same logic in our gui applications.
I am trying to create a common template for edit forms responsible to edit
properties of a single pojo. In general, I want to have fool control over
the synchronization between the form’s data and pojo’s fields.
I am posting some simple code. 
I would appreciate if anyone has the time to take a look and tell me if I am

following a right approach about the models and the binding technique.


Out of curiosity - what are you going to do that needs this "fool control" over the binding process? I find in most cases that using 
CompoundPropertyModel for the whole form and overriding some fields with another PropertyModel for example is sufficient in almost every 
usecase. I would do something like:


public class InputForm extends Form {
public InputForm(String id, IModel model) {
super(id, model);

add(new TextField("personCode"));
add(new TextField("lastname"));
add(new TextField("someSpecialField", new PropertyModel(someOtherObject, 
"fieldname"));

add(new Button("save") {
@Override public void onSubmit() {
// Save
}
});
}
}

Wicket takes care of all the manual labour concerning binding you are used to 
from RCP-programming, so why not just let it shine? :)

> Is it too memory expensive to keep instances of pojos inside the form?
> Does the session keeps information for all pages or just for the current
> page?

Normally you supply the form with a IModel, and depending on the size/nature of the model object you would use a LoadableModel to avoid 
saving the whole object when you move on from that page.


Wicket 1.3 now uses SecondLevelCacheSessionStore per default, and I think only the current page is in memory, and that subsequent pages are 
saved off to disk, so normally you don't need to think about optimizing for memory usage unless you have a very special case on your hands.


-- Edvin

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Fix typo on http://wicket.apache.org/community.html

2008-01-30 Thread Igor Vaynberg
done, waiting to be synced

-igor


On Jan 30, 2008 8:49 AM, Edvin Syse <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I'm sorry for being a wordnazi, but could someone please change nabble to 
> Nabble on the three entries where it is lowercase on:
>
> http://wicket.apache.org/community.html
>
> (In the mailing list section)
>
> It is correct for "Wicket Users" but lowercase for the rest of the lists.
>
> It's really bugging me :) hehe
>
> -- Edvin
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Simple edit form and models

2008-01-30 Thread Igor Vaynberg
just out of curiosity, why such a requirement instead of binding
directly to a pojo?

-igor


On Jan 30, 2008 9:33 AM, Constantin Y <[EMAIL PROTECTED]> wrote:
>
> Hi all,
>
> First of all I want to congratulate Wicket guys for their work.
> Until today I have developed applications based mainly on SWT/RCP and
> JSP/Servlets.
> Currently we are evaluating various frameworks in order to initiate a new
> project, which will expose many of our in-house developed system (SWT/RCP)
> functions through web.
> It seems that Wicket is very close to what we are looking for, because more
> or less we have the same logic in our gui applications.
> I am trying to create a common template for edit forms responsible to edit
> properties of a single pojo. In general, I want to have fool control over
> the synchronization between the form's data and pojo's fields.
> I am posting some simple code.
> I would appreciate if anyone has the time to take a look and tell me if I am
> following a right approach about the models and the binding technique.
>
> Is it too memory expensive to keep instances of pojos inside the form?
> Does the session keeps information for all pages or just for the current
> page?
>
> Thanks in advance
>
> http://www.nabble.com/file/p15186893/FormInput.html FormInput.html
> http://www.nabble.com/file/p15186893/FormInput.java FormInput.java
> http://www.nabble.com/file/p15186893/FormData.java FormData.java
> http://www.nabble.com/file/p15186893/Person.java Person.java
>
> --
> View this message in context: 
> http://www.nabble.com/Simple-edit-form-and-models-tp15186893p15186893.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Pagemap null is still locked by blah exception, help!! why does wicket have to lock the pagemap

2008-01-30 Thread Igor Vaynberg
what you have now is better - doing a search in a different thread -
because it doesnt bogged on servlet contains's threadpool.

-igor


On Jan 30, 2008 9:11 AM, cemeterygate <[EMAIL PROTECTED]> wrote:
>
> arrrg, I've already changed the implementation by using auto refresh, which
> isn't that bad either, I can interupt the previous search request. but if i
> have saw ur post earlier, i wouldn't go long way to make those changes.
>
> Thanks anyway.
>
>
>
> Johan Compagner wrote:
> >
> > If 1 page instance can be accessed by multiply threads we suddenly have to
> > have synchronize blocks all over the place
> > in our wicket code (especially the response area, rendering)
> >
> > Also in the request phase where you can alter components and so on. Also
> > needs to be synched. (add/remove of components, behaviours or validatiors)
> >
> > Even when i just quickly think about it, there are s many things that
> > can go horrible wrong.. that i even dont dare to start coding for that.
> >
> > What you can do is post your search to a bookmarkable page. Those are not
> > locked because you create a new instance
> >
> > johan
> >
> >
> > On Jan 29, 2008 4:51 PM, cemeterygate <[EMAIL PROTECTED]> wrote:
> >
> >>
> >> that's right, i am screwed anyway if request takes too long, but from the
> >> browser user decide to give up current search by click the stop button
> >> and
> >> fire a new search. Since the pagemap is still locked by previous request,
> >> the second request will have to wait. sounds like i will end up handle
> >> this
> >> senario by pulling. is it possible to have a page that's not single
> >> thread
> >> model? Can we have two interface, such as SingleThreadPage, and
> >> ConcurrentThreadPage?
> >>
> >>
> >> igor.vaynberg wrote:
> >> >
> >> > yeah, if it takes a while the browser will timeout and you are screwed
> >> > anyways...
> >> >
> >> > what do you mean they cant start a new search? you mean they no longer
> >> > for the results of the currently running search and just press the
> >> > search button again?
> >> >
> >> > if they would open a new tab with the search page, and you had
> >> > automultiwindowsupport option enabled that new opened page would be
> >> > created in a new pagemap, and so you wouldnt have a locking problem...
> >> >
> >> > -igor
> >> >
> >> >
> >> > On Jan 28, 2008 2:51 PM, Johan Compagner <[EMAIL PROTECTED]> wrote:
> >> >> shared resources are not synced thats one way of going round it.
> >> >>
> >> >> the other way is as igor describes. do the search in a seperate
> >> thread.
> >> >> If it really takes that long then you do know that browsers also can
> >> just
> >> >> time out after they don't get anything for a while?
> >> >>
> >> >> If it really takes that long then you should build a page where people
> >> >> can
> >> >> fire searches to the system
> >> >> and the page is just displayig the searches they did and then if the
> >> >> search
> >> >> is finished that page can bring them to the result
> >> >>
> >> >> johan
> >> >>
> >> >>
> >> >>
> >> >>
> >> >> On Jan 28, 2008 11:46 PM, cemeterygate <[EMAIL PROTECTED]> wrote:
> >> >>
> >> >> >
> >> >> > that's nice to have but is there a way to work around this issue?
> >> Our
> >> >> > application for customer service and they perform a lot search on a
> >> >> huge
> >> >> > database, in some cases, customer service would like to start new
> >> >> search.
> >> >> > Since wicket is locked by page path, there is no way for CSR to
> >> start
> >> a
> >> >> > new
> >> >> > request until previous one is finished.
> >> >> >
> >> >> >
> >> >> > igor.vaynberg wrote:
> >> >> > >
> >> >> > > the pages are locked on the pagemap. so you cannot have two
> >> >> concurrent
> >> >> > > requests from the same user to the same pagemap. this is so when
> >> you
> >> >> > > are coding your pages you can use the much simpler single-threaded
> >> >> > > model.
> >> >> > >
> >> >> > > every have fields in your servlet implementation? those have to be
> >> >> > > synchronized or you will run into threading issues. this is the
> >> stuff
> >> >> > > we make sure you dont have to worry about.
> >> >> > >
> >> >> > > the trade off is that if you have long running requests you should
> >> >> > > probably process them in a different thread and let the UI poll
> >> for
> >> >> > > status.
> >> >> > >
> >> >> > > -igor
> >> >> > >
> >> >> > >
> >> >> > > On Jan 28, 2008 2:08 PM, cemeterygate <[EMAIL PROTECTED]>
> >> wrote:
> >> >> > >>
> >> >> > >> So I developed my first wicket application and I kept getting
> >> >> exception
> >> >> > >> below
> >> >> > >> as soon as i point my application to production database.
> >> >> > >>
> >> >> > >> Can someone tell me why wicket can't handle concurrent request?
> >> >> > >>
> >> >> > >> to replicate this issue, i have a page with a form component and
> >> >> > regular
> >> >> > >> submit button.
> >> >> > >> on the onSubmit method,
> >> >> > >>  protected void onSubmit() {
> >> >> > >> t

Simple edit form and models

2008-01-30 Thread Constantin Y

Hi all,

First of all I want to congratulate Wicket guys for their work. 
Until today I have developed applications based mainly on SWT/RCP and
JSP/Servlets. 
Currently we are evaluating various frameworks in order to initiate a new
project, which will expose many of our in-house developed system (SWT/RCP)
functions through web.
It seems that Wicket is very close to what we are looking for, because more
or less we have the same logic in our gui applications.
I am trying to create a common template for edit forms responsible to edit
properties of a single pojo. In general, I want to have fool control over
the synchronization between the form’s data and pojo’s fields.
I am posting some simple code. 
I would appreciate if anyone has the time to take a look and tell me if I am
following a right approach about the models and the binding technique.

Is it too memory expensive to keep instances of pojos inside the form?
Does the session keeps information for all pages or just for the current
page?

Thanks in advance

http://www.nabble.com/file/p15186893/FormInput.html FormInput.html 
http://www.nabble.com/file/p15186893/FormInput.java FormInput.java 
http://www.nabble.com/file/p15186893/FormData.java FormData.java 
http://www.nabble.com/file/p15186893/Person.java Person.java 

-- 
View this message in context: 
http://www.nabble.com/Simple-edit-form-and-models-tp15186893p15186893.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Pagemap null is still locked by blah exception, help!! why does wicket have to lock the pagemap

2008-01-30 Thread cemeterygate

arrrg, I've already changed the implementation by using auto refresh, which
isn't that bad either, I can interupt the previous search request. but if i
have saw ur post earlier, i wouldn't go long way to make those changes. 

Thanks anyway.


Johan Compagner wrote:
> 
> If 1 page instance can be accessed by multiply threads we suddenly have to
> have synchronize blocks all over the place
> in our wicket code (especially the response area, rendering)
> 
> Also in the request phase where you can alter components and so on. Also
> needs to be synched. (add/remove of components, behaviours or validatiors)
> 
> Even when i just quickly think about it, there are s many things that
> can go horrible wrong.. that i even dont dare to start coding for that.
> 
> What you can do is post your search to a bookmarkable page. Those are not
> locked because you create a new instance
> 
> johan
> 
> 
> On Jan 29, 2008 4:51 PM, cemeterygate <[EMAIL PROTECTED]> wrote:
> 
>>
>> that's right, i am screwed anyway if request takes too long, but from the
>> browser user decide to give up current search by click the stop button
>> and
>> fire a new search. Since the pagemap is still locked by previous request,
>> the second request will have to wait. sounds like i will end up handle
>> this
>> senario by pulling. is it possible to have a page that's not single
>> thread
>> model? Can we have two interface, such as SingleThreadPage, and
>> ConcurrentThreadPage?
>>
>>
>> igor.vaynberg wrote:
>> >
>> > yeah, if it takes a while the browser will timeout and you are screwed
>> > anyways...
>> >
>> > what do you mean they cant start a new search? you mean they no longer
>> > for the results of the currently running search and just press the
>> > search button again?
>> >
>> > if they would open a new tab with the search page, and you had
>> > automultiwindowsupport option enabled that new opened page would be
>> > created in a new pagemap, and so you wouldnt have a locking problem...
>> >
>> > -igor
>> >
>> >
>> > On Jan 28, 2008 2:51 PM, Johan Compagner <[EMAIL PROTECTED]> wrote:
>> >> shared resources are not synced thats one way of going round it.
>> >>
>> >> the other way is as igor describes. do the search in a seperate
>> thread.
>> >> If it really takes that long then you do know that browsers also can
>> just
>> >> time out after they don't get anything for a while?
>> >>
>> >> If it really takes that long then you should build a page where people
>> >> can
>> >> fire searches to the system
>> >> and the page is just displayig the searches they did and then if the
>> >> search
>> >> is finished that page can bring them to the result
>> >>
>> >> johan
>> >>
>> >>
>> >>
>> >>
>> >> On Jan 28, 2008 11:46 PM, cemeterygate <[EMAIL PROTECTED]> wrote:
>> >>
>> >> >
>> >> > that's nice to have but is there a way to work around this issue?
>> Our
>> >> > application for customer service and they perform a lot search on a
>> >> huge
>> >> > database, in some cases, customer service would like to start new
>> >> search.
>> >> > Since wicket is locked by page path, there is no way for CSR to
>> start
>> a
>> >> > new
>> >> > request until previous one is finished.
>> >> >
>> >> >
>> >> > igor.vaynberg wrote:
>> >> > >
>> >> > > the pages are locked on the pagemap. so you cannot have two
>> >> concurrent
>> >> > > requests from the same user to the same pagemap. this is so when
>> you
>> >> > > are coding your pages you can use the much simpler single-threaded
>> >> > > model.
>> >> > >
>> >> > > every have fields in your servlet implementation? those have to be
>> >> > > synchronized or you will run into threading issues. this is the
>> stuff
>> >> > > we make sure you dont have to worry about.
>> >> > >
>> >> > > the trade off is that if you have long running requests you should
>> >> > > probably process them in a different thread and let the UI poll
>> for
>> >> > > status.
>> >> > >
>> >> > > -igor
>> >> > >
>> >> > >
>> >> > > On Jan 28, 2008 2:08 PM, cemeterygate <[EMAIL PROTECTED]>
>> wrote:
>> >> > >>
>> >> > >> So I developed my first wicket application and I kept getting
>> >> exception
>> >> > >> below
>> >> > >> as soon as i point my application to production database.
>> >> > >>
>> >> > >> Can someone tell me why wicket can't handle concurrent request?
>> >> > >>
>> >> > >> to replicate this issue, i have a page with a form component and
>> >> > regular
>> >> > >> submit button.
>> >> > >> on the onSubmit method,
>> >> > >>  protected void onSubmit() {
>> >> > >> try {
>> >> > >> Thread.sleep(3 * 60 * 1000);
>> >> > >> } catch (InterruptedException e) {
>> >> > >> }
>> >> > >>  }
>> >> > >>
>> >> > >> i put the thread into sleep for 3 minutes. I hit submit, then
>> stop
>> >> the
>> >> > >> request on browser and submit another request.  then result to a
>> >> > internal
>> >> > >> error page. Why can't wicket handle mutiple submit? i dont' get
>> it,
>> >> > >> shouldn't

Fix typo on http://wicket.apache.org/community.html

2008-01-30 Thread Edvin Syse

Hi,

I'm sorry for being a wordnazi, but could someone please change nabble to 
Nabble on the three entries where it is lowercase on:

http://wicket.apache.org/community.html

(In the mailing list section)

It is correct for "Wicket Users" but lowercase for the rest of the lists.

It's really bugging me :) hehe

-- Edvin

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Article: Introducing Apache Wicket

2008-01-30 Thread Nick Heudecker
I think the link in the ListView uses the index of the object in the list,
not the primary key.  That's likely the problem.

On Jan 30, 2008 9:37 AM, Johan Compagner <[EMAIL PROTECTED]> wrote:

> the loadable detachable model should have the pk of the contact itself
> thats
> behind the edit link
>
> On Jan 30, 2008 3:59 PM, dozgurc <[EMAIL PROTECTED]> wrote:
>
> >
> > i came across a problem with this article's code. i will try to explain
> > the
> > use case. after you insert a few contacts, open another browser, you can
> > see
> > same screen on both browsers. after deleting a contact from a browser
> you
> > are still seeing deleted contact. after that, click the deleted
> contact's
> > edit link. you will see different contact that you can edit. it is
> because
> > detachable model can load different subset of records and component only
> > gets the index of a record from http request, not id of a record. how
> can
> > i
> > solve this problem?
> > --
> > View this message in context:
> >
> http://www.nabble.com/Article%3A-Introducing-Apache-Wicket-tp15142773p15183311.html
> > Sent from the Wicket - User mailing list archive at Nabble.com<
> http://nabble.com/>
> > .
> >
> >
> > -
> >  To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>



-- 
Nick Heudecker
Professional Wicket Training & Consulting
http://www.systemmobile.com

Eventful - Intelligent Event Management
http://www.eventfulhq.com


Re: Scrollbar in popup window?

2008-01-30 Thread Leon Lee

Don't know if this is what you want...

add(new BookmarkablePageLink("instrLink", InstructionsPopupPage.class,
params).setPopupSettings(PopusSettings.SCROLLBARS));



palun wrote:
> 
> How do I get vertical scrollbar in a popup window with (too) long content? 
> Popup is created like so: 
> 
> add(new BookmarkablePageLink("instrLink", InstructionsPopupPage.class,
> params).setPopupSettings(popupSettings));
> 
> The purpose is to show a rather long information text in a separate window
> whenever user clicks an info icon. Content is static html. If anyone has
> comments / suggestions on how to best do this from a wicket app, please
> let me know. 
> 
> Many thanks
> /ulf  
> 

-- 
View this message in context: 
http://www.nabble.com/Scrollbar-in-popup-window--tp15182160p15183846.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



errors on the WicketStuff Dojo split container example

2008-01-30 Thread Wicketter

There are errors on this page which displays split container example. Also
copying the source code, doesn't do the same thing as example running on the
site.

Here are the errors displayed:

DEBUG: widget ID collision on ID: tab11
DEBUG: widget ID collision on ID: tab22
DEBUG: widget ID collision on ID: tab33
clear | close
Wicket Ajax Debug Window (drag me here)
WICKET AJAX DEBUG
DEBUG: DEPRECATED: dojo.widget.Manager.getImplementationName Could not
locate widget implementation for "panel" in "wicket.widget" registered to
namespace "wicket". Developers must specify correct namespaces for all
non-Dojo widgets -- will be removed in version: 0.5
DEBUG: dojo.widget.Parse: error:Error: Could not locate widget
implementation for "panel" in "wicket.widget" registered to namespace
"wicket"
DEBUG: DEPRECATED: dojo.widget.Manager.getImplementationName Could not
locate widget implementation for "panel" in "wicket.widget" registered to
namespace "wicket". Developers must specify correct namespaces for all
non-Dojo widgets -- will be removed in version: 0.5
DEBUG: dojo.widget.Parse: error:Error: Could not locate widget
implementation for "panel" in "wicket.widget" registered to namespace
"wicket"
DEBUG: DEPRECATED: dojo.widget.Manager.getImplementationName Could not
locate widget implementation for "child" in "wicket.widget" registered to
namespace "wicket". Developers must specify correct namespaces for all
non-Dojo widgets -- will be removed in version: 0.5
DEBUG: dojo.widget.Parse: error:Error: Could not locate widget
implementation for "child" in "wicket.widget" registered to namespace
"wicket"
DEBUG: DEPRECATED: dojo.widget.Manager.getImplementationName Could not
locate widget implementation for "extend" in "wicket.widget" registered to
namespace "wicket". Developers must specify correct namespaces for all
non-Dojo widgets -- will be removed in version: 0.5
DEBUG: dojo.widget.Parse: error:Error: Could not locate widget
implementation for "extend" in "wicket.widget" registered to namespace
"wicket"
DEBUG: DEPRECATED: dojo.widget.Manager.getImplementationName Could not
locate widget implementation for "simpledropdowndatepicker" in "dojo.widget"
registered to namespace "dojo". Developers must specify correct namespaces
for all non-Dojo widgets -- will be removed in version: 0.5
DEBUG: DEPRECATED: dojo.widget.Manager.getImplementationName Could not
locate widget implementation for "panel" in "wicket.widget" registered to
namespace "wicket". Developers must specify correct namespaces for all
non-Dojo widgets -- will be removed in version: 0.5
DEBUG: dojo.widget.Parse: error:Error: Could not locate widget
implementation for "panel" in "wicket.widget" registered to namespace
"wicket"
DEBUG: DEPRECATED: dojo.widget.Manager.getImplementationName Could not
locate widget implementation for "panel" in "wicket.widget" registered to
namespace "wicket". Developers must specify correct namespaces for all
non-Dojo widgets -- will be removed in version: 0.5
DEBUG: dojo.widget.Parse: error:Error: Could not locate widget
implementation for "panel" in "wicket.widget" registered to namespace
"wicket"
DEBUG: DEPRECATED: dojo.widget.Manager.getImplementationName Could not
locate widget implementation for "child" in "wicket.widget" registered to
namespace "wicket". Developers must specify correct namespaces for all
non-Dojo widgets -- will be removed in version: 0.5
DEBUG: dojo.widget.Parse: error:Error: Could not locate widget
implementation for "child" in "wicket.widget" registered to namespace
"wicket"
DEBUG: DEPRECATED: dojo.widget.Manager.getImplementationName Could not
locate widget implementation for "extend" in "wicket.widget" registered to
namespace "wicket". Developers must specify correct namespaces for all
non-Dojo widgets -- will be removed in version: 0.5
DEBUG: dojo.widget.Parse: error:Error: Could not locate widget
implementation for "extend" in "wicket.widget" registered to namespace
"wicket"
DEBUG: widget ID collision on ID: date10
DEBUG: widget ID collision on ID: date21
DEBUG: widget ID collision on ID: date32
DEBUG: widget ID collision on ID: date43
-- 
View this message in context: 
http://www.nabble.com/errors-on-the-WicketStuff-Dojo-split-container-example-tp15183543p15183543.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Article: Introducing Apache Wicket

2008-01-30 Thread Johan Compagner
the loadable detachable model should have the pk of the contact itself thats
behind the edit link

On Jan 30, 2008 3:59 PM, dozgurc <[EMAIL PROTECTED]> wrote:

>
> i came across a problem with this article's code. i will try to explain
> the
> use case. after you insert a few contacts, open another browser, you can
> see
> same screen on both browsers. after deleting a contact from a browser you
> are still seeing deleted contact. after that, click the deleted contact's
> edit link. you will see different contact that you can edit. it is because
> detachable model can load different subset of records and component only
> gets the index of a record from http request, not id of a record. how can
> i
> solve this problem?
> --
> View this message in context:
> http://www.nabble.com/Article%3A-Introducing-Apache-Wicket-tp15142773p15183311.html
> Sent from the Wicket - User mailing list archive at 
> Nabble.com
> .
>
>
> -
>  To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Re: [WicketStuff-Scriptaculous] DragNDrop problem in IE6/IE7.

2008-01-30 Thread Nino Saturnino Martinez Vazquez Wael

could you send a quickstart to me, or point me to an url so I can debug?

regards Nino

Lan Boon Ping wrote:

Say if you have trouble with it. I'll look into it then, two pair of
eyes are better than one:)

Hey thats what the mailing list are for:) I learn from this too:)



Great! You are welcome! :)
FYI, draggable.js seems not the one that cause the problem, because
the DnD demo in scriptaculous[1] site works perfectly, I suspect that
the problem is from the integration in wicketstuff-scriptaculous. I
will take a deeper look today.  Btw, if you need more information,
please pm me. Thanks a lot.

Regards
Boon Ping.

[1] http://demo.script.aculo.us/shop

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


  


--
Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: DDC and page reload

2008-01-30 Thread Igor Vaynberg
 swf.setValue("flashvars", "somevar=" + "somevalue"+ "¤cy="
+ curr);

^ that should instead take an IModel so that it renders a fresh value
on each new request instead of always rendering the value you passed
in at page construction. in fact, it should take the same model
instance as is use by the ddc.

-igor

On Jan 30, 2008 5:10 AM, Sébastien Piller <[EMAIL PROTECTED]> wrote:
> Yes, no problem, but it's really trivial...
>
> My Flash object is added here (I use the ShockWaveComponent, little
> modified, from the wiki):
>
> ShockWaveComponent swf = new ShockWaveComponent("swf",
> "ShirtDesignerV2.swf", "770", "480");
> swf.setValue("quality", "high");
> swf.setValue("bgcolor", "#869ca7");
> swf.setValue("id", "editor");
> swf.setValue("name", "editor");
> ...
> String curr = getCurrentCurrency();
> swf.setValue("flashvars", "somevar=" + "somevalue"+ "¤cy="
> + curr);
> swf.setValue("allowScriptAccess", "sameDomain");
> swf.setValue("type", "application/x-shockwave-flash");
> add(swf);
>
> And here I change the currency with the DDC:
> DropDownChoice currencies = new
> DropDownChoice("currencies", new PropertyModel(this, "currentCurrency"),
> Arrays.asList(new String[] { "CHF", "EUR", "USD" })) {
> @Override
> protected boolean wantOnSelectionChangedNotifications() {
> return true;
> }
>
> @Override
> protected void onSelectionChanged(Object newSelection) {
> //System.out.println("SETTED: " + newSelection);
> setCurrency(newSelection + "");
> }
> };
> add(currencies);
>
> There is nothing special here
>
> But when the onSelectionChanged is fired, the flashvars doesn't change
>
> Thanks ;)
>
>
> Edvin Syse a écrit :
>
> > I think it would be easier to help you if you supplied some code :)
> >
> > -- Edvin
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Getting the exception while starting a application in tomcat

2008-01-30 Thread Igor Vaynberg
erm...its a war...

-igor


On Jan 30, 2008 5:09 AM, Gurvinder Pal Singh <[EMAIL PROTECTED]> wrote:
>
>
> Is mvn package package compatible to tomcat...i mean will the war run on
> tomcat server?
>
> Thanks & Regards
> Gurvinder Pal Singh
>
>
>
> igor.vaynberg wrote:
> >
> > the link i pointed to generates wicket 1.3.0 quickstarts. and if you
> > dont want to use jetty then simply run mvn package and that will
> > generate a war file in the target subdir.
> >
> > -igor
> >
> >
> > On Jan 30, 2008 12:25 AM, Gurvinder Pal Singh
> > <[EMAIL PROTECTED]> wrote:
> >>
> >> Hi , you are right, as the snippet i have given is from the exception
> >> sown in
> >> the wicket-examples project. Also the quick start example u have
> >> mentioned
> >> is of wicket1.2 version and that too for jetty server.
> >> But i have also tried to do create the HelloWorld example from given
> >> examples in the website which has given the following error log on
> >> starting
> >> the tomcat:
> >>
> >> 2008-01-29 11:19:57 StandardContext[/FirstWicketProject]: Exception
> >> starting
> >> filter HelloWorldApplication
> >> org.apache.wicket.WicketRuntimeException: Unable to create application of
> >> class org.apache.wicket.examples.helloworld.HelloWorldApplication
> >> at
> >> org.apache.wicket.protocol.http.ContextParamWebApplicationFactory.createApplication(ContextParamWebApplicationFactory.java:82)
> >> at
> >> org.apache.wicket.protocol.http.ContextParamWebApplicationFactory.createApplication(ContextParamWebApplicationFactory.java:49)
> >> at
> >> org.apache.wicket.protocol.http.WicketFilter.init(WicketFilter.java:496)
> >> at
> >> org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:254)
> >> at
> >> org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:314)
> >> at
> >> org.apache.catalina.core.ApplicationFilterConfig.(ApplicationFilterConfig.java:120)
> >> at
> >> org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3158)
> >> at
> >> org.apache.catalina.core.StandardContext.start(StandardContext.java:3602)
> >> at
> >> org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:821)
> >> at
> >> org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:807)
> >> at
> >> org.apache.catalina.core.StandardHost.addChild(StandardHost.java:579)
> >> at
> >> org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.java:257)
> >> at
> >> org.apache.catalina.core.StandardHost.install(StandardHost.java:772)
> >> at
> >> org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:569)
> >> at
> >> org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:411)
> >> at
> >> org.apache.catalina.startup.HostConfig.start(HostConfig.java:879)
> >> at
> >> org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:368)
> >> at
> >> org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:166)
> >> at
> >> org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1196)
> >> at
> >> org.apache.catalina.core.StandardHost.start(StandardHost.java:738)
> >> at
> >> org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188)
> >> at
> >> org.apache.catalina.core.StandardEngine.start(StandardEngine.java:347)
> >> at
> >> org.apache.catalina.core.StandardService.start(StandardService.java:497)
> >> at
> >> org.apache.catalina.core.StandardServer.start(StandardServer.java:2189)
> >> at org.apache.catalina.startup.Catalina.start(Catalina.java:512)
> >> at
> >> org.apache.catalina.startup.Catalina.execute(Catalina.java:400)
> >> at
> >> org.apache.catalina.startup.Catalina.process(Catalina.java:180)
> >> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> >> at
> >> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> >> at
> >> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> >> at java.lang.reflect.Method.invoke(Method.java:324)
> >> at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203)
> >> Caused by: java.lang.ClassNotFoundException:
> >> org.apache.wicket.examples.helloworld.HelloWorldApplication
> >> at
> >> org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1428)
> >> at
> >> org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1274)
> >> at
> >> org.apache.wicket.protocol.http.ContextParamWebApplicationFactory.createApplication(ContextParamWebApplicationFactory.java:68)
> >> ... 31 more
> >>
> >> Thanks & Regards,
> >> Gurvinder Pal Singh
> >>
> >>
> >>
> >>
> >> Martijn Dashorst wrote:
> >> >
> >> > and you try to run the

Re: [WicketStuff-Scriptaculous] DragNDrop problem in IE6/IE7.

2008-01-30 Thread Ryan Sonnek
That's quite a shocker to me.  if it works in the scriptaculous demo,
i don't see why it wouldn't work in wicket.

On Jan 29, 2008 9:29 PM, Lan Boon Ping <[EMAIL PROTECTED]> wrote:
> > Say if you have trouble with it. I'll look into it then, two pair of
> > eyes are better than one:)
> >
> > Hey thats what the mailing list are for:) I learn from this too:)
>
> Great! You are welcome! :)
> FYI, draggable.js seems not the one that cause the problem, because
> the DnD demo in scriptaculous[1] site works perfectly, I suspect that
> the problem is from the integration in wicketstuff-scriptaculous. I
> will take a deeper look today.  Btw, if you need more information,
> please pm me. Thanks a lot.
>
> Regards
> Boon Ping.
>
> [1] http://demo.script.aculo.us/shop
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Article: Introducing Apache Wicket

2008-01-30 Thread dozgurc

i came across a problem with this article's code. i will try to explain the
use case. after you insert a few contacts, open another browser, you can see
same screen on both browsers. after deleting a contact from a browser you
are still seeing deleted contact. after that, click the deleted contact's
edit link. you will see different contact that you can edit. it is because
detachable model can load different subset of records and component only
gets the index of a record from http request, not id of a record. how can i
solve this problem?
-- 
View this message in context: 
http://www.nabble.com/Article%3A-Introducing-Apache-Wicket-tp15142773p15183311.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: DDC and page reload

2008-01-30 Thread Sébastien Piller
I found a patch (very ugly but works). On the onSelectionChange, I wrote 
this:


if (MyAbstractPage.this instanceof MyPageWithTheRefreshIssue) {
   setResponsePage(new MyPageWithTheRefreshIssue());
}


But I wonder: is this a normal behavior? I guessed I need not to refresh 
it manually, need I?


Thanks! ;)



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Scrollbar in popup window?

2008-01-30 Thread Nino Saturnino Martinez Vazquez Wael

create a scrollable div?

palun wrote:
How do I get vertical scrollbar in a popup window with (too) long content? 
Popup is created like so: 


add(new BookmarkablePageLink("instrLink", InstructionsPopupPage.class,
params).setPopupSettings(popupSettings));

The purpose is to show a rather long information text in a separate window
whenever user clicks an info icon. Content is static html. If anyone has
comments / suggestions on how to best do this from a wicket app, please let
me know. 


Many thanks
/ulf  
  


--
Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Scrollbar in popup window?

2008-01-30 Thread palun

How do I get vertical scrollbar in a popup window with (too) long content? 
Popup is created like so: 

add(new BookmarkablePageLink("instrLink", InstructionsPopupPage.class,
params).setPopupSettings(popupSettings));

The purpose is to show a rather long information text in a separate window
whenever user clicks an info icon. Content is static html. If anyone has
comments / suggestions on how to best do this from a wicket app, please let
me know. 

Many thanks
/ulf  
-- 
View this message in context: 
http://www.nabble.com/Scrollbar-in-popup-window--tp15182160p15182160.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: DDC and page reload

2008-01-30 Thread Sébastien Piller

Yes, no problem, but it's really trivial...

My Flash object is added here (I use the ShockWaveComponent, little 
modified, from the wiki):
  
   ShockWaveComponent swf = new ShockWaveComponent("swf", 
"ShirtDesignerV2.swf", "770", "480");

   swf.setValue("quality", "high");
   swf.setValue("bgcolor", "#869ca7");
   swf.setValue("id", "editor");
   swf.setValue("name", "editor");
   ...
   String curr = getCurrentCurrency();
   swf.setValue("flashvars", "somevar=" + "somevalue"+ "¤cy=" 
+ curr);

   swf.setValue("allowScriptAccess", "sameDomain");
   swf.setValue("type", "application/x-shockwave-flash");
   add(swf);

And here I change the currency with the DDC:
   DropDownChoice currencies = new 
DropDownChoice("currencies", new PropertyModel(this, "currentCurrency"), 
Arrays.asList(new String[] { "CHF", "EUR", "USD" })) {

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

   protected void onSelectionChanged(Object newSelection) {
   //System.out.println("SETTED: " + newSelection);
   setCurrency(newSelection + "");
   }
   };
   add(currencies);

There is nothing special here

But when the onSelectionChanged is fired, the flashvars doesn't change

Thanks ;)


Edvin Syse a écrit :

I think it would be easier to help you if you supplied some code :)

-- Edvin



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Getting the exception while starting a application in tomcat

2008-01-30 Thread Gurvinder Pal Singh


Is mvn package package compatible to tomcat...i mean will the war run on
tomcat server?

Thanks & Regards
Gurvinder Pal Singh


igor.vaynberg wrote:
> 
> the link i pointed to generates wicket 1.3.0 quickstarts. and if you
> dont want to use jetty then simply run mvn package and that will
> generate a war file in the target subdir.
> 
> -igor
> 
> 
> On Jan 30, 2008 12:25 AM, Gurvinder Pal Singh
> <[EMAIL PROTECTED]> wrote:
>>
>> Hi , you are right, as the snippet i have given is from the exception
>> sown in
>> the wicket-examples project. Also the quick start example u have
>> mentioned
>> is of wicket1.2 version and that too for jetty server.
>> But i have also tried to do create the HelloWorld example from given
>> examples in the website which has given the following error log on
>> starting
>> the tomcat:
>>
>> 2008-01-29 11:19:57 StandardContext[/FirstWicketProject]: Exception
>> starting
>> filter HelloWorldApplication
>> org.apache.wicket.WicketRuntimeException: Unable to create application of
>> class org.apache.wicket.examples.helloworld.HelloWorldApplication
>> at
>> org.apache.wicket.protocol.http.ContextParamWebApplicationFactory.createApplication(ContextParamWebApplicationFactory.java:82)
>> at
>> org.apache.wicket.protocol.http.ContextParamWebApplicationFactory.createApplication(ContextParamWebApplicationFactory.java:49)
>> at
>> org.apache.wicket.protocol.http.WicketFilter.init(WicketFilter.java:496)
>> at
>> org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:254)
>> at
>> org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:314)
>> at
>> org.apache.catalina.core.ApplicationFilterConfig.(ApplicationFilterConfig.java:120)
>> at
>> org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3158)
>> at
>> org.apache.catalina.core.StandardContext.start(StandardContext.java:3602)
>> at
>> org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:821)
>> at
>> org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:807)
>> at
>> org.apache.catalina.core.StandardHost.addChild(StandardHost.java:579)
>> at
>> org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.java:257)
>> at
>> org.apache.catalina.core.StandardHost.install(StandardHost.java:772)
>> at
>> org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:569)
>> at
>> org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:411)
>> at
>> org.apache.catalina.startup.HostConfig.start(HostConfig.java:879)
>> at
>> org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:368)
>> at
>> org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:166)
>> at
>> org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1196)
>> at
>> org.apache.catalina.core.StandardHost.start(StandardHost.java:738)
>> at
>> org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188)
>> at
>> org.apache.catalina.core.StandardEngine.start(StandardEngine.java:347)
>> at
>> org.apache.catalina.core.StandardService.start(StandardService.java:497)
>> at
>> org.apache.catalina.core.StandardServer.start(StandardServer.java:2189)
>> at org.apache.catalina.startup.Catalina.start(Catalina.java:512)
>> at
>> org.apache.catalina.startup.Catalina.execute(Catalina.java:400)
>> at
>> org.apache.catalina.startup.Catalina.process(Catalina.java:180)
>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>> at
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>> at
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>> at java.lang.reflect.Method.invoke(Method.java:324)
>> at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203)
>> Caused by: java.lang.ClassNotFoundException:
>> org.apache.wicket.examples.helloworld.HelloWorldApplication
>> at
>> org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1428)
>> at
>> org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1274)
>> at
>> org.apache.wicket.protocol.http.ContextParamWebApplicationFactory.createApplication(ContextParamWebApplicationFactory.java:68)
>> ... 31 more
>>
>> Thanks & Regards,
>> Gurvinder Pal Singh
>>
>>
>>
>>
>> Martijn Dashorst wrote:
>> >
>> > and you try to run the examples in java 4 instead of java 5
>> >
>> > On 1/30/08, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
>> >>
>> >> if you want to create a hello world app quickly and properly then go
>> here
>> >>
>> >> http://wicket.apache.org/quickstart.html
>> >>
>> >> and run the command given in the textarea.
>> >>
>> >> it looks like

Re: DDC and page reload

2008-01-30 Thread Johan Compagner
how are you listening to the change of the DDC?
If through ajax then you have to set the response page again to get a real
refresh of everything
(or just refresh th flash markup part)

if through normal submit (onSelection) then the page is completely refreshed
anyway
maybe you cache at some place to much

johan


On Jan 30, 2008 1:54 PM, Sébastien Piller <[EMAIL PROTECTED]> wrote:

> Hello,
>
> I have a little problem with drop down choices. I have one on my page.
> It stores some currencies. In the same page, I've got a Flash module,
> who needs the actual currency to work. I pass it using the usual
> "flashvars".
>
> But when I change a currency on the DDC (ie from USD to EUR), the actual
> page is refreshed (or seems to), but the currency passed in the
> flashvars is the old one (USD) although all of my models are properly
> updated. So I think wicket hasn't recomputed some markup...
>
> Can I force him to fully reload (recreate) the current page when a
> onSelectionChange event is fired?
>
> Thanks!
>
> ;)
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Re: DDC and page reload

2008-01-30 Thread Edvin Syse
I have a little problem with drop down choices. I have one on my page. 
It stores some currencies. In the same page, I've got a Flash module, 
who needs the actual currency to work. I pass it using the usual 
"flashvars".


But when I change a currency on the DDC (ie from USD to EUR), the actual 
page is refreshed (or seems to), but the currency passed in the 
flashvars is the old one (USD) although all of my models are properly 
updated. So I think wicket hasn't recomputed some markup...


Can I force him to fully reload (recreate) the current page when a 
onSelectionChange event is fired?


I think it would be easier to help you if you supplied some code :)

-- Edvin

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DDC and page reload

2008-01-30 Thread Sébastien Piller

Hello,

I have a little problem with drop down choices. I have one on my page. 
It stores some currencies. In the same page, I've got a Flash module, 
who needs the actual currency to work. I pass it using the usual 
"flashvars".


But when I change a currency on the DDC (ie from USD to EUR), the actual 
page is refreshed (or seems to), but the currency passed in the 
flashvars is the old one (USD) although all of my models are properly 
updated. So I think wicket hasn't recomputed some markup...


Can I force him to fully reload (recreate) the current page when a 
onSelectionChange event is fired?


Thanks!

;)

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Embedding in Jetty without web.xml

2008-01-30 Thread Peter Ertl

Also you should do this instead:


Context context = new Context(server, "/", Context.SESSIONS);



you write:


Context context = new Context(server, "/");




Re: Embedding in Jetty without web.xml

2008-01-30 Thread Peter Ertl

Dont change wicket, it's fine :-)

Actually I got this working without any web.xml or WEB-INF/ and it's  
possible!


The things is: When you use the wicket filter you also need to add the  
DefaultServlet (or any servlet that is mapped to your wicket filter  
path)


it looks like that in my AppLauncherJetty.class

  context.addServlet(DefaultServlet.class, "/*")  // or whatever you  
wicket filter path is


in jetty a filter is just _decorating_ a request. but the request  
needs a _target_ which the DefaultServlet in that case is.


otherwise you get a 404!

even though wicket filter eventually does not call chain.doFilter(..)  
jetty still needs the servlet.


Try and see.

Regards
Peter


Am 30.01.2008 um 01:27 schrieb Eelco Hillenius:

Actually, WicketFilter does try to read web.xml. See  
WicketFilter#init.


You could file a feature request to let the framework be more lenient
so that it doesn't fail when web.xml is not available. We can at least
think about that. To solve your problem now, I suggest you make a copy
of WicketFilter for your own purposes and rip the web.xml reading code
out and get your filter path somewhere else.

Eelco

On Jan 29, 2008 4:21 PM, Philip Healy <[EMAIL PROTECTED]> wrote:

Hello,

 I am trying to set up a Wicket application to execute in an  
embedded Jetty
instance.  The Wicket application is not deployed as a webapp (so  
there so
web.xml), as I am trying to avoid using unnecessary directory  
structure and

config files). The Wicket application classes are available on the
classpath.  I am using the following to configure the Wicket filter  
and

start the Jetty server:


// Create server and root context
Server server = new Server();
Connector connector = new SocketConnector();
connector.setPort(8080);
server.addConnector(connector);
Context context = new Context(server, "/");

// Add wicket filter
FilterHolder filterHolder = new FilterHolder(WicketFilter.class);
filterHolder.setInitParameter("applicationClassName",
   TestWebApplication.class.getCanonicalName());
context.addFilter(filterHolder, "/*",  
org.mortbay.jetty.Handler.DEFAULT);


// Start server
server.start();
server.join();


I added the following to the  init() method of the WebApplication  
subclass:


mount("/test", PackageName.forPackage(this.getClass().getPackage()));

Although the server starts, the Wicket application is not available  
at
http://localhost:8080/test/, I get a Jetty-generated 404 message.   
Any

ideas?

Regards,
Philip



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Pagemap null is still locked by blah exception, help!! why does wicket have to lock the pagemap

2008-01-30 Thread Johan Compagner
If 1 page instance can be accessed by multiply threads we suddenly have to
have synchronize blocks all over the place
in our wicket code (especially the response area, rendering)

Also in the request phase where you can alter components and so on. Also
needs to be synched. (add/remove of components, behaviours or validatiors)

Even when i just quickly think about it, there are s many things that
can go horrible wrong.. that i even dont dare to start coding for that.

What you can do is post your search to a bookmarkable page. Those are not
locked because you create a new instance

johan


On Jan 29, 2008 4:51 PM, cemeterygate <[EMAIL PROTECTED]> wrote:

>
> that's right, i am screwed anyway if request takes too long, but from the
> browser user decide to give up current search by click the stop button and
> fire a new search. Since the pagemap is still locked by previous request,
> the second request will have to wait. sounds like i will end up handle
> this
> senario by pulling. is it possible to have a page that's not single thread
> model? Can we have two interface, such as SingleThreadPage, and
> ConcurrentThreadPage?
>
>
> igor.vaynberg wrote:
> >
> > yeah, if it takes a while the browser will timeout and you are screwed
> > anyways...
> >
> > what do you mean they cant start a new search? you mean they no longer
> > for the results of the currently running search and just press the
> > search button again?
> >
> > if they would open a new tab with the search page, and you had
> > automultiwindowsupport option enabled that new opened page would be
> > created in a new pagemap, and so you wouldnt have a locking problem...
> >
> > -igor
> >
> >
> > On Jan 28, 2008 2:51 PM, Johan Compagner <[EMAIL PROTECTED]> wrote:
> >> shared resources are not synced thats one way of going round it.
> >>
> >> the other way is as igor describes. do the search in a seperate thread.
> >> If it really takes that long then you do know that browsers also can
> just
> >> time out after they don't get anything for a while?
> >>
> >> If it really takes that long then you should build a page where people
> >> can
> >> fire searches to the system
> >> and the page is just displayig the searches they did and then if the
> >> search
> >> is finished that page can bring them to the result
> >>
> >> johan
> >>
> >>
> >>
> >>
> >> On Jan 28, 2008 11:46 PM, cemeterygate <[EMAIL PROTECTED]> wrote:
> >>
> >> >
> >> > that's nice to have but is there a way to work around this issue? Our
> >> > application for customer service and they perform a lot search on a
> >> huge
> >> > database, in some cases, customer service would like to start new
> >> search.
> >> > Since wicket is locked by page path, there is no way for CSR to start
> a
> >> > new
> >> > request until previous one is finished.
> >> >
> >> >
> >> > igor.vaynberg wrote:
> >> > >
> >> > > the pages are locked on the pagemap. so you cannot have two
> >> concurrent
> >> > > requests from the same user to the same pagemap. this is so when
> you
> >> > > are coding your pages you can use the much simpler single-threaded
> >> > > model.
> >> > >
> >> > > every have fields in your servlet implementation? those have to be
> >> > > synchronized or you will run into threading issues. this is the
> stuff
> >> > > we make sure you dont have to worry about.
> >> > >
> >> > > the trade off is that if you have long running requests you should
> >> > > probably process them in a different thread and let the UI poll for
> >> > > status.
> >> > >
> >> > > -igor
> >> > >
> >> > >
> >> > > On Jan 28, 2008 2:08 PM, cemeterygate <[EMAIL PROTECTED]>
> wrote:
> >> > >>
> >> > >> So I developed my first wicket application and I kept getting
> >> exception
> >> > >> below
> >> > >> as soon as i point my application to production database.
> >> > >>
> >> > >> Can someone tell me why wicket can't handle concurrent request?
> >> > >>
> >> > >> to replicate this issue, i have a page with a form component and
> >> > regular
> >> > >> submit button.
> >> > >> on the onSubmit method,
> >> > >>  protected void onSubmit() {
> >> > >> try {
> >> > >> Thread.sleep(3 * 60 * 1000);
> >> > >> } catch (InterruptedException e) {
> >> > >> }
> >> > >>  }
> >> > >>
> >> > >> i put the thread into sleep for 3 minutes. I hit submit, then stop
> >> the
> >> > >> request on browser and submit another request.  then result to a
> >> > internal
> >> > >> error page. Why can't wicket handle mutiple submit? i dont' get
> it,
> >> > >> shouldn't wicket process the new require like how servlet works?
> >> > Someone
> >> > >> please tell me how to work around this issue. Thanks in advance.
> >> > >>
> >> > >>
> >> > >> 2008-01-25 14:45:05,443 ERROR [org.apache.wicket.RequestCycle] -
> >>  >> > 1
> >> > >> minute the Pagemap null is still locked by:
> >> > >> Thread[resin-tcp-connection-*:8080-45,5,main], giving up trying to
> >> get
> >> > >> the
> >> > >> page for path: 5>
>

Re: Ajax Busy Indicator

2008-01-30 Thread Martin Makundi
> > This seems like tweaking...
> nope, that's what CSS is for, you wouldn't want to change your markup just
> to put something as tiny as an ajaxindicator some pixels to the left would
> you? (just an example)

What I do not want is the indicator to take up extra space from where
it does not belong (i.e., either immediate left or right side of the
button). Say, I want the following layout:




With css I cannot position the IndicatorAppender like that. It will
only appear on either left or right side of the ajaxSubmitButton. What
I want is to a) independently position the indicatorIcon and b)
independently position the submitButton and c) activate the
indicatorIcon with the submitbutton.

**
Martin

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Monitoring Wicket using JAMon

2008-01-30 Thread lars vonk
Hi,

I came up with two possible candidate methods to put in JAMon monitoring.

The:

1. ISessionStore.onBeginRequest and ISessionStore.onEndRequest
2. RequestCycle.onBeginRequest and RequestCycle.onEndRequest.

For now I choose to override the ISessionStore because that one is
called before and after the RequestCycle methods. I want to check with
you guys if this is the best option or not. Which one do you
recommend? Is there maybe another candidate I overlooked?


Thanks, Lars

On Dec 24, 2007 5:45 PM, lars vonk <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> I am currently monitoring some spring beans in our application using
> JAMon (http://jamonapi.sourceforge.net/). To get a complete oversight
> I would like to measure the entry and exit point of a single page in
> my JAMon report.
> In the report I'd like to group the webrequest per page. I was
> stepping through the wicket source code but could not find a good
> point to intercept and put in my JAMon monitoring code.
> So my question is: What is the best point in wicket to monitor? I was
> thinking about the doGet of the WicketFilter it self, since that is
> the entry point. But how do I get hold of the requested page name
> there?  I also looked at the RequestCycle.request, but since that
> method is final I can't intercept it.
>
> Any other suggestions are welcome.
>
> Thanks, Lars
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: It is there any Component not translate the HTML tag, and display the right format

2008-01-30 Thread Sébastien Piller




In fact: setEscapeModelString
;)

Gerolf Seitz a écrit :

  .setEscapeOutputStrings(false) (or something like that)

  Gerolf

On Jan 30, 2008 10:04 AM, laiqinyi <[EMAIL PROTECTED]> wrote:

  
  
Hi  All,

now, I have integrated a wyswyg Editor with Wicket,and I save a lot of
HTML tag into DataBase.
The problem is, HTML tag could not show correct form, but display the
ESC(transferred) tag
for example:

in the database there is :
rr

in the html source code there is:

rr

and It can see rr in the browser,lost format So, It is there any Component not translate the HTML tag, and display the right format BestRegards, Mead - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: It is there any Component not translate the HTML tag, and display the right format

2008-01-30 Thread Gerolf Seitz
.setEscapeOutputStrings(false) (or something like that)

  Gerolf

On Jan 30, 2008 10:04 AM, laiqinyi <[EMAIL PROTECTED]> wrote:

> Hi  All,
>
> now, I have integrated a wyswyg Editor with Wicket,and I save a lot of
> HTML tag into DataBase.
> The problem is, HTML tag could not show correct form, but display the
> ESC(transferred) tag
> for example:
>
> in the database there is :
> rr
>
> in the html source code there is:
> 

rr

> > and It can see rr in the browser,lost format > > So, It is there any Component not translate the HTML tag, and display the > right format > > BestRegards, > Mead > > > > > >

It is there any Component not translate the HTML tag, and display the right format

2008-01-30 Thread laiqinyi
Hi  All,
 
now, I have integrated a wyswyg Editor with Wicket,and I save a lot of HTML tag 
into DataBase.
The problem is, HTML tag could not show correct form, but display the 
ESC(transferred) tag
for example:

in the database there is :
rr

in the html source code there is:

rr

and It can see rr in the browser,lost format So, It is there any Component not translate the HTML tag, and display the right format BestRegards, Mead

Re: Ajax Busy Indicator

2008-01-30 Thread Michael Sparer

> This seems like tweaking... 
nope, that's what CSS is for, you wouldn't want to change your markup just
to put something as tiny as an ajaxindicator some pixels to the left would
you? (just an example)



Martin Makundi wrote:
> 
>> You can use CSS to control the positon of the busy indicating image. To
>> place it
>> right from the button use
> 
> This seems like tweaking...
> 
>> IAjaxIndicatorAware simply takes the html id of the element you want
>> to show/hide; it can be placed anywhere in html...
> 
> This is more of what I am looking for, but with IAjaxIndicatorAware I
> havent succeeded in making the indicator appear. I posted earlier the
> code I have, but it didn't do the job. I will repeat it here if
> someone can see immediately what is wrong in it:
> 
> 
> public class Login extends WebPage {
>// ... default constructor contents:
>final Form loginForm = new Form(LOGIN_FORM, new Model());
>final AjaxIndicatorContainer indicatorContainer = new
> AjaxIndicatorContainer();
>indicatorContainer.setOutputMarkupId(true);
>loginForm.add(indicatorContainer);
>  final SubmitLink loginButton = new SubmitLink(LOGIN_BUTTON, new
> Model()) {
>/**
> * @see org.apache.wicket.markup.html.form.SubmitLink#onSubmit()
> */
>@Override
>public void onSubmit() {
>  super.onSubmit();
>  Thread.sleep(5000); // Simulate form processing
>}
>  };
>  abstract class AjaxFormSubmitIndicator extends
> AjaxFormSubmitBehavior implements IAjaxIndicatorAware {
>/**
> * Constructor for TODO
> *
> */
>public AjaxFormSubmitIndicator() {
>  super("onchange"); // I have tried "onchange" and "onclick"
>}
>  }
>  loginButton.add(new AjaxFormSubmitIndicator() {
>@Override
>protected void onError(AjaxRequestTarget arg0) {
>  // TODO Auto-generated method stub
>}
> 
>@Override
>protected void onSubmit(AjaxRequestTarget arg0) {
>  loginButton.onSubmit();
>}
> 
>public String getAjaxIndicatorMarkupId() {
>  return indicatorContainer.getMarkupId();
>}
>  });
>  loginForm.add(loginButton);
> 
> // ... etc..
> 
>  add(new FeedbackPanel("feedback"));
>  add(loginForm);
> }
> 
> 
> 
> 
> public class AjaxIndicatorContainer extends WebMarkupContainer {
>  /**
>   *
>   */
>  private static final long serialVersionUID = 5573778050703849297L;
>  /**
>   *
>   */
>  public static final String INDICATOR_MARKUP_ID = "ajaxIndicator";
> 
>  /**
>   * Constructor for TODO
>   */
>  public AjaxIndicatorContainer() {
>super(INDICATOR_MARKUP_ID);
>  }
> 
>  /**
>   * @see
> org.apache.wicket.Component#onComponentTag(org.apache.wicket.markup.ComponentTag)
>   */
>  @Override
>  protected void onComponentTag(ComponentTag tag) {
>super.onComponentTag(tag);
>tag.put("src",urlFor(AbstractDefaultAjaxBehavior.INDICATOR));
>  }
> 
> 
> 
> 
> 
> 
> Login
> Feedback messages will be here.
> 
> 
> 
> Username:
> 
> 
> 
> Password: 
>  # 
> 
> 
> 
> 
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 


-
Michael Sparer
http://talk-on-tech.blogspot.com
-- 
View this message in context: 
http://www.nabble.com/Ajax-Busy-Indicator-tp15153150p15177222.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Getting the exception while starting a application in tomcat

2008-01-30 Thread Gurvinder Pal Singh

Hi , you are right, as the snippet i have given is from the exception sown in
the wicket-examples project. Also the quick start example u have mentioned
is of wicket1.2 version and that too for jetty server.
But i have also tried to do create the HelloWorld example from given
examples in the website which has given the following error log on starting
the tomcat:

2008-01-29 11:19:57 StandardContext[/FirstWicketProject]: Exception starting
filter HelloWorldApplication
org.apache.wicket.WicketRuntimeException: Unable to create application of
class org.apache.wicket.examples.helloworld.HelloWorldApplication
at
org.apache.wicket.protocol.http.ContextParamWebApplicationFactory.createApplication(ContextParamWebApplicationFactory.java:82)
at
org.apache.wicket.protocol.http.ContextParamWebApplicationFactory.createApplication(ContextParamWebApplicationFactory.java:49)
at 
org.apache.wicket.protocol.http.WicketFilter.init(WicketFilter.java:496)
at
org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:254)
at
org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:314)
at
org.apache.catalina.core.ApplicationFilterConfig.(ApplicationFilterConfig.java:120)
at
org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3158)
at
org.apache.catalina.core.StandardContext.start(StandardContext.java:3602)
at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:821)
at 
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:807)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:579)
at
org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.java:257)
at org.apache.catalina.core.StandardHost.install(StandardHost.java:772)
at
org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:569)
at 
org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:411)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:879)
at
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:368)
at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:166)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1196)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:738)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188)
at 
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:347)
at 
org.apache.catalina.core.StandardService.start(StandardService.java:497)
at 
org.apache.catalina.core.StandardServer.start(StandardServer.java:2189)
at org.apache.catalina.startup.Catalina.start(Catalina.java:512)
at org.apache.catalina.startup.Catalina.execute(Catalina.java:400)
at org.apache.catalina.startup.Catalina.process(Catalina.java:180)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203)
Caused by: java.lang.ClassNotFoundException:
org.apache.wicket.examples.helloworld.HelloWorldApplication
at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1428)
at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1274)
at
org.apache.wicket.protocol.http.ContextParamWebApplicationFactory.createApplication(ContextParamWebApplicationFactory.java:68)
... 31 more

Thanks & Regards,
Gurvinder Pal Singh



Martijn Dashorst wrote:
> 
> and you try to run the examples in java 4 instead of java 5
> 
> On 1/30/08, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
>>
>> if you want to create a hello world app quickly and properly then go here
>>
>> http://wicket.apache.org/quickstart.html
>>
>> and run the command given in the textarea.
>>
>> it looks like you are trying to startup the wicket-examples project
>> and not the hello world you created...
>>
>> -igor
>>
>>
>> On Jan 29, 2008 10:37 PM, Gurvinder Pal Singh
>> <[EMAIL PROTECTED]> wrote:
>> >
>> > Hi, i created an HelloWorld application in Wicket framwork as described
>> in
>> > their web page, but i am getting following exceptions. Please somebody
>> help
>> > me beacuse i am not getting a moveon from here on..
>> >
>> > org.apache.wicket.WicketRuntimeException: Unable to create application
>> of
>> > class org.apache.wicket.examples.velocity.VelocityTemplateApplication
>> >
>> > 2008-01-29 18:40:35 StandardContext[/wicket-examples-1.3.0]: Exception
>> > starting filter WizardApplication
>> > java.lang.UnsupportedCla

Re: Getting the exception while starting a application in tomcat

2008-01-30 Thread Igor Vaynberg
the link i pointed to generates wicket 1.3.0 quickstarts. and if you
dont want to use jetty then simply run mvn package and that will
generate a war file in the target subdir.

-igor


On Jan 30, 2008 12:25 AM, Gurvinder Pal Singh
<[EMAIL PROTECTED]> wrote:
>
> Hi , you are right, as the snippet i have given is from the exception sown in
> the wicket-examples project. Also the quick start example u have mentioned
> is of wicket1.2 version and that too for jetty server.
> But i have also tried to do create the HelloWorld example from given
> examples in the website which has given the following error log on starting
> the tomcat:
>
> 2008-01-29 11:19:57 StandardContext[/FirstWicketProject]: Exception starting
> filter HelloWorldApplication
> org.apache.wicket.WicketRuntimeException: Unable to create application of
> class org.apache.wicket.examples.helloworld.HelloWorldApplication
> at
> org.apache.wicket.protocol.http.ContextParamWebApplicationFactory.createApplication(ContextParamWebApplicationFactory.java:82)
> at
> org.apache.wicket.protocol.http.ContextParamWebApplicationFactory.createApplication(ContextParamWebApplicationFactory.java:49)
> at 
> org.apache.wicket.protocol.http.WicketFilter.init(WicketFilter.java:496)
> at
> org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:254)
> at
> org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:314)
> at
> org.apache.catalina.core.ApplicationFilterConfig.(ApplicationFilterConfig.java:120)
> at
> org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3158)
> at
> org.apache.catalina.core.StandardContext.start(StandardContext.java:3602)
> at
> org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:821)
> at 
> org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:807)
> at 
> org.apache.catalina.core.StandardHost.addChild(StandardHost.java:579)
> at
> org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.java:257)
> at 
> org.apache.catalina.core.StandardHost.install(StandardHost.java:772)
> at
> org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:569)
> at 
> org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:411)
> at org.apache.catalina.startup.HostConfig.start(HostConfig.java:879)
> at
> org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:368)
> at
> org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:166)
> at 
> org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1196)
> at org.apache.catalina.core.StandardHost.start(StandardHost.java:738)
> at 
> org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188)
> at 
> org.apache.catalina.core.StandardEngine.start(StandardEngine.java:347)
> at 
> org.apache.catalina.core.StandardService.start(StandardService.java:497)
> at 
> org.apache.catalina.core.StandardServer.start(StandardServer.java:2189)
> at org.apache.catalina.startup.Catalina.start(Catalina.java:512)
> at org.apache.catalina.startup.Catalina.execute(Catalina.java:400)
> at org.apache.catalina.startup.Catalina.process(Catalina.java:180)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:324)
> at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203)
> Caused by: java.lang.ClassNotFoundException:
> org.apache.wicket.examples.helloworld.HelloWorldApplication
> at
> org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1428)
> at
> org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1274)
> at
> org.apache.wicket.protocol.http.ContextParamWebApplicationFactory.createApplication(ContextParamWebApplicationFactory.java:68)
> ... 31 more
>
> Thanks & Regards,
> Gurvinder Pal Singh
>
>
>
>
> Martijn Dashorst wrote:
> >
> > and you try to run the examples in java 4 instead of java 5
> >
> > On 1/30/08, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
> >>
> >> if you want to create a hello world app quickly and properly then go here
> >>
> >> http://wicket.apache.org/quickstart.html
> >>
> >> and run the command given in the textarea.
> >>
> >> it looks like you are trying to startup the wicket-examples project
> >> and not the hello world you created...
> >>
> >> -igor
> >>
> >>
> >> On Jan 29, 2008 10:37 PM, Gurvinder Pal Singh
> >> <[EMAIL PROTECTED]> wrote:
> >> >
> >> > Hi, i created an HelloWorld application in Wicket framwork as de

Re: Getting the exception while starting a application in tomcat

2008-01-30 Thread Gurvinder Pal Singh

Hi , you are right, as the snippet i have given is from the exception sown in
the wicket-examples project. Also the quick start example u have mentioned
is of wicket1.2 version and that too for jetty server.
But i have also tried to do create the HelloWorld example from given
examples in the website which has given the following error log on starting
the tomcat:

2008-01-29 11:19:57 StandardContext[/FirstWicketProject]: Exception starting
filter HelloWorldApplication
org.apache.wicket.WicketRuntimeException: Unable to create application of
class org.apache.wicket.examples.helloworld.HelloWorldApplication
at
org.apache.wicket.protocol.http.ContextParamWebApplicationFactory.createApplication(ContextParamWebApplicationFactory.java:82)
at
org.apache.wicket.protocol.http.ContextParamWebApplicationFactory.createApplication(ContextParamWebApplicationFactory.java:49)
at 
org.apache.wicket.protocol.http.WicketFilter.init(WicketFilter.java:496)
at
org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:254)
at
org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:314)
at
org.apache.catalina.core.ApplicationFilterConfig.(ApplicationFilterConfig.java:120)
at
org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3158)
at
org.apache.catalina.core.StandardContext.start(StandardContext.java:3602)
at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:821)
at 
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:807)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:579)
at
org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.java:257)
at org.apache.catalina.core.StandardHost.install(StandardHost.java:772)
at
org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:569)
at 
org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:411)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:879)
at
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:368)
at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:166)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1196)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:738)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188)
at 
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:347)
at 
org.apache.catalina.core.StandardService.start(StandardService.java:497)
at 
org.apache.catalina.core.StandardServer.start(StandardServer.java:2189)
at org.apache.catalina.startup.Catalina.start(Catalina.java:512)
at org.apache.catalina.startup.Catalina.execute(Catalina.java:400)
at org.apache.catalina.startup.Catalina.process(Catalina.java:180)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203)
Caused by: java.lang.ClassNotFoundException:
org.apache.wicket.examples.helloworld.HelloWorldApplication
at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1428)
at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1274)
at
org.apache.wicket.protocol.http.ContextParamWebApplicationFactory.createApplication(ContextParamWebApplicationFactory.java:68)
... 31 more

Thanks & Regards,
Gurvinder Pal Singh



Martijn Dashorst wrote:
> 
> and you try to run the examples in java 4 instead of java 5
> 
> On 1/30/08, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
>>
>> if you want to create a hello world app quickly and properly then go here
>>
>> http://wicket.apache.org/quickstart.html
>>
>> and run the command given in the textarea.
>>
>> it looks like you are trying to startup the wicket-examples project
>> and not the hello world you created...
>>
>> -igor
>>
>>
>> On Jan 29, 2008 10:37 PM, Gurvinder Pal Singh
>> <[EMAIL PROTECTED]> wrote:
>> >
>> > Hi, i created an HelloWorld application in Wicket framwork as described
>> in
>> > their web page, but i am getting following exceptions. Please somebody
>> help
>> > me beacuse i am not getting a moveon from here on..
>> >
>> > org.apache.wicket.WicketRuntimeException: Unable to create application
>> of
>> > class org.apache.wicket.examples.velocity.VelocityTemplateApplication
>> >
>> > 2008-01-29 18:40:35 StandardContext[/wicket-examples-1.3.0]: Exception
>> > starting filter WizardApplication
>> > java.lang.UnsupportedCla

Re: Ajax Busy Indicator

2008-01-30 Thread Igor Vaynberg
 should get you started :)

the only caveat is if that image component for some reason has
setoutputmarkupid(true) set on it, in which case the id attr you put
into markup will be overwritten, to make this thing work dynamically
you would

final Image image=new Image("ajxIndicatorImage", ...);
image.setOutputMarkupId(true);
image.setMarkupId('whatever-you-want-but-make-sure-its-unique');

pass that markup id to your iajaxindicatorware component

alternatively you can wire up the two components so the use wicket's
automatically generated markup id which is available via
component.getmarkupid() but the caveat is that it is only available
during render

-igor




class abstract mycomponent implements iajaxindicatoraware {
};


-igor


On Jan 30, 2008 12:02 AM, Martin Makundi
<[EMAIL PROTECTED]> wrote:
> > And wait a minute, is the container in fact the indicator?
>
> Yes!
>
> > >  @Override
> > >  protected void onComponentTag(ComponentTag tag) {
> > >super.onComponentTag(tag);
> > >tag.put("src",urlFor(AbstractDefaultAjaxBehavior.INDICATOR));
> > >  }
> >
> > This part I didn't understand.
>
> The html has just " wicket:id="ajaxIndicator"/>" and that command will replace the src ->
> Wicket's default indicator image.
>
> > Wicket id is a different thing than the markup id. Probably
> > you need to override getMarkupId() to return that id.
>
> Ok. This is probably where I have messed up.
>
> Say I have ""
> in my HTML and an AjaxIndicatorContainer extends WebMarkupContainer
> for it as previously.
>
> Now, how do I set up the markup-id if it is not the same as wicket-id
> :) ? Anyone has done this exact same thing before in a similar manner
> and coud post code?
>
> **
> Martin
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Ajax Busy Indicator

2008-01-30 Thread Martin Makundi
> And wait a minute, is the container in fact the indicator?

Yes!

> >  @Override
> >  protected void onComponentTag(ComponentTag tag) {
> >super.onComponentTag(tag);
> >tag.put("src",urlFor(AbstractDefaultAjaxBehavior.INDICATOR));
> >  }
>
> This part I didn't understand.

The html has just "" and that command will replace the src ->
Wicket's default indicator image.

> Wicket id is a different thing than the markup id. Probably
> you need to override getMarkupId() to return that id.

Ok. This is probably where I have messed up.

Say I have ""
in my HTML and an AjaxIndicatorContainer extends WebMarkupContainer
for it as previously.

Now, how do I set up the markup-id if it is not the same as wicket-id
:) ? Anyone has done this exact same thing before in a similar manner
and coud post code?

**
Martin

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]