Re: How to redirect from a ModalWindow

2009-09-11 Thread Vladimir K

Try adding this one to the page markup


jQuery(document).ready(function(){
if (typeof Wicket != 'undefined' && 
Wicket.Window)
Wicket.Window.unloadConfirmation = 
false;
});



Matthias Keller wrote:
> 
> Hi Peter
> 
> You would be right as long as it wasn't for a ModalWindow.
> When having an open ModalWindow, wicket seems to register an unload 
> javascript event which - when trying to navigate away from the page (be 
> it by following a link, closing the window etc), displays a confirmation 
> message which you have to accept. I need to avoid that message, but the 
> only way to do that probably is by closing that window first so that the 
> javascript event gets unloaded.
> 
> Matt
> 
> Peter Ertl wrote:
>>
>>
>> throw new RestartResponseException(OtherPage.class)
>>
>> window.close() is not needed!
>>
>>
>> Am 10.09.2009 um 12:50 schrieb Matthias Keller:
>>
>>> OtherPage.class
>>
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
> 
> 
>  
> 

-- 
View this message in context: 
http://www.nabble.com/How-to-redirect-from-a-ModalWindow-tp25381117p25411990.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Slides

2009-09-11 Thread Luther Baker
No problem.
http://www.slideshare.net/lutherbaker/wicket-1987659

-Luther


On Fri, Sep 11, 2009 at 11:08 PM, Jeremy Thomerson <
jer...@wickettraining.com> wrote:

> Perhaps you could upload them to http://www.slideshare.net/
>
> --
> Jeremy Thomerson
> http://www.wickettraining.com
>
>
>
> On Fri, Sep 11, 2009 at 9:54 PM, Luther Baker 
> wrote:
>
> > I have slides from my Wicket presentation last night here in St. Louis.
> > I can't say how helpful they'd be for folks that weren't there but I'd be
> > happy to submit them for posting somewhere in the Wicket WIKI pages.
> >
> > -Luther
> >
>


Re: Slides

2009-09-11 Thread Jeremy Thomerson
Perhaps you could upload them to http://www.slideshare.net/

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



On Fri, Sep 11, 2009 at 9:54 PM, Luther Baker  wrote:

> I have slides from my Wicket presentation last night here in St. Louis.
> I can't say how helpful they'd be for folks that weren't there but I'd be
> happy to submit them for posting somewhere in the Wicket WIKI pages.
>
> -Luther
>


Re: RefreshingView not Refreshing

2009-09-11 Thread Troy Cauble
 wrote:
>  So for instance if a model is not detached correctly, wicket
> will use old data (don't know if the problem is in this area).

It was a load/detach problem.
I was also using the the LDM in a custom validator.
Apparently that loaded the LDM before my save & commit.
A detach() call cleared it up.

-troy

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



Slides

2009-09-11 Thread Luther Baker
I have slides from my Wicket presentation last night here in St. Louis.
I can't say how helpful they'd be for folks that weren't there but I'd be
happy to submit them for posting somewhere in the Wicket WIKI pages.

-Luther


Re: Wicket integration with jQuery

2009-09-11 Thread Martin Makundi
Quoted:

The 1.0-beta version should be downloadable around the 15 May 2009, it
will integrate all features of WickeXt 0.9, plus a new behavior
abstraction to ease integration of component like drag and drop, etc.
Where can I ask some questions about the project ?

We chosen to use google groups to host user questions about the
framework: http://groups.google.com/group/wiquery

The Nabble forum of WickeXt is still available but will be closed as
WickeXt will end.

2009/9/12 danisevsky :
> Hello folks. I would like to use some Wicket integration with jQuery. But I
> found several implementations (WickeXt, wiquery and in wicket-stuff jwicket
> and jquery) and I do not know which one is the best. Could someone give me
> an advise?
>
> Thanks
>

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



Re: Displaying column totals for a DefaultDataTable

2009-09-11 Thread Michael Mosmann
> Your code does work to display the number of columns in the dataTable, after
> I changed dataTable.size() to dataTable.getRowCount(). It did help me in
> getting started with writing my own toolbar.

Ok.. id did it in this email client, which has very poor development
support:) but it was good enough to show you the way:) ..

> However, my table has several amount columns and I want to display the sum
> of the amounts in each column at the bottom of that column.

for the rows displayed or all rows in this columns?
i think, you mean the second.. so it is not trivial, because you should
not iterate over all entries to build up this numbers..

maybe this is a valid solution:

you have somewhere a function which gives you the list of items.. maybe
List MyEntity.getList(offset,count).. you need a function
which returns on Instance of MyEntity filled whith sum for each property
(select sum(prop1),sum(prop2)... -> MyEntity.setProp1(sum1) ..)

than take a DataGridView .. see DataTable.java to get a picture of what
you need.. so you can reuse the List of IColumn.

if you have any further questions.. send some code.

mm:)

there are many good wicket books available .. do you have one? 


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



Wicket integration with jQuery

2009-09-11 Thread danisevsky
Hello folks. I would like to use some Wicket integration with jQuery. But I
found several implementations (WickeXt, wiquery and in wicket-stuff jwicket
and jquery) and I do not know which one is the best. Could someone give me
an advise?

Thanks


Re: Displaying column totals for a DefaultDataTable

2009-09-11 Thread saahuja

Thanks for your reply, Michael.

Your code does work to display the number of columns in the dataTable, after
I changed dataTable.size() to dataTable.getRowCount(). It did help me in
getting started with writing my own toolbar.

However, my table has several amount columns and I want to display the sum
of the amounts in each column at the bottom of that column.

How should I do that? I am also passing in a SortableDataProvider into the
constructor of my Toolbar.

Thanks.


-- 
View this message in context: 
http://www.nabble.com/Displaying-column-totals-for-a-DefaultDataTable-tp25402522p25406289.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Displaying column totals for a DefaultDataTable

2009-09-11 Thread Michael Mosmann
Hi,

> I have a DefaultDataTable with several amount colums. I need to display
> a "Totals" row at the bottom of the table to show the column totals.

> I have searched the forum, and only found suggestions to use
> addBottomToolbar.

correct..

> However, I don't know how to do this? Looking at Wicket's HeaderToolbar,
> I see that I would need to pass the DataTable and the
> SortableDataProvider to my TotalsToolbar.

yes.. correct.

> But, how would the toolbar get the data to display?

public class TotalCounter extends AbstractToolbar
{

public TotalCounter(final DataTable dataTable)
{

IModel model=new LoadabledDetachedModel()
{
  public Integer load()
  {
return dataTable.size()
  }
}

WebMarkupContainer span = new WebMarkupContainer("span");
add(span);
span.add(new AttributeModifier("colspan", true, new Model(
String.valueOf(table.getColumns().length;

span.add(new Label("count",model));
}

> What would the html markup for this toolbar be like?


  

  

  

 

> Would greatly appreciate if someone could please provide some sample
> code.

maybe this will work out of the box, but not sure.. 
(have a look into the wicket code.. .. it will help a lot)

mm:)


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



Re: RequestCycle().urlFor not work

2009-09-11 Thread Dima Rzhevskiy
Sorry, yes, urlFor return correct result.
toAbsolutePath(final String relativePagePath) do not return result what I
expected.
 javadoc copy/pasted from toAbsolutePath(final String requestPath, String
relativePagePath)...

I undestand that it is nessesary to use toAbsolutePath(final String
requestPath, String relativePagePath) where requestPath nessesaty take in
constructor:

public class X1 extends WebPage {

private static final Logger LOG = LoggerFactory.getLogger(X1.class);

public X1(final PageParameters parameters) {

 CharSequence url = getRequestCycle().urlFor(getClass().class, new
PageParameters());
 final String outerUrl2=
RequestUtils.toAbsolutePath(url.toString());   //get
 add(new AjaxLink("message"){
@Override
public void onClick(AjaxRequestTarget ajaxRequestTarget) {
CharSequence url =
getRequestCycle().urlFor(X1.class, new PageParameters());
String url2=
RequestUtils.toAbsolutePath(outerUrl2, url.toString());
LOG.info("url="+url);
LOG.info("url2="+url2);
}
});

}
}


But this code look ugly..
Is better way of obtaining absolute url exists ?

-- 
Rzhevskiy Dmitry


2009/9/11 Jeremy Thomerson 

> what is incorrect about those URLs?  they are relative - relative to the
> path you are on.
>
> --
> Jeremy Thomerson
> http://www.wickettraining.com
>
>
>
> On Fri, Sep 11, 2009 at 10:14 AM, Dima Rzhevskiy  >wrote:
>
> > Hi !
> >
> > I create simple page X1 with AjaxLink :
> > ..
> > new AjaxLink("message"){
> >@Override
> >public void onClick(AjaxRequestTarget ajaxRequestTarget) {
> >CharSequence url =
> > getRequestCycle().urlFor(X1.class, new PageParameters());
> >String url2=
> > RequestUtils.toAbsolutePath(url.toString());
> >LOG.info("url="+url);
> >LOG.info("url2="+url2);
> >}
> >}
> > ...
> > if I mount page to first  level directory , for example "/x1.html"
> > result is correct:
> > url=x1.html
> > url2=http://localhost:8080/ctx/x1.html
> >
> > if I mount page to second level directory "/x1/x2.html" result incorrect
> >  url=../x1/x2.html
> >  url2=http://localhost:8080/x1/x2.html
> >
> > if i mount ti third level directory "/x1/x2/x3.html"
> >  url=../../x1/x2/x3.html
> >  url2=http://x1/x2/x3.html
> >
> > Is this bug or I use API incorrectly ?
> >
> > --
> >
> > Rzhevskiy Dmitry
> >
>


Re: RequestCycle().urlFor not work

2009-09-11 Thread Jeremy Thomerson
what is incorrect about those URLs?  they are relative - relative to the
path you are on.

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



On Fri, Sep 11, 2009 at 10:14 AM, Dima Rzhevskiy wrote:

> Hi !
>
> I create simple page X1 with AjaxLink :
> ..
> new AjaxLink("message"){
>@Override
>public void onClick(AjaxRequestTarget ajaxRequestTarget) {
>CharSequence url =
> getRequestCycle().urlFor(X1.class, new PageParameters());
>String url2=
> RequestUtils.toAbsolutePath(url.toString());
>LOG.info("url="+url);
>LOG.info("url2="+url2);
>}
>}
> ...
> if I mount page to first  level directory , for example "/x1.html"
> result is correct:
> url=x1.html
> url2=http://localhost:8080/ctx/x1.html
>
> if I mount page to second level directory "/x1/x2.html" result incorrect
>  url=../x1/x2.html
>  url2=http://localhost:8080/x1/x2.html
>
> if i mount ti third level directory "/x1/x2/x3.html"
>  url=../../x1/x2/x3.html
>  url2=http://x1/x2/x3.html
>
> Is this bug or I use API incorrectly ?
>
> --
>
> Rzhevskiy Dmitry
>


Re: Error flushing page

2009-09-11 Thread Igor Vaynberg
firstly, wicket 1.4.1 is out.

secondly, it looks like you need to increase the number of open file
handles allowed on your system because you are running out. one cause
may be that a wicket app is deployed in development mode instead of
deployment mode.

-igor

On Fri, Sep 11, 2009 at 1:35 AM, Anton Komratov  wrote:
> I’m using wicket-1.4.rc4 with Geronimo 2.1.4 (tomcat 6, java ee 5) and
> have got the following exception:
>
> 2009-09-11 10:10:44,212 ERROR [DiskPageStore] Error flushing page
> java.lang.RuntimeException: java.io.FileNotFoundException:
> /usr/local/geronimo-tomcat6-javaee5-2.1.4/var/catalina/work/depost/Main-filestore/CDBF71162CAA988157064CA98A5D1CEA/pm-null
> (Too many open files)
>      at 
> org.apache.wicket.protocol.http.pagestore.FileChannelPool.newFileChannel(FileChannelPool.java:103)
>      at 
> org.apache.wicket.protocol.http.pagestore.FileChannelPool.getFileChannel(FileChannelPool.java:170)
>      at 
> org.apache.wicket.protocol.http.pagestore.DiskPageStore$SessionEntry.savePage(DiskPageStore.java:241)
>      at 
> org.apache.wicket.protocol.http.pagestore.DiskPageStore.flushPagesToSaveList(DiskPageStore.java:898)
>      at 
> org.apache.wicket.protocol.http.pagestore.DiskPageStore$PageSavingThread.run(DiskPageStore.java:970)
>      at java.lang.Thread.run(Thread.java:619)
> Caused by: java.io.FileNotFoundException:
> /usr/local/geronimo-tomcat6-javaee5-2.1.4/var/catalina/work/depost/Main-filestore/CDBF71162CAA988157064CA98A5D1CEA/pm-null
> (Too many open files)
>      at java.io.RandomAccessFile.open(Native Method)
>      at java.io.RandomAccessFile.(RandomAccessFile.java:212)
>      at 
> org.apache.wicket.protocol.http.pagestore.FileChannelPool.newFileChannel(FileChannelPool.java:98)
>      ... 5 more
>
>
> I did not find solutions in this forum. S-o-s. It happened in production 
> system.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>

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



RequestCycle().urlFor not work

2009-09-11 Thread Dima Rzhevskiy
Hi !

I create simple page X1 with AjaxLink :
..
new AjaxLink("message"){
@Override
public void onClick(AjaxRequestTarget ajaxRequestTarget) {
CharSequence url =
getRequestCycle().urlFor(X1.class, new PageParameters());
String url2=
RequestUtils.toAbsolutePath(url.toString());
LOG.info("url="+url);
LOG.info("url2="+url2);
}
}
...
if I mount page to first  level directory , for example "/x1.html"
result is correct:
url=x1.html
url2=http://localhost:8080/ctx/x1.html

if I mount page to second level directory "/x1/x2.html" result incorrect
 url=../x1/x2.html
 url2=http://localhost:8080/x1/x2.html

if i mount ti third level directory "/x1/x2/x3.html"
 url=../../x1/x2/x3.html
 url2=http://x1/x2/x3.html

Is this bug or I use API incorrectly ?

-- 

Rzhevskiy Dmitry


Re: How to redirect from a ModalWindow

2009-09-11 Thread Peter Ertl

That is sick! :-(

Isn't there a better solution?


Am 11.09.2009 um 08:42 schrieb Michal Kurtak:


Hi Matthias,

Try to navigate to another page from WindowClosedCallback

window.close(target);
window.setWindowClosedCallback(new WindowClosedCallback()
{
public void onClose(AjaxRequestTarget target)
{
  setResponsePage(OtherPage.class);
}
}


But remember to remove WindowClosedCallback before you open your
window next time

Michal

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



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



Displaying column totals for a DefaultDataTable

2009-09-11 Thread Sadhna Ahuja
Hello,

 

I have a DefaultDataTable with several amount colums. I need to display
a "Totals" row at the bottom of the table to show the column totals.

 

I have searched the forum, and only found suggestions to use
addBottomToolbar.

 

However, I don't know how to do this? Looking at Wicket's HeaderToolbar,
I see that I would need to pass the DataTable and the
SortableDataProvider to my TotalsToolbar.

 

But, how would the toolbar get the data to display?

 

What would the html markup for this toolbar be like?

 

Would greatly appreciate if someone could please provide some sample
code.

 

Thanks in advance.

 

 

 

 



Re: RefreshingView not Refreshing

2009-09-11 Thread Michael Mosmann
Hi,

> Thanks, but I don't know what that implies.

If you post a form, then wicket will get the current page from session
and call the onSubmit() for the form component. Everything else is
allready there.. the RV etc.

If you reload a page, wicket will build the page again.. your old page
is gone. So for instance if a model is not detached correctly, wicket
will use old data (don't know if the problem is in this area). If you
reload the page, everything is thrown away and build from scratch. So if
your LDM is not bound to any component, detach() is never called.. the
old stuff is used.

So please send more code..

> Should I put the RV in the form?

no..

> Should I use some Ajax so I can target.addComponent(RV) ?

no.. because if it does not work without ajax, it will not work with
it..

> And most of all, why did my other variation work?
> It seems that the RV was being refreshed then.

wich wicket version do you use?

mm:)

> -troy
> 
> On Fri, Sep 11, 2009 at 2:47 AM, Michael Mosmann  wrote:
> > Hi,
> >
> >> I'm wondering why the small change (see comments)
> >> to my RV causes it to not refresh automatically.
> >> A browser refresh shows the changes.
> >
> > The Form submit does not call the page constructor, but a browser
> > refresh does.
> >
> > mm:)
> >
> >
> >
> > -
> > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> > For additional commands, e-mail: users-h...@wicket.apache.org
> >
> >
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
> 


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



Re: back button using HistoryAjaxBehavior

2009-09-11 Thread fachhoch

I need help on implementing listener for browsers back or  forward button ,
is it possible  to implement ?

fachhoch wrote:
> 
> I want  to disable back and forward button for which I followed
> HistoryAjaxBehavior  example
> 
> 
> final AjaxLink linkTwo = new AjaxLink("linkTwo") {
> 
> private static final long serialVersionUID = 1L;
> 
> @Override
> public void onClick(final AjaxRequestTarget target) {
> info("Link two has been clicked");
> target.addChildren(getPage(), FeedbackPanel.class);
> historyAjaxBehavior.registerAjaxEvent(target, this);
> }
> 
> };
> 
> 
> here one component is registered to historyAjaxBehavior , on click of back
> button,   onAjaxHistoryEvent   from   HistoryAjaxBehavior  gets called ,
> but my case I donot have any link component , I have a page with a
> datatable
> and when user navigates away from this page   and clicks back button   to
> return to this page, in this case because I did not register any
> component,
> so the method onAjaxHistoryEvent will not be called so please tell me
> how to have  historyAjaxBehavior  to a page ?
> 
> 

-- 
View this message in context: 
http://www.nabble.com/back-button-using-HistoryAjaxBehavior-tp25389933p25402171.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: RefreshingView not Refreshing

2009-09-11 Thread Troy Cauble
Thanks, but I don't know what that implies.
Should I put the RV in the form?
Should I use some Ajax so I can target.addComponent(RV) ?

And most of all, why did my other variation work?
It seems that the RV was being refreshed then.

-troy

On Fri, Sep 11, 2009 at 2:47 AM, Michael Mosmann  wrote:
> Hi,
>
>> I'm wondering why the small change (see comments)
>> to my RV causes it to not refresh automatically.
>> A browser refresh shows the changes.
>
> The Form submit does not call the page constructor, but a browser
> refresh does.
>
> mm:)
>
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>

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



Re: Announcing: Scala-Wicket Extensions Project

2009-09-11 Thread Antony Stubbs

Ok yup - it's on the cards to be removed...


cretzel wrote:
> 
> 
> 
> Antony Stubbs wrote:
>> 
>> 
>> Yes, the ⇒ is actually what the "=>" is supposed to be in Scala, and is a
>> UTF8 character, which I'm sure would be supported by all modern editors.
>> I'm surprised you can't see it properly. What OS and version of Eclipse
>> are you viewing them with? I am toying around with ⇒ atm and haven't
>> really reached a decision on which I prefer. But if it causes trouble for
>> people, and it's an open library, then causing _less_ trouble for people
>> is preferable :)
>> 
>> 
> 
> I'm having the same problems, in any text editor.
> 


-
___

http://stubbisms.wordpress.com http://stubbisms.wordpress.com 
-- 
View this message in context: 
http://www.nabble.com/Announcing%3A-Scala-Wicket-Extensions-Project-tp24975011p25401691.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Wicket timed events on page - how to?

2009-09-11 Thread Michael Mosmann
Am Freitag, den 11.09.2009, 12:49 +0200 schrieb Tomasz Dziurko:
> I am writing an application for testing users and two functionalities
> I need to implement are:
> 1. show/hide some components on the page after specified time (few seconds)
> 2. redirect to next page after specified time
> 
> I was wondering how to do this, I did some google search and seems I
> need to extend AbstractAjaxTimerBehavior. Is it correct way or maybe
> another, better solution exists?

yes.. it is the correct way..

for 1. you can use AjaxSelfUpdatingTimerBehavior (extends
AbstractAjaxTimerBehavior)... :)

maybe it works for 2. too..

mm:)


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



Re: understanding models

2009-09-11 Thread Pedro Santos
should "remember" its selected values throwout requests. This is the job of
a model

This is the job of a static model, maybe you are using a dynamic one.

On Fri, Sep 11, 2009 at 6:27 AM, Tomek Sniadach <
tomek.sniad...@googlemail.com> wrote:

> Hi,
> i have probably a simple question: I have a component (multiselection
> dialog
> in js) that should "remember" its selected values throwout requests. This
> is
> the job of a model.
> I have a constructor with a model as parameter, but on new request (page
> refresh) the will be "constructed" again with initial model. But I need the
> "old" values.
> I understood that wicket serialize a model at the end of a request, but I
> don't understood how  to get the old values on a new request. Is there a
> simple example for this purpose?
>
> Regards
> Tomek
>


Re: DropDownChoice with Java Enum

2009-09-11 Thread Pedro Santos
Very simple:  add(new
DropDownChoice("requestStatus",Arrays.asList(ProcessingStatusType.values()),
... ));
the constructor javadoc:
http://static.ddpoker.com/javadoc/wicket/1.4-m2/org/apache/wicket/markup/html/form/DropDownChoice.html#DropDownChoice%28java.lang.String,%20java.util.List,%20org.apache.wicket.markup.html.form.IChoiceRenderer%29
the super class contructor:
http://static.ddpoker.com/javadoc/wicket/1.4-m2/org/apache/wicket/markup/html/form/AbstractChoice.html#AbstractChoice%28java.lang.String,%20java.util.List,%20org.apache.wicket.markup.html.form.IChoiceRenderer%29
The second parameter (Arrays.asList(ProcessingStatusType.values())) are
"The collection of choices in the dropdown". Your model will receive to
setter an item from this list of choices.

On Fri, Sep 11, 2009 at 3:59 AM, cmoulliard  wrote:

>
> If understand correctly, the value displayed in as value in the html
> options
> will not be used to set my requestStatus property in the model class
> "RequestFormModel" but use by the DropDownchoice to find the value to be
> setted (like key for hashmap, index for array, ...).
>
> In consequenc,e I have to change the code of my property setter inside my
> model to set the value (coming from the ENUM) :
>
>public void setRequestType(String requestType) {
>// Set requestType field with the value (and not the
> description) of the
> enum
>this.requestType = ProcessingStatusType.valueOf( requestType
> ).getValue();
> }
>
>
>
> Pedro Santos-6 wrote:
> >
> > The value on model are on ProcessingStatusType instance. Use
> > ((ProcessingStatusType)model.getObject()).getValue() to access the value
> > REJEC
> >
> >
> > On Thu, Sep 10, 2009 at 12:39 PM, cmoulliard 
> wrote:
> >
> >>
> >> Thks for all.
> >>
> >> With the following syntax :
> >>
> >>add(new DropDownChoice("requestStatus",
> >> Arrays.asList(ProcessingStatusType.values()), new IChoiceRenderer() {
> >>
> >> public Object getDisplayValue(Object status) {
> >>return ((ProcessingStatusType)
> >> status).getDescription();
> >>}
> >>
> >>public String getIdValue(Object status, int
> index)
> >> {
> >>return ((ProcessingStatusType)
> >> status).getValue();
> >>}}));
> >>
> >> html generated :
> >>
> >> 
> >> Choose One
> >> New
> >> Accepted
> >>
> >> Validated
> >> Transformed
> >> Transferred
> >> Rejected
> >> Failed
> >> 
> >>
> >> Everything is ok except that the value receives by my RequestFormModel
> >> after
> >> the post is equal to the description (e.g : REJECTED instead of REJEC)
> >> and
> >> not the value 
> >>
> >>
> >>
> >>
> >>
> >>
> >> Here is what I have in html :
> >>
> >>
> >>
> >> Matthias Keller wrote:
> >> >
> >> > Hi
> >> >
> >> > Close but not quite. getDisplayValue gets the catual ELEMENT of the
> >> list
> >> > - so objDispl is of type ProcessingStatusType already.
> >> > So in your case it would be something like:
> >> >
> >> >> public Object getDisplayValue(Object objDispl) {
> >> >>  return ((ProcessingStatusType) objDispl).getDescription();
> >> >> }
> >> >>
> >> >> public String getIdValue(Object obj, int index) {
> >> >>  return obj.toString();
> >> >>  // or if you prefer to have the value of your enum in the HTML
> >> code:
> >> >>  // return ((ProcessingStatusType) objDispl).getValue()
> >> >> }
> >> > Which one of the getIdValue implementations you chose doesn't matter
> >> for
> >> > wicket, it just needs an ID for every entry which is unique.
> >> > In your case you could even   return String.valueOf(index)   as your
> >> > backing List of the Enums will not ever change while deployed.
> >> >
> >> > Be careful though with using index, there are circumstances where no
> >> > useful index will be provided (always -1) - That happens when you
> >> > externally change the selected value of the DropDownChoice.
> >> >
> >> > you could also just use or extend ChoiceRenderer which might already
> do
> >> > what you want...
> >> > For example
> >> > new ChoiceRenderer("description", "value")
> >> >
> >> > Matt
> >> >
> >> > cmoulliard wrote:
> >> >> You mean create something like this :
> >> >>
> >> >> add(new DropDownChoice("requestStatus",
> >> >> Arrays.asList(ProcessingStatusType.values()), new IChoiceRenderer() {
> >> >>
> >> >>  public Object getDisplayValue(Object objDispl) {
> >> >>  return
> >> ProcessingStatusType.valueOf((String)
> >> >> objDispl).getDescription();
> >> >>  }
> >> >>
> >> >>  public String getIdValue(Object obj, int index)
> {
> >> >>  return obj.toString();
> >> >>  }}));
> >> >>
> >> >> I have an error during initialisation :
> >> >>
> >> >> WicketMessage: Exception in rendering component: [MarkupContainer
> >> >> [Component
> >> >> i

Wicket timed events on page - how to?

2009-09-11 Thread Tomasz Dziurko
I am writing an application for testing users and two functionalities
I need to implement are:
1. show/hide some components on the page after specified time (few seconds)
2. redirect to next page after specified time

I was wondering how to do this, I did some google search and seems I
need to extend AbstractAjaxTimerBehavior. Is it correct way or maybe
another, better solution exists?

Thank you in advance for your help.

-- 
Regards
Tomek

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



understanding models

2009-09-11 Thread Tomek Sniadach
Hi,
i have probably a simple question: I have a component (multiselection dialog
in js) that should "remember" its selected values throwout requests. This is
the job of a model.
I have a constructor with a model as parameter, but on new request (page
refresh) the will be "constructed" again with initial model. But I need the
"old" values.
I understood that wicket serialize a model at the end of a request, but I
don't understood how  to get the old values on a new request. Is there a
simple example for this purpose?

Regards
Tomek


Re: Spring annotations fail to inject into webmodels

2009-09-11 Thread jWeekend

Pieter,

If you want to use Spring's @Configuarble you'll need to enable Load Time
Weaving or Complie Time Weaving.

To use @SpringBean with an object that is not a Wicket Component you need to
InjectorHolder.getInjector().inject(this) on initialisation of your object. 

The benefit of the latter approach is that you do not need to introduce
weaving and that Wicket will make sure you have a serialisable proxy
injected.

Regards - Cemal 
jWeekend 
OO & Java Technologies, Wicket Training and Development 
http://jWeekend.com




Pieter Claassen wrote:
> 
> I am using maven, spring 2.5.6, wicket 1.4 and am trying to inject my
> DAO's
> into my wicket models but I find that Spring just ignores my advice.
> 
> My question:
> 1. @SpringBean only works on stuff that inherits from Component. What do I
> do with things like session and models that don't? I am trying to use
> @Configurable but that is being ignored.
> 2. My POM deps are below. What should I pull in to have @Configurable
> working?
> 3. BTW. When I comment the bean out of my XML config, then I do get an
> error
> so I am not sure if I am doing something very small wrong?
> 
> Thanks.
> Pieter
> 
> pom.xml
> ===
> ...
>
> org.springframework
> spring-core
> ${spring.version}
> 
> 
> 
> org.apache.wicket
> wicket-spring
> ${wicket.version}
>   
>   
> 
>   org.springframework
>   spring
> 
>   
> 
> 
> 
> 
> TemplateWebModel.java
> ==
> .
> @Configurable
> public class TemplateWebModel extends AbstractDataSetWebModel {
> 
> private TemplateFactory templateFactory;
> 
> public TemplateFactory getTemplateFactory() {
> return templateFactory;
> }
> 
> public void setTemplateFactory(TemplateFactory templateFactory) {
>throw new RuntimeException("REACHED TEMPLATE FACTORY SET"); //This
> setter is never run
> //this.templateFactory = templateFactory;
> }
> .
> 
> WicketApplicationDefinitition.xml
> ==
> 
> 
> http://www.springframework.org/schema/beans";
>xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
>xmlns:context="http://www.springframework.org/schema/context";
>xsi:schemaLocation="
> http://www.springframework.org/schema/beans
> http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
> http://www.springframework.org/schema/context
> http://www.springframework.org/schema/context/spring-context-2.5.xsd";>
> 
> 
> 
> 
> 
>  destroy-method="close">
> 
> 
> 
> 
> 
> 
>  destroy-method="close">
> 
> 
> 
> 
> .
> 
> 
> 
> 
> 
> 
> 
> 
> 
> -- 
> Pieter Claassen
> musmato.com
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Spring-annotations-fail-to-inject-into-webmodels-tp25396625p25397205.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: defaultFormProcessing is no longer considered when processing multipart form in ajax request

2009-09-11 Thread Vladimir K

done

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


Vladimir K wrote:
> 
> sure
> 
> 
> igor.vaynberg wrote:
>> 
>> i guess create a quickstart and attach it to a jira issue. when i
>> tested buttons, while developing the feature, it seemed to work fine.
>> 
>> -igor
>> 
>> On Wed, Sep 9, 2009 at 10:40 PM, Vladimir K  wrote:
>>>
>>> it is attached to the  tag as follows:
>>>
>>>                        >> enctype='multipart/form-data'>
>>>                                
>>>                                        >> type="submit"
>>> wicket:message="value:command.cancelAction">
>>>                                
>>>                        
>>>
>>> From my perspective the request is submitted very similar to as I
>>> remember
>>> submitting drop downs many years ago
>>> 
>>> The request parameters contain the name of the form instead of the name
>>> of
>>> the button.
>>>
>>>
>>> igor.vaynberg wrote:

 this bit of javascript:

 if (submitButton != null) { s += Wicket.Form.encode(submitButton) +
 "=1";
 }

 is needed because we do perform a custom form serialization - really
 just constructing the query string - that we submit back to server via
 ajax. the multipart handling performs a regular post into a hidden
 iframe so the browser performs the serialization - and that should
 include the button. what markup is your button attached to?

 -igor

 On Wed, Sep 9, 2009 at 8:18 PM, Vladimir Kovalyuk 
 wrote:
> I added AjaxFallbackButton("Cancel").setDefaultFormProcessing(false)
> to
> the
> multipart form and when it is pressed the form is handled as well as
> the
> button would have defaultFormProcessing=true.
>
> It happens because request parameters does not contain the name of the
> submitting button.
>
> The magic is in the new code in wicket-ajax.js
>
>    // Submits a form using ajax.
>    // This method serializes a form and sends it as POST body.
>    submitForm: function(form, submitButton) {
>        if (this.handleMultipart(form)) {
>            return true;
>        }
>        var body = function() {
>            var s = Wicket.Form.serialize(form);
>            if (submitButton != null) {
>                s += Wicket.Form.encode(submitButton) + "=1";
>            }
>            return s;
>        }
>        return this.request.post(body);
>    },
>
> I believe the problem is caused by handleMultipart(form) invocation.
> submitForm function accepts submitButton parameter but does not passes
> it
> to
> handleMultipart function.
>
> Igor could you clarify that?
>

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



>>>
>>> --
>>> View this message in context:
>>> http://www.nabble.com/defaultFormProcessing-is-no-longer-considered-when-processing--multipart-form-in-ajax-request-tp25376538p25377594.html
>>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>>
>>>
>>> -
>>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>>> For additional commands, e-mail: users-h...@wicket.apache.org
>>>
>>>
>> 
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>> 
>> 
>> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/defaultFormProcessing-is-no-longer-considered-when-processing--multipart-form-in-ajax-request-tp25376538p25397125.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Error flushing page

2009-09-11 Thread Anton Komratov
I’m using wicket-1.4.rc4 with Geronimo 2.1.4 (tomcat 6, java ee 5) and
have got the following exception:

2009-09-11 10:10:44,212 ERROR [DiskPageStore] Error flushing page
java.lang.RuntimeException: java.io.FileNotFoundException:
/usr/local/geronimo-tomcat6-javaee5-2.1.4/var/catalina/work/depost/Main-filestore/CDBF71162CAA988157064CA98A5D1CEA/pm-null
(Too many open files)
  at 
org.apache.wicket.protocol.http.pagestore.FileChannelPool.newFileChannel(FileChannelPool.java:103)
  at 
org.apache.wicket.protocol.http.pagestore.FileChannelPool.getFileChannel(FileChannelPool.java:170)
  at 
org.apache.wicket.protocol.http.pagestore.DiskPageStore$SessionEntry.savePage(DiskPageStore.java:241)
  at 
org.apache.wicket.protocol.http.pagestore.DiskPageStore.flushPagesToSaveList(DiskPageStore.java:898)
  at 
org.apache.wicket.protocol.http.pagestore.DiskPageStore$PageSavingThread.run(DiskPageStore.java:970)
  at java.lang.Thread.run(Thread.java:619)
Caused by: java.io.FileNotFoundException:
/usr/local/geronimo-tomcat6-javaee5-2.1.4/var/catalina/work/depost/Main-filestore/CDBF71162CAA988157064CA98A5D1CEA/pm-null
(Too many open files)
  at java.io.RandomAccessFile.open(Native Method)
  at java.io.RandomAccessFile.(RandomAccessFile.java:212)
  at 
org.apache.wicket.protocol.http.pagestore.FileChannelPool.newFileChannel(FileChannelPool.java:98)
  ... 5 more


I did not find solutions in this forum. S-o-s. It happened in production system.

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



Re: Ajax Redirect with Busy Indicator

2009-09-11 Thread Ernesto Reinaldo Barreiro
After refreshing the page I saw it;-)
Best,

Ernesto

On Fri, Sep 11, 2009 at 9:29 AM, Martin Makundi <
martin.maku...@koodaripalvelut.com> wrote:

> Already done, if you look carefully :)
>
> **
> Martin
>
> 2009/9/11 Ernesto Reinaldo Barreiro :
> > Why not add this as a "variation" to the WIKI page [1] you have created?
> > Ernesto
> >
> > [1]-
> >
> http://cwiki.apache.org/WICKET/generic-busy-indicator-for-both-ajax-and-non-ajax-submits.html
> >
> > <
> http://cwiki.apache.org/WICKET/generic-busy-indicator-for-both-ajax-and-non-ajax-submits.html
> >
> >
> > On Fri, Sep 11, 2009 at 7:57 AM, Martin Makundi <
> > martin.maku...@koodaripalvelut.com> wrote:
> >
> >> Hi!
> >>
> >> Well.. you need to find out what is the cause.
> >>
> >> For example, if you redirect to external pages, you must skip the busy
> >> indicator. This means that you might have to use some clue in your
> >> button or link to omit the busy indicator.
> >>
> >> Here is some example code that we use:
> >>
> >>if ((clickedElement.tagName.toUpperCase() == 'A'
> >>  && ((clickedElement.target == null) ||
> >> (clickedElement.target.length <= 0))
> >>  && (clickedElement.href.lastIndexOf('#') !=
> >> (clickedElement.href.length-1))
> >>  && (!('nobusy' in clickedElement))
> >>  && (clickedElement.href.indexOf('skype') < 0)
> >>  && (clickedElement.href.indexOf('mailto') < 0)
> >>  && (clickedElement.href.indexOf('WicketAjaxDebug') < 0)
> >>  && (clickedElement.href.lastIndexOf('.doc') !=
> >> (clickedElement.href.length-4))
> >>  && (clickedElement.href.lastIndexOf('.csv') !=
> >> (clickedElement.href.length-4))
> >>  && (clickedElement.href.lastIndexOf('.xls') !=
> >> (clickedElement.href.length-4))
> >>  && ((clickedElement.onclick == null) ||
> >> (clickedElement.onclick.toString().indexOf('window.open') <= 0))
> >>  )
> >>  || (clickedElement.parentNode.tagName.toUpperCase() == 'A'
> >>  && ((clickedElement.parentNode.target == null) ||
> >> (clickedElement.parentNode.target.length <= 0))
> >>  && (clickedElement.parentNode.href.indexOf('skype') < 0)
> >>  && (clickedElement.parentNode.href.indexOf('mailto') < 0)
> >>  && (clickedElement.parentNode.href.lastIndexOf('#') !=
> >> (clickedElement.parentNode.href.length-1))
> >>  && (clickedElement.parentNode.href.lastIndexOf('.doc') !=
> >> (clickedElement.parentNode.href.length-4))
> >>  && (clickedElement.parentNode.href.lastIndexOf('.csv') !=
> >> (clickedElement.parentNode.href.length-4))
> >>  && (clickedElement.parentNode.href.lastIndexOf('.xls') !=
> >> (clickedElement.parentNode.href.length-4))
> >>  && ((clickedElement.parentNode.onclick == null) ||
> >> (clickedElement.parentNode.onclick.toString().indexOf('window.open')
> >> <= 0))
> >>  )
> >>  || (
> >> ((clickedElement.onclick == null)
> >>   ||
> >>   ((clickedElement.onclick.toString().indexOf('confirm') <= 0)
> >>&& (clickedElement.onclick.toString().indexOf('alert') <= 0)
> >>&&
> (clickedElement.onclick.toString().indexOf('Wicket.Palette')
> >> <= 0)))
> >> && (clickedElement.tagName.toUpperCase() == 'INPUT' &&
> >> (clickedElement.type.toUpperCase() == 'BUTTON'
> >>  || clickedElement.type.toUpperCase() == 'SUBMIT' ||
> >> clickedElement.type.toUpperCase() == 'IMAGE'))
> >> )
> >>  ) {
> >>  showBusysign();
> >>}
> >>
> >>
> >> **
> >> Martin
> >>
> >> 2009/9/11 Robert McGuinness :
> >> > I applied the busy indicator techniques found here:
> >> >
> >>
> http://cwiki.apache.org/WICKET/generic-busy-indicator-for-both-ajax-and-non-ajax-submits.htmlas
> >> > a site wide implementation.
> >> >
> >> > I am using an ajax to submit the form, and do to some condition, I
> >> redirect
> >> > to the user to another page.  My problem seems to be the
> >> > Wicket.Ajax.invokePreCallHandlers() gets called on the doPost() method
> in
> >> > the wicket-ajax.js and the busy indicator continuously shows on the
> next
> >> > page.
> >> >
> >> > Any ideas how to resolve this issue?
> >> >
> >>
> >> -
> >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> >> For additional commands, e-mail: users-h...@wicket.apache.org
> >>
> >>
> >
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Spring annotations fail to inject into webmodels

2009-09-11 Thread pieter claassen
I am using maven, spring 2.5.6, wicket 1.4 and am trying to inject my DAO's
into my wicket models but I find that Spring just ignores my advice.

My question:
1. @SpringBean only works on stuff that inherits from Component. What do I
do with things like session and models that don't? I am trying to use
@Configurable but that is being ignored.
2. My POM deps are below. What should I pull in to have @Configurable
working?
3. BTW. When I comment the bean out of my XML config, then I do get an error
so I am not sure if I am doing something very small wrong?

Thanks.
Pieter

pom.xml
===
...
   
org.springframework
spring-core
${spring.version}



org.apache.wicket
wicket-spring
${wicket.version}
  
  

  org.springframework
  spring

  




TemplateWebModel.java
==
.
@Configurable
public class TemplateWebModel extends AbstractDataSetWebModel {

private TemplateFactory templateFactory;

public TemplateFactory getTemplateFactory() {
return templateFactory;
}

public void setTemplateFactory(TemplateFactory templateFactory) {
   throw new RuntimeException("REACHED TEMPLATE FACTORY SET"); //This
setter is never run
//this.templateFactory = templateFactory;
}
.

WicketApplicationDefinitition.xml
==


http://www.springframework.org/schema/beans";
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
   xmlns:context="http://www.springframework.org/schema/context";
   xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-2.5.xsd";>

















.









-- 
Pieter Claassen
musmato.com


Re: inMethod DataGrid row values

2009-09-11 Thread Matej Knopp
onCellClicked gets the row model object as argument. Call
model.getObject() to get the actual object.

-Matej

On Fri, Sep 11, 2009 at 9:32 AM, Oliver-Sven Fritsch wrote:
> Hi group!
>
> I want to open a ModalPanel with detailed information when the user clicks
> on a row in my DataGrid. To do so I override the onCellClicked method. My
> problem is that I don't know how to get the rowdata. No matter which
> approach I try all I see is that I can get the information for the column
> which wont help in my use case. I think this is a very common task (getting
> rowdata i.e. primary key or so).
>
> Any ideas would be really appreciated!
>
> Oliver
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>

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



inMethod DataGrid row values

2009-09-11 Thread Oliver-Sven Fritsch

Hi group!

I want to open a ModalPanel with detailed information when the user 
clicks on a row in my DataGrid. To do so I override the onCellClicked 
method. My problem is that I don't know how to get the rowdata. No 
matter which approach I try all I see is that I can get the information 
for the column which wont help in my use case. I think this is a very 
common task (getting rowdata i.e. primary key or so).


Any ideas would be really appreciated!

Oliver

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



Re: Ajax Redirect with Busy Indicator

2009-09-11 Thread Martin Makundi
Already done, if you look carefully :)

**
Martin

2009/9/11 Ernesto Reinaldo Barreiro :
> Why not add this as a "variation" to the WIKI page [1] you have created?
> Ernesto
>
> [1]-
> http://cwiki.apache.org/WICKET/generic-busy-indicator-for-both-ajax-and-non-ajax-submits.html
>
> 
>
> On Fri, Sep 11, 2009 at 7:57 AM, Martin Makundi <
> martin.maku...@koodaripalvelut.com> wrote:
>
>> Hi!
>>
>> Well.. you need to find out what is the cause.
>>
>> For example, if you redirect to external pages, you must skip the busy
>> indicator. This means that you might have to use some clue in your
>> button or link to omit the busy indicator.
>>
>> Here is some example code that we use:
>>
>>    if ((clickedElement.tagName.toUpperCase() == 'A'
>>          && ((clickedElement.target == null) ||
>> (clickedElement.target.length <= 0))
>>          && (clickedElement.href.lastIndexOf('#') !=
>> (clickedElement.href.length-1))
>>          && (!('nobusy' in clickedElement))
>>          && (clickedElement.href.indexOf('skype') < 0)
>>          && (clickedElement.href.indexOf('mailto') < 0)
>>          && (clickedElement.href.indexOf('WicketAjaxDebug') < 0)
>>          && (clickedElement.href.lastIndexOf('.doc') !=
>> (clickedElement.href.length-4))
>>          && (clickedElement.href.lastIndexOf('.csv') !=
>> (clickedElement.href.length-4))
>>          && (clickedElement.href.lastIndexOf('.xls') !=
>> (clickedElement.href.length-4))
>>          && ((clickedElement.onclick == null) ||
>> (clickedElement.onclick.toString().indexOf('window.open') <= 0))
>>          )
>>      || (clickedElement.parentNode.tagName.toUpperCase() == 'A'
>>          && ((clickedElement.parentNode.target == null) ||
>> (clickedElement.parentNode.target.length <= 0))
>>          && (clickedElement.parentNode.href.indexOf('skype') < 0)
>>          && (clickedElement.parentNode.href.indexOf('mailto') < 0)
>>          && (clickedElement.parentNode.href.lastIndexOf('#') !=
>> (clickedElement.parentNode.href.length-1))
>>          && (clickedElement.parentNode.href.lastIndexOf('.doc') !=
>> (clickedElement.parentNode.href.length-4))
>>          && (clickedElement.parentNode.href.lastIndexOf('.csv') !=
>> (clickedElement.parentNode.href.length-4))
>>          && (clickedElement.parentNode.href.lastIndexOf('.xls') !=
>> (clickedElement.parentNode.href.length-4))
>>          && ((clickedElement.parentNode.onclick == null) ||
>> (clickedElement.parentNode.onclick.toString().indexOf('window.open')
>> <= 0))
>>          )
>>      || (
>>         ((clickedElement.onclick == null)
>>           ||
>>           ((clickedElement.onclick.toString().indexOf('confirm') <= 0)
>>            && (clickedElement.onclick.toString().indexOf('alert') <= 0)
>>            && (clickedElement.onclick.toString().indexOf('Wicket.Palette')
>> <= 0)))
>>         && (clickedElement.tagName.toUpperCase() == 'INPUT' &&
>> (clickedElement.type.toUpperCase() == 'BUTTON'
>>              || clickedElement.type.toUpperCase() == 'SUBMIT' ||
>> clickedElement.type.toUpperCase() == 'IMAGE'))
>>         )
>>      ) {
>>      showBusysign();
>>    }
>>
>>
>> **
>> Martin
>>
>> 2009/9/11 Robert McGuinness :
>> > I applied the busy indicator techniques found here:
>> >
>> http://cwiki.apache.org/WICKET/generic-busy-indicator-for-both-ajax-and-non-ajax-submits.htmlas
>> > a site wide implementation.
>> >
>> > I am using an ajax to submit the form, and do to some condition, I
>> redirect
>> > to the user to another page.  My problem seems to be the
>> > Wicket.Ajax.invokePreCallHandlers() gets called on the doPost() method in
>> > the wicket-ajax.js and the busy indicator continuously shows on the next
>> > page.
>> >
>> > Any ideas how to resolve this issue?
>> >
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
>>
>

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



Re: Ajax Redirect with Busy Indicator

2009-09-11 Thread Ernesto Reinaldo Barreiro
Why not add this as a "variation" to the WIKI page [1] you have created?
Ernesto

[1]-
http://cwiki.apache.org/WICKET/generic-busy-indicator-for-both-ajax-and-non-ajax-submits.html



On Fri, Sep 11, 2009 at 7:57 AM, Martin Makundi <
martin.maku...@koodaripalvelut.com> wrote:

> Hi!
>
> Well.. you need to find out what is the cause.
>
> For example, if you redirect to external pages, you must skip the busy
> indicator. This means that you might have to use some clue in your
> button or link to omit the busy indicator.
>
> Here is some example code that we use:
>
>if ((clickedElement.tagName.toUpperCase() == 'A'
>  && ((clickedElement.target == null) ||
> (clickedElement.target.length <= 0))
>  && (clickedElement.href.lastIndexOf('#') !=
> (clickedElement.href.length-1))
>  && (!('nobusy' in clickedElement))
>  && (clickedElement.href.indexOf('skype') < 0)
>  && (clickedElement.href.indexOf('mailto') < 0)
>  && (clickedElement.href.indexOf('WicketAjaxDebug') < 0)
>  && (clickedElement.href.lastIndexOf('.doc') !=
> (clickedElement.href.length-4))
>  && (clickedElement.href.lastIndexOf('.csv') !=
> (clickedElement.href.length-4))
>  && (clickedElement.href.lastIndexOf('.xls') !=
> (clickedElement.href.length-4))
>  && ((clickedElement.onclick == null) ||
> (clickedElement.onclick.toString().indexOf('window.open') <= 0))
>  )
>  || (clickedElement.parentNode.tagName.toUpperCase() == 'A'
>  && ((clickedElement.parentNode.target == null) ||
> (clickedElement.parentNode.target.length <= 0))
>  && (clickedElement.parentNode.href.indexOf('skype') < 0)
>  && (clickedElement.parentNode.href.indexOf('mailto') < 0)
>  && (clickedElement.parentNode.href.lastIndexOf('#') !=
> (clickedElement.parentNode.href.length-1))
>  && (clickedElement.parentNode.href.lastIndexOf('.doc') !=
> (clickedElement.parentNode.href.length-4))
>  && (clickedElement.parentNode.href.lastIndexOf('.csv') !=
> (clickedElement.parentNode.href.length-4))
>  && (clickedElement.parentNode.href.lastIndexOf('.xls') !=
> (clickedElement.parentNode.href.length-4))
>  && ((clickedElement.parentNode.onclick == null) ||
> (clickedElement.parentNode.onclick.toString().indexOf('window.open')
> <= 0))
>  )
>  || (
> ((clickedElement.onclick == null)
>   ||
>   ((clickedElement.onclick.toString().indexOf('confirm') <= 0)
>&& (clickedElement.onclick.toString().indexOf('alert') <= 0)
>&& (clickedElement.onclick.toString().indexOf('Wicket.Palette')
> <= 0)))
> && (clickedElement.tagName.toUpperCase() == 'INPUT' &&
> (clickedElement.type.toUpperCase() == 'BUTTON'
>  || clickedElement.type.toUpperCase() == 'SUBMIT' ||
> clickedElement.type.toUpperCase() == 'IMAGE'))
> )
>  ) {
>  showBusysign();
>}
>
>
> **
> Martin
>
> 2009/9/11 Robert McGuinness :
> > I applied the busy indicator techniques found here:
> >
> http://cwiki.apache.org/WICKET/generic-busy-indicator-for-both-ajax-and-non-ajax-submits.htmlas
> > a site wide implementation.
> >
> > I am using an ajax to submit the form, and do to some condition, I
> redirect
> > to the user to another page.  My problem seems to be the
> > Wicket.Ajax.invokePreCallHandlers() gets called on the doPost() method in
> > the wicket-ajax.js and the busy indicator continuously shows on the next
> > page.
> >
> > Any ideas how to resolve this issue?
> >
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: Ajax Redirect with Busy Indicator

2009-09-11 Thread Ernesto Reinaldo Barreiro
Yes, you are right!

Best,

Ernesto

On Fri, Sep 11, 2009 at 8:59 AM, Martin Makundi <
martin.maku...@koodaripalvelut.com> wrote:

> > Why not include a script containing hideBusysign() On the page you are
> > navigating to? Y
>
> If it is external page you cannot... say a link to outlook or hiihuu..
>
> **
> Martin
>
> >
> > On Fri, Sep 11, 2009 at 7:50 AM, Robert McGuinness <
> > robert.mcguinness@gmail.com> wrote:
> >
> >> I applied the busy indicator techniques found here:
> >>
> >>
> http://cwiki.apache.org/WICKET/generic-busy-indicator-for-both-ajax-and-non-ajax-submits.htmlas
> >> a site wide implementation.
> >>
> >> I am using an ajax to submit the form, and do to some condition, I
> redirect
> >> to the user to another page.  My problem seems to be the
> >> Wicket.Ajax.invokePreCallHandlers() gets called on the doPost() method
> in
> >> the wicket-ajax.js and the busy indicator continuously shows on the next
> >> page.
> >>
> >> Any ideas how to resolve this issue?
> >>
> >
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>