Re: FormComponentPanel's components onblur can't call validate?

2010-03-09 Thread Igor Vaynberg
the behavior is attached to the child form component, why would it
call validate on the parent? you will have to do that yourself.

-igor

On Tue, Mar 9, 2010 at 3:52 PM, Tony Wu  wrote:
> I have a FormComponentPanel which holds 3 dropdowns for month-day-year (it's
> a birthday FormComponentPanel). I override convertInput on the
> FormComponentPanel to return the age based on the 3 drop downs. I have an
> age validator which makes sure they're over 18.
>
> Now, this all works fine on form submit (convertInput gets called and it
> runs the validator).
>
> But when I try to do it dynamically by attaching a onchange
> AjaxFormUpdatingBehavior event to the 3 drop downs to call
> FormComponentPanel.validate() (@Override onUpdate, and only when all 3 drop
> downs are selected of course), I know the onchange triggers (because it's
> @Override onUpdate runs - had a system.out.println which runs), but the
> validate() function doesn't run the age validator. It actually *never even
> calls convertInput* on the FormComponentPanel. Any ideas?
>

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



Re: Palette filtering available list

2010-03-09 Thread Igor Vaynberg
use a detachable model for the options collection

-igor

On Tue, Mar 9, 2010 at 12:21 PM, Jeffrey Schneller
 wrote:
> How can I filter the available list in a palette?  I have a dropdown to
> specify the filter and I can retrieve the filtered list from my data
> access.  How do I set the available list in the palette to be my new
> filtered list?
>
>
>
> Here is my code for creating the palette and also the filter button that
> is going to do the filtering.  I can get the definedChoices.  The
> problem I am having is what needs to go between the comments.
>
>
>
> Thanks for any help.
>
>
>
> List definedChoices = dao.findItems();
>
>                IChoiceRenderer renderer = new
> ItemChoiceRenderer("name", "value");
>
>                final Palette palette = new Palette("values", new
> Model((Serializable)definedChoices), renderer, 10, true);
>
>                palette.setMarkupId("values");
>
>                palette.setOutputMarkupId(true);
>
>                 palette.setOutputMarkupPlaceholderTag(true);
>
>                 add(palette);
>
>
>
>                AjaxButton filterButton = new AjaxButton("filter") {
>
>                               �...@override
>
>                                protected void
> onSubmit(AjaxRequestTarget target, Form form) {
>
>                                                String product =
> productDropDown.getValue();
>
>                                                String type =
> typeDropDown.getValue();
>
>
>
>                                                List
> definedChoices = dao.findItemsByFilter(product, type);
>
>                                                 //
> **
>
>                                                // HOW DO I SET THE
> AVAILABLE LIST FOR THE PALETTE???
>
>                                                //
> ***
>
>
> target.addComponent(palette);
>
>                                }
>
>                };
>
>                filterButton.setDefaultFormProcessing(false);
>
>                add(filterButton);
>
>

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



Re: Form validation without a form component

2010-03-09 Thread scotthendo

Hi Antoine,

I am doing something similar and was wondering if you could help. I am
trying to validate a large form by overriding the onValidate method but when
I do, all the form values are null.

Some code snippets:

public final class DatasetForm extends Form
{
private final DatasetTO dataset = new DatasetTO();

public DatasetForm(final String componentName)
{
super(componentName);

add(new TextField("orgName", new PropertyModel(dataset,
"orgName")));

   }

public final void onSubmit()
{
  System.out.println(dataset.getOrgName()); // this works fine
and displays the value
}


 public final void onValidate()
{
   System.out.println(dataset.getOrgName()); // here it is set to
null
 } 
}

So how can i access the form values from onValidate()

Thanks in advance, scott.


Antoine van Wel wrote:
> 
> for the archive-searchers :)
> 
> simply override onValidate in the Form class, check your listsize
> there & call error() when applicable
> 
> 
> Antoine
> 
> On Fri, Apr 3, 2009 at 12:25 PM, triswork  wrote:
>>
>> Thanks for the suggestion Martijn.
>> I tried return new FormComponent[0]; and got exactly the same error.
>>
>> I think my use-case is quite fringe, so I have resigned myself to using
>> the
>> hidden field that you previously suggested.
>>
>>  - Tristan
>>
>>
>> Martijn Dashorst wrote:
>>>
>>> You might try to return an empty array..
>>>
>>> Martijn
>>>
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Form-validation-without-a-form-component-tp22682572p22866535.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://old.nabble.com/Form-validation-without-a-form-component-tp22682572p27845370.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 allow multiple Spring context files?

2010-03-09 Thread Anantha Kumaran
i am also splitting the config files into many files and i have no problems
yet.


 










perhaps you might follow different method

On Tue, Mar 9, 2010 at 7:01 PM, David Chang  wrote:

> When I did my Spring web applications, I split Spring context files into a
> few smaller ones (example: one for web beans, one for DAO beans, one for
> Service beans, etc).
>
> I would like to follow the same approach in my Wicket application, but I
> notice a few odd things:
>
> 1. The order of these Context files in web.xml plays a role. If not right,
> Tomcat will not start and report wicket "WebApplication" cannot be found.
>
> 2. Service beans specified through the following:
>
> @SpringBean
> private SupportService supportService;
>
> result in runtime error that the bean of type SuppportService cannot be
> found if a service bean is specified in a different context file other than
> that of wicket "WebApplication".
>
> Any of you had similar experience. Any fix?
>
> Regards.
>
>
>
>
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


-- 

Anantha Kumaran(http://ananthakumaran.github.com)


Wicket allow multiple Spring context files?

2010-03-09 Thread David Chang
When I did my Spring web applications, I split Spring context files into a few 
smaller ones (example: one for web beans, one for DAO beans, one for Service 
beans, etc). 

I would like to follow the same approach in my Wicket application, but I notice 
a few odd things:

1. The order of these Context files in web.xml plays a role. If not right, 
Tomcat will not start and report wicket "WebApplication" cannot be found.

2. Service beans specified through the following:

@SpringBean
private SupportService supportService;

result in runtime error that the bean of type SuppportService cannot be found 
if a service bean is specified in a different context file other than that of 
wicket "WebApplication".

Any of you had similar experience. Any fix?

Regards.




  

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



FormComponentPanel's components onblur can't call validate?

2010-03-09 Thread Tony Wu
I have a FormComponentPanel which holds 3 dropdowns for month-day-year (it's
a birthday FormComponentPanel). I override convertInput on the
FormComponentPanel to return the age based on the 3 drop downs. I have an
age validator which makes sure they're over 18.

Now, this all works fine on form submit (convertInput gets called and it
runs the validator).

But when I try to do it dynamically by attaching a onchange
AjaxFormUpdatingBehavior event to the 3 drop downs to call
FormComponentPanel.validate() (@Override onUpdate, and only when all 3 drop
downs are selected of course), I know the onchange triggers (because it's
@Override onUpdate runs - had a system.out.println which runs), but the
validate() function doesn't run the age validator. It actually *never even
calls convertInput* on the FormComponentPanel. Any ideas?


Re: wiQuery components with server side state - live demo

2010-03-09 Thread Cemal Bayramoglu
http://labs.jweekend.com/public/grid/GridRowExpanderPage

On 3 March 2010 18:20, John Armstrong  wrote:
> Hi Richard,
>
>  See here: http://www.extjs.com/examples/explorer.html#gridplugins
>
> In this case its a
> grid rather then a tree that expands and allows arbitrary components to be
> inserted beneath the row.
>
> Similar to a tree but very grid specific.
>
> Very excited about your work, so many hoops too jump through with GWT..
> J
>
> On Wed, Mar 3, 2010 at 10:17 AM, Richard Wilkinson <
> richard.wilkin...@jweekend.com> wrote:
>
>> Hi,
>>
>> John - im not to sure what you mean by row expanders, is that similar
>> to what is provided on the tree grid?
>>
>> Ernesto - see comments inline:
>>
>>
>> On 3 March 2010 12:59, Ernesto Reinaldo Barreiro 
>> wrote:
>> > Hi Cemal,
>> >
>> > Other things that might be useful:
>> >
>> > -Offer (pluggable) support for grid events at client and server side
>> (e.g.
>> > been notified when user navigates between pages, sorts a columns, etc).
>> By
>> > pluggable I mean they can be enable if you need them so that no
>> unnecessary
>> > server round trips are made.
>>
>> The gird always has to make a request to the server when the user
>> navigates between pages, or changes the sorting, since this requires
>> updated data.  However these events are handled internally to the grid
>> code and are not accessible to the developer.  If required we could
>> make these events accessible to the developer, either through adding a
>> behaviour, or overriding a method.  Other things such as selection
>> notification events, or editing, can optionally be listened to by the
>> developer, but these do not make a round trip to the server unless
>> they are explicitly added.
>>
>> > -Show an example of how the grid interacts with a normal wicket form.
>> E.g.
>> > have a form the is submitted via Wicket AJAX and get the grid refreshed
>> > either via Wicket AJAX (i.e. the whole grid component is reloaded) or
>> > triggering a reload event on the grid (I see the master detail example is
>> > built using this last approach?) .
>>
>> yes, this page (http://labs.jweekend.com/public/gridjpa/ProjectEditPage)
>> uses a wicket form (not automatically generated though) to edit a row
>> in one grid, which then triggers a data refresh in both grids, but
>> does not do a wicket ajax component replace.  However ajax component
>> replace is supported as there is an AjaxRequestTarget, but I feel that
>> forcing the grid to reload is cleaner.
>>
>> > -All the examples seem to use JSON for data transfer? Is XML supported?
>>
>> The grid uses JSON, however this is all internal and transparent to
>> the developer using the grid, so I dont see how supporting XML would
>> be a benefit.  It is not possible to construct JSON or XML and feed
>> this into the grid manually, i.e. by telling the grid which url to
>> use.
>>
>> The intended use is the same as with a Wicket DataTable, where an
>> IDataProvider provides an iterator of beans which are rendered as rows
>> in the grid.  We use Wicket IConverter to convert each field of the
>> bean to a String, then use a JSON library to construct the JSON
>> response, which is then used in a custom wicket IRequestTarget for
>> JSON.
>>
>> >
>> > Best,
>> >
>> > Ernesto
>> >
>> > On Wed, Mar 3, 2010 at 11:33 AM, Cemal Bayramoglu <
>> > jweekend_for...@cabouge.com> wrote:
>> >
>>
>>
>>
>> --
>> Regards - Richard Wilkinson
>> Developer,
>> jWeekend: OO & Java Technologies - Development and Training
>> http://jWeekend.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



London Wicket - short notice?

2010-03-09 Thread Cemal Bayramoglu
A couple of friends, who coincidently tend to say nice, sensible stuff
about Wicket, will be here for QConn, for a few days this week.
If you happen to be close to central London tomorrow evening
(Wednesday, GMT), join us for a little London Wicket Drink [1], and we
can also discuss our next "formal" London Wicket Event [2] that we
have now approved budget for and have started planning.

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

[1] 19:00 at 
http://maps.google.co.uk/places/gb/london/whitehall/16/-lord-moon-of-the-mall?hl=en
[2] http://code.google.com/p/londonwicket/

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



RE: Nested Forms and Multipart Fileupload Issue

2010-03-09 Thread Corbin, James
My submit action is on the modal popup which does NOT contain a FileUpload 
Field, but the form the modal is launched from does have a FileUpload field.

So, we have a page with a button added to a form that pops up a modal dialog 
that also defines a form.  This modal popup has a Submit button that does so 
via Ajax (e.g., AjaxButton).

Once we click the ajax submit button, we get the error below.


-Original Message-
From: James Carman [mailto:jcar...@carmanconsulting.com] 
Sent: Tuesday, March 09, 2010 2:30 PM
To: users@wicket.apache.org
Subject: Re: Nested Forms and Multipart Fileupload Issue

You're trying to submit a form via ajax to upload a file?

On Tue, Mar 9, 2010 at 4:26 PM, Corbin, James  wrote:
> This issue seems to pop up in our environment from time to time and trying to 
> figure out how to fix it once and for all.
>
> We have a page with a form that pops up modal window with a form specified as 
> well.
>
> When we try to submit, we get the following exception:
>
> java.lang.IllegalStateException: ServletRequest does not contain multipart 
> content. One possible solution is to explicitly call Form.setMultipart(true), 
> Wicket tries its best to auto-detect multipart forms but there are certain 
> situation where it cannot.
> at 
> org.apache.wicket.protocol.http.servlet.MultipartServletWebRequest.(MultipartServletWebRequest.java:113)
> at 
> org.apache.wicket.protocol.http.servlet.MultipartServletWebRequest.(MultipartServletWebRequest.java:83)
> at 
> org.apache.wicket.protocol.http.servlet.ServletWebRequest.newMultipartWebRequest(ServletWebRequest.java:500)
> at org.apache.wicket.markup.html.form.Form.handleMultiPart(Form.java:1668)
> at org.apache.wicket.markup.html.form.Form.onFormSubmitted(Form.java:862)
> at 
> org.apache.wicket.ajax.form.AjaxFormSubmitBehavior.onEvent(AjaxFormSubmitBehavior.java:135)
> at 
> org.apache.wicket.ajax.AjaxEventBehavior.respond(AjaxEventBehavior.java:177)
> ...
>
> Setting Form.setMultipart(true) on either form has no affect.
>
> We are running Wicket Version 1.4.7.
>
> Is there a fix for this issue?
>
> Is this JIRA Issue related??? 
> https://issues.apache.org/jira/browse/WICKET-2749
>
>
>

-
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: Nested Forms and Multipart Fileupload Issue

2010-03-09 Thread James Carman
You're trying to submit a form via ajax to upload a file?

On Tue, Mar 9, 2010 at 4:26 PM, Corbin, James  wrote:
> This issue seems to pop up in our environment from time to time and trying to 
> figure out how to fix it once and for all.
>
> We have a page with a form that pops up modal window with a form specified as 
> well.
>
> When we try to submit, we get the following exception:
>
> java.lang.IllegalStateException: ServletRequest does not contain multipart 
> content. One possible solution is to explicitly call Form.setMultipart(true), 
> Wicket tries its best to auto-detect multipart forms but there are certain 
> situation where it cannot.
> at 
> org.apache.wicket.protocol.http.servlet.MultipartServletWebRequest.(MultipartServletWebRequest.java:113)
> at 
> org.apache.wicket.protocol.http.servlet.MultipartServletWebRequest.(MultipartServletWebRequest.java:83)
> at 
> org.apache.wicket.protocol.http.servlet.ServletWebRequest.newMultipartWebRequest(ServletWebRequest.java:500)
> at org.apache.wicket.markup.html.form.Form.handleMultiPart(Form.java:1668)
> at org.apache.wicket.markup.html.form.Form.onFormSubmitted(Form.java:862)
> at 
> org.apache.wicket.ajax.form.AjaxFormSubmitBehavior.onEvent(AjaxFormSubmitBehavior.java:135)
> at 
> org.apache.wicket.ajax.AjaxEventBehavior.respond(AjaxEventBehavior.java:177)
> ...
>
> Setting Form.setMultipart(true) on either form has no affect.
>
> We are running Wicket Version 1.4.7.
>
> Is there a fix for this issue?
>
> Is this JIRA Issue related??? 
> https://issues.apache.org/jira/browse/WICKET-2749
>
>
>

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



Nested Forms and Multipart Fileupload Issue

2010-03-09 Thread Corbin, James
This issue seems to pop up in our environment from time to time and trying to 
figure out how to fix it once and for all.

We have a page with a form that pops up modal window with a form specified as 
well.

When we try to submit, we get the following exception:

java.lang.IllegalStateException: ServletRequest does not contain multipart 
content. One possible solution is to explicitly call Form.setMultipart(true), 
Wicket tries its best to auto-detect multipart forms but there are certain 
situation where it cannot.
at 
org.apache.wicket.protocol.http.servlet.MultipartServletWebRequest.(MultipartServletWebRequest.java:113)
at 
org.apache.wicket.protocol.http.servlet.MultipartServletWebRequest.(MultipartServletWebRequest.java:83)
at 
org.apache.wicket.protocol.http.servlet.ServletWebRequest.newMultipartWebRequest(ServletWebRequest.java:500)
at org.apache.wicket.markup.html.form.Form.handleMultiPart(Form.java:1668)
at org.apache.wicket.markup.html.form.Form.onFormSubmitted(Form.java:862)
at 
org.apache.wicket.ajax.form.AjaxFormSubmitBehavior.onEvent(AjaxFormSubmitBehavior.java:135)
at org.apache.wicket.ajax.AjaxEventBehavior.respond(AjaxEventBehavior.java:177)
...

Setting Form.setMultipart(true) on either form has no affect.

We are running Wicket Version 1.4.7.

Is there a fix for this issue?

Is this JIRA Issue related??? https://issues.apache.org/jira/browse/WICKET-2749




Palette filtering available list

2010-03-09 Thread Jeffrey Schneller
How can I filter the available list in a palette?  I have a dropdown to
specify the filter and I can retrieve the filtered list from my data
access.  How do I set the available list in the palette to be my new
filtered list?

 

Here is my code for creating the palette and also the filter button that
is going to do the filtering.  I can get the definedChoices.  The
problem I am having is what needs to go between the comments.

 

Thanks for any help.

 

List definedChoices = dao.findItems();

IChoiceRenderer renderer = new
ItemChoiceRenderer("name", "value");

final Palette palette = new Palette("values", new
Model((Serializable)definedChoices), renderer, 10, true);

palette.setMarkupId("values");

palette.setOutputMarkupId(true);

 palette.setOutputMarkupPlaceholderTag(true);

 add(palette);

 

AjaxButton filterButton = new AjaxButton("filter") {

@Override

protected void
onSubmit(AjaxRequestTarget target, Form form) {

String product =
productDropDown.getValue();

String type =
typeDropDown.getValue();



List
definedChoices = dao.findItemsByFilter(product, type);

 //
**

// HOW DO I SET THE
AVAILABLE LIST FOR THE PALETTE???   

//
***

 
target.addComponent(palette);

}

};

filterButton.setDefaultFormProcessing(false);

add(filterButton);



Re: Wicket Session Management

2010-03-09 Thread Nishant Neeraj
Ok, I got the answer.

"Wicket tries to be as stateless as long as possible, I believe it takes
some hints from how your pages are built to know if it needs to keep a
Session around for longer than a Request." [1]

[1] http://basementcoders.com/?p=65&cpage=1

Thanks
Nishant

On Tue, Mar 9, 2010 at 11:53 PM, Nishant Neeraj <
nishant.has.a.quest...@gmail.com> wrote:

> Hi,
>
> I have a registration system where, when you request for registration, you
> are mailed a URL with unique-key as parameter. When user clicks the link, he
> lands on a page where I am setting his UserVO object in session. This page
> has another BookmarkablePageLink that points to the user's profile setup
> page.
>
> Now, when the user clicks the link to profile setup page, I find that
> session object has changed... there is no UserVO, plus session's hashCode
> and session toString() value is different from the one for the previous
> page.
>
> Can anyone provide a clue? Or is it possible for a request originating from
> one page can have different session?
>
> Thanks
> Nishant
>


Re: mountBookmarkablePage issue with panels

2010-03-09 Thread Tony Wu
Thanks, the new version does fix this issue.

On Tue, Mar 9, 2010 at 8:50 AM, vineet semwal wrote:

> are you on 1.4.6, if yes please upgrade to 1.4.7 and see if the problem
> disappears.
>
> On Tue, Mar 9, 2010 at 9:16 PM, Tony Wu  wrote:
>
> > I have a Signup page that's mounted using
> > mountBookmarkablePage("/section/signup", Signup.class). On that page I
> have
> > a panel which has a button that onclick, will basically redirect to
> itself -
> > it does setResponsePage(panel.getPage().getClass()). When the button is
> > clicked it redirects me to /section/section/signup instead of
> > /section/signup.
> >
> > I've isolated the issue in that it doesn't like the mount name. If I use
> > "/section-signup" as the URL name instead (without the frontslash) it
> works
> > perfectly. Is this a bug?
> >
> > Thanks,
> > Tony
>
>
>
>
> --
> regards,
> Vineet Semwal
>


Wicket Session Management

2010-03-09 Thread Nishant Neeraj
Hi,

I have a registration system where, when you request for registration, you
are mailed a URL with unique-key as parameter. When user clicks the link, he
lands on a page where I am setting his UserVO object in session. This page
has another BookmarkablePageLink that points to the user's profile setup
page.

Now, when the user clicks the link to profile setup page, I find that
session object has changed... there is no UserVO, plus session's hashCode
and session toString() value is different from the one for the previous
page.

Can anyone provide a clue? Or is it possible for a request originating from
one page can have different session?

Thanks
Nishant


Re: disable a DropdownChoice item

2010-03-09 Thread ritu2p

Thank you ... it worked perfectly!!


Newgro wrote:
> 
> There is some code in the AbstractChoice class from which DDC is
> inheriting.
> 
>  /**
>   * Gets whether the given value is disabled. This default 
> implementation always returns false.
>   *
>   * @param object
>   *The object to check
>   * @param index
>   *The index in the choices collection this object is in.
>   * @param selected
>   *The currently selected string value
>   * @return Whether the given value represents the current selection
>   */
>  protected boolean isDisabled(final E object, int index, String 
> selected)
>  {
>  return false;
>  }
> 
> And if i check the method
> protected void appendOptionHtml(AppendingStringBuffer buffer, E choice, 
> int index,
>  String selected)
> which is called by
> protected void onComponentTagBody(final MarkupStream markupStream, final 
> ComponentTag openTag)
> which is called in rendering process
> 
> i can see that this is adding disabled = disabled if this method returns 
> true.
> 
> So you could overwrite the isDisabled method of your ddc and return true 
> for the appropriate object or index or selected.
> 
> PS: Answer is based on 1.4.2
> 
> Cheers
> Per
> 
> -
> 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://old.nabble.com/disable-a-DropdownChoice-item-tp27831690p27839560.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: jquery/qtip integration troubles - ajax post stopped

2010-03-09 Thread Antoine van Wel
Hi Richard,

Thanks for the reply. It didn't bring me further though.
When debugging, Wicket.$$(this) and the other one both return true, so
that doesn't seem to be the problem.

When tracking the evaluation of the precondition, I end up in wicket-event.js

25 if (Function.prototype.bind == null) {
26 Function.prototype.bind = function(object) {
27 var __method = this;
28 return function() {
29 return __method.apply(object, arguments);
30 }
31 }
32}

where line 29 will return false.
Does that ring any bells?


By the way, in the code I copied-and-pasted in my previous email, two
lines were not included which needs to be there:
setOutputMarkupId(true) on parent & content components.


Antoine

On Tue, Mar 9, 2010 at 4:37 PM, Richard Wilkinson
 wrote:
> Hi,
>
> 'Ajax POST stopped because of precondition check' is probably your
> problem.  all wicket ajax can have a precondition, which is basically
> a function that returns true or false, and will only execute the ajax
> if it returns true.  I expect that for some reason in your case this
> function is returning false.
>
> for an AjaxButton (well AjaxFormSubmitBehavior) the precondition is
> this: "return Wicket.$$(this)&&Wicket.$$('" + getForm().getMarkupId()
> + "')";
>
> in the wicket ajax javascript file i see this:
>
> // returns if the element belongs to current document
> // if the argument is not element, function returns true
> Wicket.$$ = function(element) {
> ...
> }
>
> This must be failing for you, which I presume has something to do with
> how you are passing the content into the qtip;
>
> content: $('#" + contentMarkupId + "').html()
>
> Hope that helps.
>
> --
> Regards - Richard Wilkinson
> Developer,
> jWeekend: OO & Java Technologies - Development and Training
> http://jWeekend.com
>
>
> On 9 March 2010 13:05, Antoine van Wel  wrote:
>> Hi everybody,
>>
>> Integrating a Jquery tooltip (qtip) went smoothly until I tried to do
>> an Ajax form submit.
>> The Wicket Ajax Debug panel shows an "Ajax POST stopped because of
>> precondition check", so an Ajax response is never sent.
>>
>> What I'm doing is simply render the text for the tooltip on the same
>> page in a hidden div, then pointing the content of the tooltip to that
>> div.
>>
>> the html:
>>
>> 
>>        
>>        > src="/js/jquery.qtip-1.0.0-rc3.min.js">
>> 
>>
>> 
>>        
>>                
>>                        
>>                
>>        
>>
>>        hover over me
>> 
>>
>> the page class:
>>
>> public class JQueryTestPage extends BasePage {
>>        public JQueryTestPage() {
>>                WebMarkupContainer content = new 
>> WebMarkupContainer("content");
>>                add(content);
>>
>>                Form form = new Form("form");
>>                content.add(form);
>>                form.add(new AjaxButton("clickme") {
>>                       �...@override
>>                        protected void onSubmit(AjaxRequestTarget target, 
>> Form form) {
>>                                System.out.println("testing");
>>                        }
>>
>>                });
>>
>>                WebMarkupContainer qtip = new WebMarkupContainer("tipme");
>>                add(qtip);
>>                qtip.add(new QTipBehavior(qtip, content));
>>        }
>>
>> }
>>
>>
>> and finally the QTipBehavior:
>>
>> public class QTipBehavior extends AbstractBehavior {
>>        private String componentMarkupId;
>>        private String contentMarkupId;
>>
>>        public QTipBehavior(Component parent, Component content) {
>>                contentMarkupId = content.getMarkupId();
>>                componentMarkupId = parent.getMarkupId();
>>        }
>>
>>       �...@override
>>        public void renderHead(IHeaderResponse response) {
>>                String javascript = new StringBuilder()
>>                        .append("$(function() {")
>>                        .append("       $('#" + componentMarkupId + 
>> "').qtip({")
>>                        .append("               content: $('#" + 
>> contentMarkupId + "').html(),")
>>                        .append("               hide: { fixed: true },")
>>                        .append("               position: { corner: { target: 
>> 'topRight', tooltip:
>> 'leftTop' } },")
>>                        .append("       })")
>>                        .append("});")
>>                        .toString();
>>                response.renderOnDomReadyJavascript(javascript);
>>        }
>> }
>>
>>
>> All pretty straightforward.
>>
>> So my guess is somehow Wicket is not happy about the redirection I
>> created by not using the rendered button directly.
>> I've been trying to debug this using Firebug, obviously without success.
>>
>> Does anybody have any hints how to solve this? Is the approach I'm
>> taking flawed? Maybe jWicket or wiQuery could help here?
>>
>>
>>
>> Antoine
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional

Re: Form.setMultiPart(true) and setResponsePage(...) in Wicket 1.4.7

2010-03-09 Thread Igor Vaynberg
open a bug, attach a quickstart

-igor

On Tue, Mar 9, 2010 at 2:53 AM, t3_chris  wrote:
>
> Additonal Information:
> setRepsonsePage(...) in the above described scenario works perfectly fine in
> wicket-1.4.6
> It seems to be broken again in 1.4.7
>
> Best Regards,
>  chris
> --
> View this message in context: 
> http://old.nabble.com/Form.setMultiPart%28true%29-and-setResponsePage%28...%29-in-Wicket-1.4.7-tp27833928p27834085.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>

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



Re: Avoiding wickety URLs in login form

2010-03-09 Thread Neil Curzon
Hi Vineet,

Thanks for your reply. I tried changing our mount for our login page from:

mountBookmarkablePage("/login", Login.class);
to
mount(new HybridUrlCodingStrategy("/login", Login.class));

but this had no effect on the URL generated for the action of the login form
(which is on the Login.class page). It seems that these strategies deal more
with how parameters for the page get put on the URL bar, not how
componentIds etc are put in links on that page. Or am I doing something
wrong?

Thanks,
Neil

On Tue, Mar 9, 2010 at 10:47 AM, vineet semwal
wrote:

> please try hybridurlcodingstrategy or mixedparamshybridurlcodingstrategy
> and
> see if it fits your need,
>
>
> On Tue, Mar 9, 2010 at 9:07 PM, Neil Curzon  wrote:
>
> > Hi, users,
> >
> > We're trying to avoid wicket specific stuff showing up in our URL bar.
> The
> > client thinks that when the URL looks something like this:
> > login/wicket:interface/:2:componentId:loginForm::IFormSubmitListener:: ,
> it
> > kinda sucks and looks unprofessional. I find it hard to disagree.. I'd
> > rather have the URL look prettier.
> >
> > For most of the pages this has been no problem for us, we mount
> > bookmarkable
> > URLs for them and all is great.
> >
> > However, for the login page, we've been through several iterations:
> >
> > 1. We did the login form by AJAX, using an AjaxSubmitLink. This meant
> that
> > the wicket-specific URL was still in the html source, but was invisible
> to
> > the user. Issue: despite the fact that it's in a stateless form, AJAX in
> > wicket seems to be stateful no matter what. This meant that the login
> page
> > could expire, which was no good.
> >
> > 2. I changed the AjaxSubmitLink to a SubmitLink. This succeeded in making
> > our login stateless. However, the wickety URL that was hidden in the AJAX
> > request now became visible to the user on a login failure.
> >
> > 3. I tried setting up the CryptedUrlWebRequestCodingStrategy. This
> > successfully managed to encrypt the resulting wicket specific URL to
> > ?x=a325u0234usdajfasdf, but the thing is, the login page now started
> > expiring again. The reason is that CryptedUrlWebRequestCodingStrategy
> uses
> > a
> > key stored in the session, which has the effect of making all stateless
> > links stateful again.
> >
> > Does anybody have a good way for a stateless login form that doesn't show
> > wickety stuff in the URL bar? Thanks in advance for any help.
> >
> > Neil
> >
>
>
>
> --
> regards,
> Vineet Semwal
>


Re: mountBookmarkablePage issue with panels

2010-03-09 Thread vineet semwal
are you on 1.4.6, if yes please upgrade to 1.4.7 and see if the problem
disappears.

On Tue, Mar 9, 2010 at 9:16 PM, Tony Wu  wrote:

> I have a Signup page that's mounted using
> mountBookmarkablePage("/section/signup", Signup.class). On that page I have
> a panel which has a button that onclick, will basically redirect to itself -
> it does setResponsePage(panel.getPage().getClass()). When the button is
> clicked it redirects me to /section/section/signup instead of
> /section/signup.
>
> I've isolated the issue in that it doesn't like the mount name. If I use
> "/section-signup" as the URL name instead (without the frontslash) it works
> perfectly. Is this a bug?
>
> Thanks,
> Tony




-- 
regards,
Vineet Semwal


Re: Avoiding wickety URLs in login form

2010-03-09 Thread vineet semwal
please try hybridurlcodingstrategy or mixedparamshybridurlcodingstrategy and
see if it fits your need,


On Tue, Mar 9, 2010 at 9:07 PM, Neil Curzon  wrote:

> Hi, users,
>
> We're trying to avoid wicket specific stuff showing up in our URL bar. The
> client thinks that when the URL looks something like this:
> login/wicket:interface/:2:componentId:loginForm::IFormSubmitListener:: , it
> kinda sucks and looks unprofessional. I find it hard to disagree.. I'd
> rather have the URL look prettier.
>
> For most of the pages this has been no problem for us, we mount
> bookmarkable
> URLs for them and all is great.
>
> However, for the login page, we've been through several iterations:
>
> 1. We did the login form by AJAX, using an AjaxSubmitLink. This meant that
> the wicket-specific URL was still in the html source, but was invisible to
> the user. Issue: despite the fact that it's in a stateless form, AJAX in
> wicket seems to be stateful no matter what. This meant that the login page
> could expire, which was no good.
>
> 2. I changed the AjaxSubmitLink to a SubmitLink. This succeeded in making
> our login stateless. However, the wickety URL that was hidden in the AJAX
> request now became visible to the user on a login failure.
>
> 3. I tried setting up the CryptedUrlWebRequestCodingStrategy. This
> successfully managed to encrypt the resulting wicket specific URL to
> ?x=a325u0234usdajfasdf, but the thing is, the login page now started
> expiring again. The reason is that CryptedUrlWebRequestCodingStrategy uses
> a
> key stored in the session, which has the effect of making all stateless
> links stateful again.
>
> Does anybody have a good way for a stateless login form that doesn't show
> wickety stuff in the URL bar? Thanks in advance for any help.
>
> Neil
>



-- 
regards,
Vineet Semwal


mountBookmarkablePage issue with panels

2010-03-09 Thread Tony Wu
I have a Signup page that's mounted using 
mountBookmarkablePage("/section/signup", Signup.class). On that page I have a 
panel which has a button that onclick, will basically redirect to itself - it 
does setResponsePage(panel.getPage().getClass()). When the button is clicked it 
redirects me to /section/section/signup instead of /section/signup.

I've isolated the issue in that it doesn't like the mount name. If I use 
"/section-signup" as the URL name instead (without the frontslash) it works 
perfectly. Is this a bug?

Thanks,
Tony

Avoiding wickety URLs in login form

2010-03-09 Thread Neil Curzon
Hi, users,

We're trying to avoid wicket specific stuff showing up in our URL bar. The
client thinks that when the URL looks something like this:
login/wicket:interface/:2:componentId:loginForm::IFormSubmitListener:: , it
kinda sucks and looks unprofessional. I find it hard to disagree.. I'd
rather have the URL look prettier.

For most of the pages this has been no problem for us, we mount bookmarkable
URLs for them and all is great.

However, for the login page, we've been through several iterations:

1. We did the login form by AJAX, using an AjaxSubmitLink. This meant that
the wicket-specific URL was still in the html source, but was invisible to
the user. Issue: despite the fact that it's in a stateless form, AJAX in
wicket seems to be stateful no matter what. This meant that the login page
could expire, which was no good.

2. I changed the AjaxSubmitLink to a SubmitLink. This succeeded in making
our login stateless. However, the wickety URL that was hidden in the AJAX
request now became visible to the user on a login failure.

3. I tried setting up the CryptedUrlWebRequestCodingStrategy. This
successfully managed to encrypt the resulting wicket specific URL to
?x=a325u0234usdajfasdf, but the thing is, the login page now started
expiring again. The reason is that CryptedUrlWebRequestCodingStrategy uses a
key stored in the session, which has the effect of making all stateless
links stateful again.

Does anybody have a good way for a stateless login form that doesn't show
wickety stuff in the URL bar? Thanks in advance for any help.

Neil


Re: jquery/qtip integration troubles - ajax post stopped

2010-03-09 Thread Richard Wilkinson
Hi,

'Ajax POST stopped because of precondition check' is probably your
problem.  all wicket ajax can have a precondition, which is basically
a function that returns true or false, and will only execute the ajax
if it returns true.  I expect that for some reason in your case this
function is returning false.

for an AjaxButton (well AjaxFormSubmitBehavior) the precondition is
this: "return Wicket.$$(this)&&Wicket.$$('" + getForm().getMarkupId()
+ "')";

in the wicket ajax javascript file i see this:

// returns if the element belongs to current document
// if the argument is not element, function returns true
Wicket.$$ = function(element) { 
...
}

This must be failing for you, which I presume has something to do with
how you are passing the content into the qtip;

content: $('#" + contentMarkupId + "').html()

Hope that helps.

-- 
Regards - Richard Wilkinson
Developer,
jWeekend: OO & Java Technologies - Development and Training
http://jWeekend.com


On 9 March 2010 13:05, Antoine van Wel  wrote:
> Hi everybody,
>
> Integrating a Jquery tooltip (qtip) went smoothly until I tried to do
> an Ajax form submit.
> The Wicket Ajax Debug panel shows an "Ajax POST stopped because of
> precondition check", so an Ajax response is never sent.
>
> What I'm doing is simply render the text for the tooltip on the same
> page in a hidden div, then pointing the content of the tooltip to that
> div.
>
> the html:
>
> 
>        
>         src="/js/jquery.qtip-1.0.0-rc3.min.js">
> 
>
> 
>        
>                
>                        
>                
>        
>
>        hover over me
> 
>
> the page class:
>
> public class JQueryTestPage extends BasePage {
>        public JQueryTestPage() {
>                WebMarkupContainer content = new WebMarkupContainer("content");
>                add(content);
>
>                Form form = new Form("form");
>                content.add(form);
>                form.add(new AjaxButton("clickme") {
>                       �...@override
>                        protected void onSubmit(AjaxRequestTarget target, 
> Form form) {
>                                System.out.println("testing");
>                        }
>
>                });
>
>                WebMarkupContainer qtip = new WebMarkupContainer("tipme");
>                add(qtip);
>                qtip.add(new QTipBehavior(qtip, content));
>        }
>
> }
>
>
> and finally the QTipBehavior:
>
> public class QTipBehavior extends AbstractBehavior {
>        private String componentMarkupId;
>        private String contentMarkupId;
>
>        public QTipBehavior(Component parent, Component content) {
>                contentMarkupId = content.getMarkupId();
>                componentMarkupId = parent.getMarkupId();
>        }
>
>       �...@override
>        public void renderHead(IHeaderResponse response) {
>                String javascript = new StringBuilder()
>                        .append("$(function() {")
>                        .append("       $('#" + componentMarkupId + 
> "').qtip({")
>                        .append("               content: $('#" + 
> contentMarkupId + "').html(),")
>                        .append("               hide: { fixed: true },")
>                        .append("               position: { corner: { target: 
> 'topRight', tooltip:
> 'leftTop' } },")
>                        .append("       })")
>                        .append("});")
>                        .toString();
>                response.renderOnDomReadyJavascript(javascript);
>        }
> }
>
>
> All pretty straightforward.
>
> So my guess is somehow Wicket is not happy about the redirection I
> created by not using the rendered button directly.
> I've been trying to debug this using Firebug, obviously without success.
>
> Does anybody have any hints how to solve this? Is the approach I'm
> taking flawed? Maybe jWicket or wiQuery could help here?
>
>
>
> Antoine
>
> -
> 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: Label state after submit

2010-03-09 Thread James Carman
Perhaps you need to update your form via ajax so that the submit
button is pointing to the correct version of the page?

On Tue, Mar 9, 2010 at 9:19 AM, Gustavo Henrique  wrote:
> Hi!
> How I can keep the label's states values after form submit?
> My app update the values of 3 labels using ajax, but when the form is
> submited and not pass in validation, the label's value are missing.
>
> Thanks!
>

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



Re: Label state after submit

2010-03-09 Thread Gustavo Henrique
The problem is diferent but is related with the previous post.


Re: Label state after submit

2010-03-09 Thread Gustavo Henrique
In a rgister form, I find the address by postal code (ajax) and show in the
page using labels. The user can submit the form (not ajax). if invalid form,
the same page is showed. all the textfields values self keep but the labels
values are missing.


Re: How to dynamically create wicket label and TextField Component?

2010-03-09 Thread Marty Phee

Check out the velocity sample.



On Mar 8, 2010, at 9:53 PM, sravan g  wrote:


Hi all,
Any one have idea about How to dynamically create wicket label and  
TextField

Component based on other TextField value from Database?

Thanks,
Sravan.


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



jquery/qtip integration troubles - ajax post stopped

2010-03-09 Thread Antoine van Wel
Hi everybody,

Integrating a Jquery tooltip (qtip) went smoothly until I tried to do
an Ajax form submit.
The Wicket Ajax Debug panel shows an "Ajax POST stopped because of
precondition check", so an Ajax response is never sent.

What I'm doing is simply render the text for the tooltip on the same
page in a hidden div, then pointing the content of the tooltip to that
div.

the html:













hover over me


the page class:

public class JQueryTestPage extends BasePage {
public JQueryTestPage() {
WebMarkupContainer content = new WebMarkupContainer("content");
add(content);

Form form = new Form("form");
content.add(form);
form.add(new AjaxButton("clickme") {
@Override
protected void onSubmit(AjaxRequestTarget target, 
Form form) {
System.out.println("testing");
}

});

WebMarkupContainer qtip = new WebMarkupContainer("tipme");
add(qtip);
qtip.add(new QTipBehavior(qtip, content));
}

}


and finally the QTipBehavior:

public class QTipBehavior extends AbstractBehavior {
private String componentMarkupId;
private String contentMarkupId;

public QTipBehavior(Component parent, Component content) {
contentMarkupId = content.getMarkupId();
componentMarkupId = parent.getMarkupId();
}

@Override
public void renderHead(IHeaderResponse response) {
String javascript = new StringBuilder()
.append("$(function() {")
.append("   $('#" + componentMarkupId + "').qtip({")
.append("   content: $('#" + 
contentMarkupId + "').html(),")
.append("   hide: { fixed: true },")
.append("   position: { corner: { target: 
'topRight', tooltip:
'leftTop' } },")
.append("   })")
.append("});")
.toString();
response.renderOnDomReadyJavascript(javascript);
}
}


All pretty straightforward.

So my guess is somehow Wicket is not happy about the redirection I
created by not using the rendered button directly.
I've been trying to debug this using Firebug, obviously without success.

Does anybody have any hints how to solve this? Is the approach I'm
taking flawed? Maybe jWicket or wiQuery could help here?



Antoine

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



Label state after submit

2010-03-09 Thread Gustavo Henrique
Hi!
How I can keep the label's states values after form submit?
My app update the values of 3 labels using ajax, but when the form is
submited and not pass in validation, the label's value are missing.

Thanks!


SV: Where to use MarkupStream

2010-03-09 Thread Wilhelmsen Tor Iver
> How to use Markupstream? where to use ?

You use that normally only when you need to make very custom code, e.g. your 
own tags. For most other situations, adding Behaviors is the preferred way of 
altering components.

- Tor Iver

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



Re: Announcing: visural-wicket 0.5 released - open source wicket components

2010-03-09 Thread danisevsky
hello, I have another problem, with DropDown this time. If I have only one
DropDown on my page, everything works great. But when I add another DropDown
to the page, with diferent datasource, the first DropDown shows data from
the second datasource. All DropDowns share the same datasource.


Where to use MarkupStream

2010-03-09 Thread sravan g
Hi All,
How to use Markupstream? where to use ?

Thanks,
Sravan


Refreshing dropdownchoice that is ajax enabled

2010-03-09 Thread Muro Copenhagen
Hi,

I have a small problem i hope someone has an answer for.

I have a textfield that can only be visible when a certain dropdownchoice
option is selected

My code is as:
// special doctor info
final TextField infoField = new TextField("info");
infoField .setOutputMarkupId(true);
infoField .setOutputMarkupPlaceholderTag(true);
add(infoField.setVisible(false));

DropDownChoice dropDownChoice = new
EDropDownChoice("departments", new Model(department) {

@Override
public Department getObject() {
return department;
}

@Override
public void setObject(Serializable object) {
if (object != null) {
department = (Department) object;
}
}
}, departmentService.getAll(), new ChoiceRenderer("department",
"id"));

dropDownChoice.add(new
AjaxFormComponentUpdatingBehavior("onchange") {

protected void onUpdate(AjaxRequestTarget target) {
infoField.setVisible(department.equals("test"));
target.addComponent(infoField);
}
});
add(dropDownChoice);


It all works fine, except on browser refresh.

The problem occurs when the choice "test" is selected, the textfield gets
visible.
Then if i refresh the browser the textfield dissappears...

But if i submit the form before refreshing the textfield that is visible
will not dissappear.

Can anyone explain why the textfield dissappears ?

Best Regards
Muro


Re: Label state after submit

2010-03-09 Thread Ernesto Reinaldo Barreiro
Is this the same problem as on your previous post? Or is it something
different?

Ernesto

On Tue, Mar 9, 2010 at 3:19 PM, Gustavo Henrique wrote:

> Hi!
> How I can keep the label's states values after form submit?
> My app update the values of 3 labels using ajax, but when the form is
> submited and not pass in validation, the label's value are missing.
>
> Thanks!
>


Re: Form.setMultiPart(true) and setResponsePage(...) in Wicket 1.4.7

2010-03-09 Thread t3_chris

Additonal Information:
setRepsonsePage(...) in the above described scenario works perfectly fine in
wicket-1.4.6
It seems to be broken again in 1.4.7

Best Regards,
 chris
-- 
View this message in context: 
http://old.nabble.com/Form.setMultiPart%28true%29-and-setResponsePage%28...%29-in-Wicket-1.4.7-tp27833928p27834085.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: jquery and wicket

2010-03-09 Thread Eyal Golan
thanks for the LegUp link :)

Eyal Golan
egola...@gmail.com

Visit: http://jvdrums.sourceforge.net/
LinkedIn: http://www.linkedin.com/in/egolan74

P  Save a tree. Please don't print this e-mail unless it's really necessary


On Tue, Mar 9, 2010 at 12:11 PM, Richard Wilkinson <
richardjohnwilkin...@googlemail.com> wrote:

> Hi Thorsten,
>
> The latest version of wiQuery is 1.0, which you can download the jar
> from the wiQuery site [1] or use maven.  See the wiQuery LegUp maven
> archetype [2] for initial help setting it all up.
>
> As for working with plugins, yes it can be done quite easily by
> implementing the IWiQueryPlugin interface in your component, but you
> are probably better asking for help on the wiQuery mail list [3].
>
> [1] - http://code.google.com/p/wiquery/
> [2] - http://jweekend.com/dev/LegUp
> [3] - http://groups.google.com/group/wiquery
>
> --
> Regards - Richard Wilkinson
> Developer,
> jWeekend: OO & Java Technologies - Development and Training
> http://jWeekend.com
>
>
> On 9 March 2010 09:36, Thorsten  wrote:
> > Hi,
> >
> > I'd like to use jquery in my wicket application. So far, I need
> > tooltips.
> >
> > I think, I could use wiquery for that, right? On the wiquery homepage
> > the latest build is Revision 44 from 04/07/2009. Is that the most recent
> > one?
> >
> > Can I use jquery plugins in combination with wiquery, e.g. qtip
> > (http://craigsworks.com/projects/qtip/)
> >
> >
> > Thanks,
> > Thorsten
> >
> > -
> > 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: How to dynamically create wicket label and TextField Component?

2010-03-09 Thread Josh Kamau
You can create a custom component that is a combination of a label and a
textfield. They use it as if it were one component.

regards.

On Tue, Mar 9, 2010 at 11:52 AM, Ernesto Reinaldo Barreiro <
reier...@gmail.com> wrote:

> Sorry can you describe a bit more what you want to achieve?
>
> Ernesto
>
> On Tue, Mar 9, 2010 at 4:53 AM, sravan g  wrote:
>
> > Hi all,
> > Any one have idea about How to dynamically create wicket label and
> > TextField
> > Component based on other TextField value from Database?
> >
> > Thanks,
> > Sravan.
> >
>


Form.setMultiPart(true) and setResponsePage(...) in Wicket 1.4.7

2010-03-09 Thread Christian Reiter

Hi!

I know that there are several topics around in the boards and in the bug 
tracker concerning the broken setResponsePage(...) call when it is used 
with a form with Form.setMultiPart(true).


I've tried all the solution I've found, but none of them worked. After 
I've read *http://issues.apache.org/jira/browse/WICKET-2667* I've 
assumed this bug should be fixed in 1.4.7


What I need is a button, which submits the form with file upload data 
and then navigates away to a new page if everything is ok.


Is there any way to to arrange things that this behaviour works?

Thanks in anticipation!

chris

--
Christian Reiter|||c.rei...@gmx.net


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



Re: jquery and wicket

2010-03-09 Thread Richard Wilkinson
Hi Thorsten,

The latest version of wiQuery is 1.0, which you can download the jar
from the wiQuery site [1] or use maven.  See the wiQuery LegUp maven
archetype [2] for initial help setting it all up.

As for working with plugins, yes it can be done quite easily by
implementing the IWiQueryPlugin interface in your component, but you
are probably better asking for help on the wiQuery mail list [3].

[1] - http://code.google.com/p/wiquery/
[2] - http://jweekend.com/dev/LegUp
[3] - http://groups.google.com/group/wiquery

-- 
Regards - Richard Wilkinson
Developer,
jWeekend: OO & Java Technologies - Development and Training
http://jWeekend.com


On 9 March 2010 09:36, Thorsten  wrote:
> Hi,
>
> I'd like to use jquery in my wicket application. So far, I need
> tooltips.
>
> I think, I could use wiquery for that, right? On the wiquery homepage
> the latest build is Revision 44 from 04/07/2009. Is that the most recent
> one?
>
> Can I use jquery plugins in combination with wiquery, e.g. qtip
> (http://craigsworks.com/projects/qtip/)
>
>
> Thanks,
> Thorsten
>
> -
> 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: jquery and wicket

2010-03-09 Thread bht
I can't tell you all the rules for compatibility and interoperability
with Wicket's own js library. I think you will find answers on that
with web searches. But I can tell you that I use jQuery without
problems. I use jsTree, jqModal and other components. I exchange data
via Wicket HiddenField. Please note that Wicket generates the names of
the hidden fields, so you might either want to override the names in
Java or use ids to address the hidden fields in your js.

Bernard

On Tue, 9 Mar 2010 10:36:04 +0100, you wrote:

>Hi,
>
>I'd like to use jquery in my wicket application. So far, I need
>tooltips.
>
>I think, I could use wiquery for that, right? On the wiquery homepage
>the latest build is Revision 44 from 04/07/2009. Is that the most recent
>one?
>
>Can I use jquery plugins in combination with wiquery, e.g. qtip
>(http://craigsworks.com/projects/qtip/)
>
>
>Thanks,
>Thorsten
>
>-
>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



jquery and wicket

2010-03-09 Thread Thorsten
Hi,

I'd like to use jquery in my wicket application. So far, I need
tooltips.

I think, I could use wiquery for that, right? On the wiquery homepage
the latest build is Revision 44 from 04/07/2009. Is that the most recent
one?

Can I use jquery plugins in combination with wiquery, e.g. qtip
(http://craigsworks.com/projects/qtip/)


Thanks,
Thorsten

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



Re: Wicketstuff-Push without Dojo?

2010-03-09 Thread Richard Wilkinson
>From what I have read, the cometd implementation used by
wicketstuff-push should work with any servlet 3 spec container (for
example the in development tomcat 7) as well as jetty 6+, however I
have only tried with jetty 6.  Using atmosphere allows it to work on
any container (even tomcat 4) however performance is not so good on
containers which don't have async features, unfortunately atmosphere
support is currently broken.

-- 
Regards - Richard Wilkinson
Developer,
jWeekend: OO & Java Technologies - Development and Training
http://jWeekend.com


On 9 March 2010 07:01, MattyDE  wrote:
>
> Wow thanks for your contribution.
>
> Iam not very used to use Patches on SVN-Directories. But i'll try my best to
> understand how it works ;)
>
> Iam looking for a possibility to run wicketstuff-push without a Jetty
> instance to. Prefered Tomcat...
>
> Thanks!
>
>
>
> richardjohnwilkinson wrote:
>>
>> Hi again,
>>
>> Attached is a patch (zipped) to be applied to the push directory
>> inside the push-parent directory under svn [1].  Any feedback or
>> comments would be welcome.
>>
>> [1] -
>> https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/trunk/wicketstuff-core/push-parent
>>
>> -
>> Regards - Richard Wilkinson
>> Developer,
>> jWeekend: OO & Java Technologies - Development and Training
>> http://jWeekend.com
>>
>> On 8 March 2010 14:37, Richard Wilkinson
>>  wrote:
>>> Hi,
>>>
>>> We have been working on the wicketstuff-push project offline; so far
>>> we have modified the code to run using jQuery (using wiQuery [1]) with
>>> the latest version of the cometd javascript, and fixed a few bugs /
>>> made some improvements. For example the current code wasn't as
>>> efficient as it could have been when you subscribe to more than one
>>> event per page.  We also have added a 'push model', where when you
>>> update the contents of a components model, that component is updated
>>> as usual with wicket ajax, and some helper code for working with
>>> wiQuery.
>>>
>>> All of this code is work-in-progress, but we want to start a dialog
>>> with the main developer(s) of the push project to see if we can
>>> contribute our work back to the community.
>>>
>>> We also experimented with using atmosphere [2] which allows cometd to
>>> work on more servlet containers than just jetty, but while the
>>> integration worked fine, there is currently a bug in the atmosphere
>>> code which means that it doesn't work with the current version of the
>>> cometd servlet [3].
>>>
>>> A version based only on wicket ajax sounds interesting, if you look at
>>> the jQuery binding, most of the actual work is done by the
>>> framework-agnostic cometd.js file, with jQuery providing the ajax
>>> mechanism and the JSON evaluation, however I know that the wicket ajax
>>> backend is being re-written in 1.5, so any work done on the 1.4 branch
>>> would be relatively short lived.
>>>
>>> I will try and get together a patch with our work in it for the push
>>> project and post it here, or I could maybe branch the main push-parent
>>> in the wicketstuff svn.
>>>
>>> [1] - http://code.google.com/p/wiquery/
>>> [2] - https://atmosphere.dev.java.net/
>>> [3] - http://n2.nabble.com/Bayuex-problems-tt4633855.html
>>>
>>> --
>>> Regards - Richard Wilkinson
>>> Developer,
>>> jWeekend: OO & Java Technologies - Development and Training
>>> http://jWeekend.com
>>>
>>> On 8 March 2010 13:36, Martin U  wrote:
 Hi Folks,

 i need some COMETD or something equal implemention in my
 web-application. So
 i found wickestuff-push. But as far as is see, it users dojo to do the
 client-side magic.

 I dont want to blow up my application more as it still is ;) so i want
 ask
 for an wicket + comet workaround with jQuery or with wicket-own
 javascript
 functionality.


 thanks in advance for any hint.


 - Martin

>>>
>>
>>
>>
>> -
>> 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://old.nabble.com/Wicketstuff-Push-without-Dojo--tp27821316p27832039.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>

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



Re: jWicket release 0.5.0

2010-03-09 Thread Ernesto Reinaldo Barreiro
Hi Bernard,

Thanks for your comments. I'm not 100% sure this is the same as 4996 but one
thing is clear: after an AJAX update of the page Droppables stop to work. On
the other hand it seems Stefan was able to fix this patching jquery for
issue 4996 so it must be the same issue. Somehow it is clear o me that the
problem is that they are holding references to object that do not exists and
this is producing exception on IE. Patching jquery myself do not seem to be
an option, not in the long run, because then I''l have to take car of
testing this local fix on future versions of jquery. So, probably I'll file
a new issue and attach what I have  to reproduce it (a small Wicket test
application).

Thanks again,

Ernesto

On Tue, Mar 9, 2010 at 8:46 AM,  wrote:

> Ernesto,
>
> Possibly not enough. I would create a testcase as a web page with no
> reference to Wicket as a start.
>
> It is good to avoid any technical distraction because any distraction
> causes friction and loss of energy.
>
> You can of course mention that you are a Wicket developer, and give
> some context to support your case, even mentioning that this is being
> discussed in this group.
>
> If you are 100% sure that your scenario is the same as in 4996, then I
> would attach the testcase to that ticket. Otherwise I would open a new
> one, without any reference to the old one.
>
> If you are sure about the previous code snippet being not much
> different from your attached testcase, then why not mention it,
> pointing out that you are just trying to be helpful. You can then ask
> what else they need to avoid any further delays.
>
> In case it is the same issue then I would subscribe to the jQuery dev
> mailing list (not user mailing list) and notify them that you are
> trying to re-start the issue ...
>
> Technically, the issue surprises me from this perspective:
>
> jQuery is fault tolerant in a way that if you run a query that returns
> an empty jQuery object and call methods on that empty object, then the
> query does not fail. In this case however it fails. I would try to
> emphasize this point if possible, concluding that this is in conflict
> with jQuery's own apparent design principles.
>
> Regards,
>
> Bernard
>
>
>
> On Tue, 9 Mar 2010 07:24:39 +0100, you wrote:
>
> > Do you think would it be "enough" if I provide a wicket quick-start and
> >instructions on how to get it running and so on? It would be very easy to
> >create one reproducing the issue on a D&D scenario.  Or create a new
> issues
> >and link it to the 4996?
> >
> >Ernesto
> >
> >On Mon, Mar 8, 2010 at 9:54 PM,  wrote:
> >
> >> I don't know, in the header I read: "Needs:  Test Case"
> >> The bug still has status "new", neither confirmed nor assigned.
> >>
> >> I am referring to http://dev.jquery.com/ticket/4996
> >>
> >> What am I missing? They might need a complete standalone page,
> >> preferably zipped that loads jquery.js from the web and displays an
> >> error message. You might get some progress if you do that. At least
> >> you put the ball back into their court. I did this more than once but
> >> it did not help. Nevertheless at least I know what to expect.
> >>
> >> The outcome could be that a bug needs to be filed against IE. But most
> >> importantly the bug needs to be fixed in jQuery because jQuery is
> >> crosss-platform and jQuery's existence is based on eliminating these
> >> quirks.
> >>
> >>
> >> On Mon, 8 Mar 2010 20:44:22 +0100, you wrote:
> >>
> >> >Hi Bernard,
> >> >
> >> >there is a "testcase" in the attachments:
> >> >
> >> >   $(document.createElement('div')).offset();
> >> >
> >> >It's a real simple testcase.
> >> >
> >> >Stefan
> >> >
> >> >-Ursprüngliche Nachricht-
> >> >Von: b...@actrix.gen.nz [mailto:b...@actrix.gen.nz]
> >> >Gesendet: Montag, 8. März 2010 20:23
> >> >An: users@wicket.apache.org
> >> >Betreff: Re: jWicket release 0.5.0
> >> >
> >> >Thanks for the link to the issue.
> >> >
> >> >Re: "I don't know why they don't fix the problem."
> >> >
> >> >I think the jQuery developer asks for a testcase. No testcase was
> >> >supplied, so I am not surprised that even after 7 months, nothing has
> >> >been done.
> >> >
> >> >But when there is a testcase, and when even the offending line of code
> >> >is identified in jQuery and it is clear that it is a jQuery bug then
> >> >the author of jQuery likes to close issues with status WONTFIX
> >> >apparently with the purpose to hide them from the community. Please
> >> >refer to
> >> >
> >> >http://dev.jquery.com/ticket/5743 where jQuery updates the DOM during
> >> >a call that is supposed to only get the dimensions of an element.
> >> >
> >> >Regards
> >> >
> >> >Bernard
> >> >
> >> >
> >> >On Mon, 8 Mar 2010 19:17:54 +0100, you wrote:
> >> >
> >> >>Hi Ernesto,
> >> >>
> >> >>yes, I added a patch to jquery1.4.2.js. The D&D problem is relatet to
> the
> >> ticket you cited (4996). After a DOM replacement IE is unable to
> calculate
> >> it's bounding rect in the way jQuery does and I

Re: Create a label in onUpdate method using ajax (AjaxFormComponentUpdatingBehavior)

2010-03-09 Thread Ernesto Reinaldo Barreiro
AjaxFormComponentUpdatingBehavior.onError?

Ernesto

On Mon, Mar 8, 2010 at 10:41 PM, Gustavo Henrique wrote:

> Hi guys!
>
> I'm trying create a label contain an error message after ajax request, but
> no success. I can't use FeedbackPanel because it changes the design.
> So I did:
>
> final Label label = new Label("postalCodeNotExisti");
> label.setOutputMarkupId(true);
>
> final RequiredTextField postalCodeComplement = (RequiredTextField) new
> RequiredTextField("individualAddresses.postalCodeComplement",
>new PropertyModel(postalCode, "postalCodeComplement"))
>.add(StringValidator.exactLength(3))
>.add(new AjaxFormComponentUpdatingBehavior("onblur") {
>
>   @Override
>   protected void onUpdate(AjaxRequestTarget target) {
>   RequestCycle requestCycle = RequestCycle.get();
>   String postalCode =
> requestCycle.getRequest().getParameter("postalCode");
>   target.addComponent(getFormComponent());
>   target.addComponent(label);
>   }
> }).setOutputMarkupId(true);
>
> add(postalCodeComplement);
>
>
> Not happens! No errors and no label!
> Why?
>
> Thanks!
>


Re: How to dynamically create wicket label and TextField Component?

2010-03-09 Thread Ernesto Reinaldo Barreiro
Sorry can you describe a bit more what you want to achieve?

Ernesto

On Tue, Mar 9, 2010 at 4:53 AM, sravan g  wrote:

> Hi all,
> Any one have idea about How to dynamically create wicket label and
> TextField
> Component based on other TextField value from Database?
>
> Thanks,
> Sravan.
>