Re: DropDownChoice.onSelectionChanged() in ModalWindow

2009-08-06 Thread Martin Makundi
> I've AjaxButton on my form in the modal window hidden at the beginning:
> But the button is not shown event if setVisible() is set to true.
> What I'm missing now?

Look at Wicket Debug console in your browser. You will probably see
that "canont replace hidden component with visible component because
hidden component not found".. naturally. So in order for  the hidden
component to "exist" in the HTML DOM tree even if it is HIDDEN, you
must set:

dropDownChoice.setOutputMarkupPlaceholderTag(true);

**
Martin

>
>
> Thanks, Petr
>
> -
> 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: DropDownChoice.onSelectionChanged() in ModalWindow

2009-08-06 Thread Petr Fejfar
On Fri, Aug 7, 2009 at 8:03 AM, Martin
Makundi wrote:

> You must add OnChangeAjaxBehavior onto the dropdown and NOT
> wantOnSelectionChangedNotifications().

I see... I fixed it following you recommendation. Thanks for prompt help.

--

Anyway, I'm still fighting with Ajax:

I want to show/hide a AjaxButton in dependence on whether
there is any value selected by the DropDownChoice.

I've AjaxButton on my form in the modal window hidden at the beginning:

musterButton.setOutputMarkupId(true);
musterButton.setVisible(false);
form.add(musterButton);

and in the handler of onUpdate event I'm trying to show it if selected
value is not null:

protected void onUpdate(AjaxRequestTarget target) {
...
musterButton.setVisible(pp.getMuster()!=null);
target.addComponent(musterButton);
}

But the button is not shown event if setVisible() is set to true.
What I'm missing now?


Thanks, Petr

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



Re: add a default-gray-text to AutoCompleteTextField

2009-08-06 Thread glooorrryyy

I've got the solution. I have to send the markup-id to the jquery code.
Looks like the markup-id is changed from the predefined one.


glooorrryyy wrote:
> 
> Why couldn't I set default gray text (like in Google search input field)
> for an AutoCompleteTextField?
> The fact is, I could do this to TextField component.
> I'm using TextTemplateHeaderContributor to make this happen to TextField.
> 
> Does anyone know the the reason?
> Or perhaps I did something wrong???
> 
>  Thanks in Advance,
> Gloria Saripah Patara
> 
> 
> 
>   
> 

-- 
View this message in context: 
http://www.nabble.com/add-a-default-gray-text-to-AutoCompleteTextField-tp24825708p24859437.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: WicketByExample.com - Soft launch and we need editors

2009-08-06 Thread Andrew Lombardi
Quick note, those of you that have submitted an example via the form,  
or requested to become an editor via the form, there was some error  
with the plugin doing the contacting ... which has been fixed.


feel free to re-submit at your leisure.

cheers!

On Aug 4, 2009, at 8:02 PM, Andrew Lombardi wrote:


/me goes out to the store to buy some Wicket dog food.

On Aug 4, 2009, at 7:36 PM, Igor Vaynberg wrote:


i look forward to a version powered by wicket. traitors! :)

-igor

On Tue, Aug 4, 2009 at 7:14 PM, Jeremy
Thomerson wrote:

Nice site.  I look forward to looking at it some more.

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




On Tue, Aug 4, 2009 at 2:51 PM, Andrew Lombardi> wrote:
I don't know about you guys, but I learn best by examples, a lot  
of them.
So the team at Mystic decided to put together a really simple,  
easy to
navigate, no nonsense examples site ... and start filling it with  
relevant

Wicket code examples for doing common things like:

  * How to use a FeedbackPanel with AJAX
  * Getting Started Guide
  * How to use AutoCompleteTextField
  * Putting Javascript or CSS into the header using a Resource
  * Using a Visitor to add multiple form components to an  
AjaxTarget

  * Working with Wicket and Spring
  * and on and on...

In all we have about 15 examples so far, and it's growing daily.   
We would
love you to at least drop by, and contribute with your tips and  
tricks and
examples of usage that might not have been covered, or was very  
hard to find

when you were looking for it.

happy monday!  and develop happy!


To our success!

Mystic Coders, LLC | Code Magic | www.mysticcoders.com

ANDREW LOMBARDI | and...@mysticcoders.com
2321 E 4th St. Ste C-128, Santa Ana CA 92705
ofc: 949-528-6480
fax: 714-782-6024
cell: 714-697-8046
linked-in: http://www.linkedin.com/in/andrewlombardi
twitter: http://www.twitter.com/kinabalu

Eco-Tip: Printing e-mails is usually a waste.


This message is for the named person's use only. You must not,  
directly or

indirectly, use,
disclose, distribute, print, or copy any part of this message if  
you are

not the intended recipient.





-
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 our success!

Mystic Coders, LLC | Code Magic | www.mysticcoders.com

ANDREW LOMBARDI | and...@mysticcoders.com
2321 E 4th St. Ste C-128, Santa Ana CA 92705
ofc: 949-528-6480
fax: 714-782-6024
cell: 714-697-8046
linked-in: http://www.linkedin.com/in/andrewlombardi
twitter: http://www.twitter.com/kinabalu

Eco-Tip: Printing e-mails is usually a waste.


This message is for the named person's use only. You must not,  
directly or indirectly, use,
disclose, distribute, print, or copy any part of this message if you  
are not the intended recipient.






To our success!

Mystic Coders, LLC | Code Magic | www.mysticcoders.com

ANDREW LOMBARDI | and...@mysticcoders.com
2321 E 4th St. Ste C-128, Santa Ana CA 92705
ofc: 949-528-6480
fax: 714-782-6024
cell: 714-697-8046
linked-in: http://www.linkedin.com/in/andrewlombardi
twitter: http://www.twitter.com/kinabalu

Eco-Tip: Printing e-mails is usually a waste.


This message is for the named person's use only. You must not,  
directly or indirectly, use,
 disclose, distribute, print, or copy any part of this message if you  
are not the intended recipient.





Re: DropDownChoice.onSelectionChanged() in ModalWindow

2009-08-06 Thread Martin Makundi
ModalWindow supports only AJAX behavior.

You must add OnChangeAjaxBehavior onto the dropdown and NOT
wantOnSelectionChangedNotifications().

dropdown.add(new OnchangeAjaxBehavior() {
  onUpdate() {... }
});

**
Martin

2009/8/7 Petr Fejfar :
> Hi all,
>
> I have a DropDownChoice on a panel within ModalWindow
> and once I return true from wantOnSelectionChangedNotifications()
> method and its value is changed, a browser shows dialog asking
> for confirmation to continue:
>
>   "Reloading this page will cause the modal window to disappear"
>
> Please, could somebody advice me what I am missing?
>
>
> Thanks, Petr
>
> -
> 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



DropDownChoice.onSelectionChanged() in ModalWindow

2009-08-06 Thread Petr Fejfar
Hi all,

I have a DropDownChoice on a panel within ModalWindow
and once I return true from wantOnSelectionChangedNotifications()
method and its value is changed, a browser shows dialog asking
for confirmation to continue:

   "Reloading this page will cause the modal window to disappear"

Please, could somebody advice me what I am missing?


Thanks, Petr

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



Re: How Wicket's big concepts/objects work together and in what order?

2009-08-06 Thread John Armstrong
This idea of 'just doing it' and a culture of incremental knowledge
attainment is crucial in my book.
I've made a point of building the most trivial webapps I have in wicket. For
example we recently re-did our WISP public homepage (
http://www.valleyinternet.com/) and I used it as an opportunity to learn
more wicket. The page is simple and minor andbarely worthy of 'wicketizing'
but doing something that specifically does -not- have a huge audience and
does -not- have massive features is a great way to learn more without the
pressures of developing a "real" app.
In that case I got to work with GMap2, learned some new ajax interactions
(including some gotchas) and was able to decisively break from my Ant past
and fully embrace Maven. So we got a new homepage but I got to pick up new
techniques that I am now applying to other trivial (and not so trivial)
webapps.

So, DO IT but do it often..

John-

On Thu, Aug 6, 2009 at 5:29 AM, T Ames  wrote:

> I think for most people anyway, you learn by doing.  I would think that by
> now you have a basic understanding to put together a really decent web
> application. There is quite a learning curve, but you do not have to
> understand all of the internals.
>
> I learn more about Wicket each time I do a web app.  I don't think you
> could
> really be a "good" Wicket programmer unless you have several apps under
> your
> belt.  Just go in a DO IT! The understanding will come with experience.
>
>
>
> On Thu, Aug 6, 2009 at 7:54 AM, jWeekend  >wrote:
>
> >
> > David,
> >
> > Jonathan Locke and I have started writing an article describing the
> Wicket
> > architecture (as opposed to the Architecture of A Wicket Application). It
> > will be the document I wish could have found when I had the good fortune
> to
> > come across Wicket in 2007.
> >
> > In the meantime, we have a few articles on the wiki by Dima (pen name
> syl)
> > like
> >
> >
> http://cwiki.apache.org/WICKET/request-cycle-and-request-cycle-processor.html
> > this  that you may find useful.
> >
> > Regards - Cemal
> > jWeekend
> > OO, Java Technologies, Wicket - Training & Consultancy
> > http://jWeekend.com
> >
> >
> >
> > David Chang-5 wrote:
> > >
> > >
> > > Hello, I am learning Wicket now and feel a bit confused by the new
> > > concepts in Wicket regarding how they work together and in what order.
> > >
> > > The big concepts I am talking about include:
> > >
> > > Application
> > > Session
> > > Request
> > > RequestCycle
> > > RequestCycleProcessor
> > > RequestTarget
> > > SessionStore
> > > Request
> > > Response
> > >
> > > Suppose I have a simple page with just one Wicket label. A user
> requests
> > > this page. I would like to know how the above objects/concepts get
> > > involved and in what order.
> > >
> > > If it needs too much description, then forget it. If it does not take
> too
> > > much of your time or you want to refresh yourself by give me an
> > > explanation, I really appreciate it.
> > >
> > > I want to be a good Wicket programmer.
> > >
> > > Thank you!
> > >
> > >
> > >
> > >
> > >
> > >
> > > -
> > > 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/August-London-Wicket-Event-%28just-a-drink-%29-tp24834574p24845115.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 and XHR abstraction

2009-08-06 Thread Scott Swank
I like jquery ajax

http://docs.jquery.com/Ajax

Scott

On Thu, Aug 6, 2009 at 5:37 PM, arungupta wrote:
>
> Thanks!
>
> Any specific recommendation by the Wicket community ?
>
> -Arun
>
>
> igor.vaynberg wrote:
>>
>> use any third party library you would like. xhr support that comes
>> with wicket is only for internal ajax use.
>>
>> -igor
>>
>> On Thu, Aug 6, 2009 at 4:44 PM, Arun Gupta wrote:
>>> Does Wicket provide an abstraction of XHR ?
>>>
>>> I need to make a synchronous call to a non-Wicket Servlet hosted in
>>> the same domain but can't see to find a Wicket way. Or is creating own
>>> XHR or using some pre-built utility the way to go.
>>>
>>> -Arun
>>>
>>> --
>>> Need Application Server ? - Download glassfish.org
>>> Blog: http://blogs.sun.com/arungupta
>>>
>>> -
>>> 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/Wicket-and-XHR-abstraction-tp24856532p24856960.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: Wicket and XHR abstraction

2009-08-06 Thread arungupta

Thanks!

Any specific recommendation by the Wicket community ?

-Arun


igor.vaynberg wrote:
> 
> use any third party library you would like. xhr support that comes
> with wicket is only for internal ajax use.
> 
> -igor
> 
> On Thu, Aug 6, 2009 at 4:44 PM, Arun Gupta wrote:
>> Does Wicket provide an abstraction of XHR ?
>>
>> I need to make a synchronous call to a non-Wicket Servlet hosted in
>> the same domain but can't see to find a Wicket way. Or is creating own
>> XHR or using some pre-built utility the way to go.
>>
>> -Arun
>>
>> --
>> Need Application Server ? - Download glassfish.org
>> Blog: http://blogs.sun.com/arungupta
>>
>> -
>> 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/Wicket-and-XHR-abstraction-tp24856532p24856960.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 and XHR abstraction

2009-08-06 Thread Igor Vaynberg
use any third party library you would like. xhr support that comes
with wicket is only for internal ajax use.

-igor

On Thu, Aug 6, 2009 at 4:44 PM, Arun Gupta wrote:
> Does Wicket provide an abstraction of XHR ?
>
> I need to make a synchronous call to a non-Wicket Servlet hosted in
> the same domain but can't see to find a Wicket way. Or is creating own
> XHR or using some pre-built utility the way to go.
>
> -Arun
>
> --
> Need Application Server ? - Download glassfish.org
> Blog: http://blogs.sun.com/arungupta
>
> -
> 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



Wicket and XHR abstraction

2009-08-06 Thread Arun Gupta
Does Wicket provide an abstraction of XHR ?

I need to make a synchronous call to a non-Wicket Servlet hosted in
the same domain but can't see to find a Wicket way. Or is creating own
XHR or using some pre-built utility the way to go.

-Arun

-- 
Need Application Server ? - Download glassfish.org
Blog: http://blogs.sun.com/arungupta

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



Require SSL and 1.4.0

2009-08-06 Thread hill180
As a new user, I am not sure I understand, I need to setup  
@requireHTTPS to work and I have the following Code:


What am I doing wrong?  I have Wicket 1.4.0

"error SecureRequestCycleProcessor cannot be resolved to a type"




package com.test.sslstuff2;

import org.apache.wicket.protocol.http.WebApplication;
import org.apache.wicket.protocol.https.HttpsConfig;
import org.apache.wicket.request.IRequestCycleProcessor;

/**
 * Application object for your web application. If you want to run  
this application without deploying, run the Start class.

 *
 * @see com.test.sslstuff2.Start#main(String[])
 */
public class WicketApplication extends WebApplication
{
public WicketApplication()
{
}   
@Override
protected IRequestCycleProcessor newRequestCycleProcessor()
{
HttpsConfig config = new HttpsConfig(80,443);
return new SecureRequestCycleProcessor(config);
}   
public Class getHomePage()
{
return HomePage.class;
}
}

and the Home Page:

package com.test.sslstuff2;

import org.apache.wicket.PageParameters;
import org.apache.wicket.markup.html.basic.Label;
import org.apache.wicket.markup.html.WebPage;
import org.apache.wicket.protocol.https.RequireHttps;

/**
 * Homepage
 */
@RequireHttps
public class HomePage extends WebPage {
private static final long serialVersionUID = 1L;
public HomePage(final PageParameters parameters) {
	add(new Label("message", "If you see this message wicket is properly  
configured and running"));


}
}


THANKS






Re: Override IE AutoComplete with wicket's AutoCompleteTextField

2009-08-06 Thread Loren Cole
I ran into this problem on firefox 3.0 using wicket 1.3.5.

Firefox wanted autocomplete="off", instead of autocomplete="false" which is
what AutoCompleteTextField was using.  W3schools doesn't specify a value for
this attribute, so I'm assuming it's not all ironed out yet.

I fixed it with the following, but haven't tested on ie.

myAutocompleteTextField.add(new AttributeModifier("autocomplete", new
Model("off")));

-
Loren


On Thu, Apr 17, 2008 at 2:13 PM, Ryan Sonnek  wrote:

> Glad you liked it...That's actually my blog.  =)
>
> you may want to check out the updated version of the autocomplete wicket
> components...
> http://jroller.com/wireframe/entry/from_components_to_behaviors
>
>
> On Thu, Apr 17, 2008 at 10:59 AM, ak  wrote:
>
> >
> > Thank you Ryan and Gerolf.
> >
> > I also came across this useful post for anyone reading this thread ...
> > http://www.jroller.com/wireframe/entry/wicket_autocomplete_text_field
> >
> > -Andy
> > --
> > View this message in context:
> >
> http://www.nabble.com/Override-IE-AutoComplete-with-Wicket%27s-AutoCompleteTextField-tp16733561p16745438.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 1.2.7 login error checking and reporting

2009-08-06 Thread Igor Vaynberg
set a breakpoint in wicketfilter and see what its doing. does it work
properly when using a regular submit button?

-igor

On Thu, Aug 6, 2009 at 12:49 PM, Burton, Tom F
(DOR) wrote:
> Hello,
>
>            I realize 1.2.7 is no longer "officially" supported.
> However, I'm hoping someone will help me anyway. Here goes nothing..
>
>
>
>
>            I have a login page that is supposed to make sure a username
> and password were actually entered before validating against the auth
> source.
>
> If the name and/or password aren't entered it's supposed to spit out an
> error message to the user.  It works when a password is entered but no
> username.
>
> If I enter a username and no password, or don't enter anything at all,
> nothing seems to happen. The spinning indicator next to the
> IndicatingAjaxSubmitButton
>
> goes by so fast I can't see it, if it goes by at all. My error log
> statements that tell me where its at in the execution don't seem to
> write out either.  I've tested this
>
> in both Firefox and IE. I also tested by entering a password in the form
> and then using the Tamper Data extension for Firefox to remove the
> password.  Still no joy.
>
> It seems that it's somewhere in the server side code that's terminating
> the request early but for the life of me I can't figure out where.
>
>
>
> Thanks for any help/assistance in this matter,
>
> Tom Burton
>
>
>
>
>
>

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



wicket 1.2.7 login error checking and reporting

2009-08-06 Thread Burton, Tom F (DOR)
Hello,

I realize 1.2.7 is no longer "officially" supported.
However, I'm hoping someone will help me anyway. Here goes nothing..


 

I have a login page that is supposed to make sure a username
and password were actually entered before validating against the auth
source.

If the name and/or password aren't entered it's supposed to spit out an
error message to the user.  It works when a password is entered but no
username.

If I enter a username and no password, or don't enter anything at all,
nothing seems to happen. The spinning indicator next to the
IndicatingAjaxSubmitButton

goes by so fast I can't see it, if it goes by at all. My error log
statements that tell me where its at in the execution don't seem to
write out either.  I've tested this

in both Firefox and IE. I also tested by entering a password in the form
and then using the Tamper Data extension for Firefox to remove the
password.  Still no joy.

It seems that it's somewhere in the server side code that's terminating
the request early but for the life of me I can't figure out where.

 

Thanks for any help/assistance in this matter,

Tom Burton

 

 



Re: DataView/IDataProvider/Detach

2009-08-06 Thread Igor Vaynberg
yep, lazy init is the way to do things. also helps to mark those
fields as transient as an additional safeguard.

-igor

On Thu, Aug 6, 2009 at 12:22 AM, Gabi Kaltman wrote:
> Hi,
>
> I'm very young on the Wicket planet, so please excuse my simple question 
> related to DataView/IDataProvider
>
> My configuration:
> 1. I use a DataView (MyDataView)
> 2. I added a PageNavigator to MyDataView
> 3. I defined a IDataProvider attached to  MyDataView (MyDataProvider)
> 4. MyDataProvider has a not-serializable field (MyField)
> 5. MyField is used in the method MyDataProvider.size()
> 6. I use Wicket 1.4.0
>
> What I do:
> 1.  In the method MyDataProvider.detach() , I nullify MyField (MyField = null)
>
> What happens:
> 1. When I navigate through pages, I get a NPE in MyDataProvider.size() as 
> MyField became null
>
> How I fixed it:
> 1. I overrode in MyDataView the method getDataProvider(). Didn't work. I 
> noticed that this method is never invoked
> 2. I tested again null in MyDataProvider.size(). If MyField is null, I just 
> reinitialize it. It works
>
> My question is if this solution is the optimal one, or there is a better one?
>
> Thanks,
> kaltman
>
>
>
>

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



Re: Can I send a parameter value to RequestCycle?

2009-08-06 Thread Alex Objelean

I think this is not enough...
The generated markup looks like this:

 

?wicket:interface=:2:tabs:tabs-container:tabs:2:link::ILinkListener::&tabId=2&tabId=2
third tab  
 

In order to make it work, the wicketAjaxGet url should also contain the
itemId parameter appended.. Otherwise it will work only when javascript is
disabled.

Alex Objelean


igor.vaynberg wrote:
> 
> c.add(new abstractbehavior() {
>   oncomponenttag(tag) {
> tag.put("href", tag.getattributes().get("href")+"&itemid=xxx");
>   }
> }
> 
> -igor
> 
> 
> On Thu, Aug 6, 2009 at 6:05 AM, marius1maru wrote:
>>
>>  Thank you for your answer Igor.
>>
>>  I did not manage to append the id to the url. I tried something like
>> this:
>>
>>                tabbedPanel = new AjaxTabbedPanel("mytabpanel", tabs) {
>>
>>                       �...@override
>>                        protected WebMarkupContainer newLink(String
>> linkId, final int index) {
>>
>>                                final WebMarkupContainer c = new
>> IndicatingAjaxLink(linkId) {
>>
>>                                       �...@override
>>                                        public void
>> onClick(AjaxRequestTarget target) {
>>                                                setSelectedTab(index);
>>                                                if (target != null) {
>>                                                      
>>  target.addComponent(MyTabbedPanel.this);
>>                                                }
>>                                                onAjaxUpdate(target);
>>                                        }
>>                                };
>>
>>                                c.add(new SimpleAttributeModifier("href",
>> "&itemId=xxx"));
>>
>>                                return c;
>>                        }
>>
>>  I also tried:
>>                        final IModel model = new
>> AbstractReadOnlyModel() {
>>                                       @Override
>>                                       public String getObject() {
>>                                                return "&itemId=xxx";
>>                                       }
>>                        };
>>
>>                        add(new AttributeModifier("href", model) {
>>                               @Override
>>                               protected String newValue(String
>> currentValue, String
>> replacementValue) {
>>                                  return currentValue + replacementValue;
>>                               }
>>                        });
>>
>>  but in WebRequestCycle, the URL is always without "&itemId=xxx" at the
>> end.
>>
>> Can you please tell me what am I missing here? Or what should I do to
>> modify
>> the url generated by ajaxtabpanel?
>>
>> Thank you,
>> Marius Anton
>>
>>
>> igor.vaynberg wrote:
>>>
>>> your request cycle has access to the url that caused the page expired
>>> exception. at that point you cannot know anything else because there
>>> is no longer a session either.
>>>
>>> what you might want to do is append itemid to the urls generated by
>>> the ajaxtabbedpanel.
>>>
>>> -igor
>>>
>>> On Wed, Aug 5, 2009 at 1:52 AM, Marius Anton
>>> wrote:
 Hello everybody,

 I hope that someone can help me on this.

  I have a page that displays information about a particular item. On
 that
 page there is also an ajax tab panel (from wicket.extensions).
  For every item, the url looks like this:
 http://mysite?itemId=-x. After the page expires I want the
 current page to be refreshed.

  After the page expires, and the user clicks on one of the tabs, a page
 expired exception is thrown. I have a custom request cycle, witch
 extends
 WebRequestCycle, that caches that exception,
  but the problem is that I can not redirect the user to the same page
 because there in my request cycle I am not able to see the parameter
  "itemId". Inside RequstCycle, if I try request.getUrl, I get something
 like this:
 mypage?wicket:interface=:5:10:::0:&random=0.8618006417527795.

  My question is: can I somehow send a parameter(itemId) to the request
 cycle when a page expired exception is thrown?
 Or how can I refresh the current page(witch has the itemId as
 parameter)
 when the user clicks on an ajax link(in this case a tab)
 after the page expired?

 Any sugestion will be apreciated.



>>>
>>> -
>>> 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/Can-I-send-a-parameter-value-to-RequestCycle--tp24823173p24846158.html
>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>
>>
>> -
>> To unsubscribe, e-

Re: Nested forms : don't process inner form when outer form is submitted

2009-08-06 Thread Igor Vaynberg
i dont think its that new, but maybe changed since youve written your wiki.

-igor

On Thu, Aug 6, 2009 at 8:24 AM, John Krasnay wrote:
> Oh, is that new? Perhaps my example on the wiki is indeed fubar.
>
> jk
>
> On Thu, Aug 06, 2009 at 08:14:51AM -0700, Igor Vaynberg wrote:
>> no, when a form's isenabled() returns false then all of its
>> descendants are also disabled. when a formcomponent is disabled it
>> adds disabled="disabled" attribute, so you wont be able to use it in
>> the browser.
>>
>> -igor
>>
>> On Thu, Aug 6, 2009 at 7:32 AM, John Krasnay wrote:
>> > On Thu, Aug 06, 2009 at 07:09:20AM -0700, nytrus wrote:
>> >>
>> >> John Krasnay wrote:
>> >> >
>> >> > The isEnabled method only controls form processing on the server. If you
>> >> > can't even type characters in your text field you have something else
>> >> > going on at the browser level.
>> >> >
>> >>
>> >> Well usually in a disabled box you cannot type, no matter what browser you
>> >> are using.
>> >
>> > I guess I wasn't clear enough. Returning false from the form's isEnabled
>> > method should *not* disable the text field in the browser. It simply
>> > disables the default processing for the form. You should still be able
>> > to enter a value in the text field, but it won't be validated and the
>> > backing model will not be updated.
>> >
>> > Perhaps you are mistakenly overriding the text field's isEnabled method
>> > instead. Note that the text field's isEnabled is queried at render time,
>> > well before you know which button was pressed.
>> >
>> >> Anyway I think we can let the fields enabled but override the 
>> >> isRequired():
>> >> if the submitting is the rootform just return false. In this way component
>> >> is correctly displayed but validated when submitting the inner form (the 
>> >> one
>> >> to which it belongs).
>> >
>> > This might work for you, but be aware it can trip you up too, e.g. other
>> > validators on the components will still be invoked and the models for
>> > components in the nested form will still be updated.
>> >
>> > jk
>> >
>> > -
>> > 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
>
>

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



Re: Nested forms : don't process inner form when outer form is submitted

2009-08-06 Thread John Krasnay
Oh, is that new? Perhaps my example on the wiki is indeed fubar.

jk

On Thu, Aug 06, 2009 at 08:14:51AM -0700, Igor Vaynberg wrote:
> no, when a form's isenabled() returns false then all of its
> descendants are also disabled. when a formcomponent is disabled it
> adds disabled="disabled" attribute, so you wont be able to use it in
> the browser.
> 
> -igor
> 
> On Thu, Aug 6, 2009 at 7:32 AM, John Krasnay wrote:
> > On Thu, Aug 06, 2009 at 07:09:20AM -0700, nytrus wrote:
> >>
> >> John Krasnay wrote:
> >> >
> >> > The isEnabled method only controls form processing on the server. If you
> >> > can't even type characters in your text field you have something else
> >> > going on at the browser level.
> >> >
> >>
> >> Well usually in a disabled box you cannot type, no matter what browser you
> >> are using.
> >
> > I guess I wasn't clear enough. Returning false from the form's isEnabled
> > method should *not* disable the text field in the browser. It simply
> > disables the default processing for the form. You should still be able
> > to enter a value in the text field, but it won't be validated and the
> > backing model will not be updated.
> >
> > Perhaps you are mistakenly overriding the text field's isEnabled method
> > instead. Note that the text field's isEnabled is queried at render time,
> > well before you know which button was pressed.
> >
> >> Anyway I think we can let the fields enabled but override the isRequired():
> >> if the submitting is the rootform just return false. In this way component
> >> is correctly displayed but validated when submitting the inner form (the 
> >> one
> >> to which it belongs).
> >
> > This might work for you, but be aware it can trip you up too, e.g. other
> > validators on the components will still be invoked and the models for
> > components in the nested form will still be updated.
> >
> > jk
> >
> > -
> > 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: Can I send a parameter value to RequestCycle?

2009-08-06 Thread Igor Vaynberg
c.add(new abstractbehavior() {
  oncomponenttag(tag) {
tag.put("href", tag.getattributes().get("href")+"&itemid=xxx");
  }
}

-igor


On Thu, Aug 6, 2009 at 6:05 AM, marius1maru wrote:
>
>  Thank you for your answer Igor.
>
>  I did not manage to append the id to the url. I tried something like this:
>
>                tabbedPanel = new AjaxTabbedPanel("mytabpanel", tabs) {
>
>                       �...@override
>                        protected WebMarkupContainer newLink(String linkId, 
> final int index) {
>
>                                final WebMarkupContainer c = new 
> IndicatingAjaxLink(linkId) {
>
>                                       �...@override
>                                        public void onClick(AjaxRequestTarget 
> target) {
>                                                setSelectedTab(index);
>                                                if (target != null) {
>                                                        
> target.addComponent(MyTabbedPanel.this);
>                                                }
>                                                onAjaxUpdate(target);
>                                        }
>                                };
>
>                                c.add(new SimpleAttributeModifier("href", 
> "&itemId=xxx"));
>
>                                return c;
>                        }
>
>  I also tried:
>                        final IModel model = new 
> AbstractReadOnlyModel() {
>                                       @Override
>                                       public String getObject() {
>                                                return "&itemId=xxx";
>                                       }
>                        };
>
>                        add(new AttributeModifier("href", model) {
>                               @Override
>                               protected String newValue(String currentValue, 
> String
> replacementValue) {
>                                  return currentValue + replacementValue;
>                               }
>                        });
>
>  but in WebRequestCycle, the URL is always without "&itemId=xxx" at the end.
>
> Can you please tell me what am I missing here? Or what should I do to modify
> the url generated by ajaxtabpanel?
>
> Thank you,
> Marius Anton
>
>
> igor.vaynberg wrote:
>>
>> your request cycle has access to the url that caused the page expired
>> exception. at that point you cannot know anything else because there
>> is no longer a session either.
>>
>> what you might want to do is append itemid to the urls generated by
>> the ajaxtabbedpanel.
>>
>> -igor
>>
>> On Wed, Aug 5, 2009 at 1:52 AM, Marius Anton wrote:
>>> Hello everybody,
>>>
>>> I hope that someone can help me on this.
>>>
>>>  I have a page that displays information about a particular item. On that
>>> page there is also an ajax tab panel (from wicket.extensions).
>>>  For every item, the url looks like this:
>>> http://mysite?itemId=-x. After the page expires I want the
>>> current page to be refreshed.
>>>
>>>  After the page expires, and the user clicks on one of the tabs, a page
>>> expired exception is thrown. I have a custom request cycle, witch extends
>>> WebRequestCycle, that caches that exception,
>>>  but the problem is that I can not redirect the user to the same page
>>> because there in my request cycle I am not able to see the parameter
>>>  "itemId". Inside RequstCycle, if I try request.getUrl, I get something
>>> like this: mypage?wicket:interface=:5:10:::0:&random=0.8618006417527795.
>>>
>>>  My question is: can I somehow send a parameter(itemId) to the request
>>> cycle when a page expired exception is thrown?
>>> Or how can I refresh the current page(witch has the itemId as parameter)
>>> when the user clicks on an ajax link(in this case a tab)
>>> after the page expired?
>>>
>>> Any sugestion will be apreciated.
>>>
>>>
>>>
>>
>> -
>> 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/Can-I-send-a-parameter-value-to-RequestCycle--tp24823173p24846158.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: Nested forms : don't process inner form when outer form is submitted

2009-08-06 Thread Igor Vaynberg
no, when a form's isenabled() returns false then all of its
descendants are also disabled. when a formcomponent is disabled it
adds disabled="disabled" attribute, so you wont be able to use it in
the browser.

-igor

On Thu, Aug 6, 2009 at 7:32 AM, John Krasnay wrote:
> On Thu, Aug 06, 2009 at 07:09:20AM -0700, nytrus wrote:
>>
>> John Krasnay wrote:
>> >
>> > The isEnabled method only controls form processing on the server. If you
>> > can't even type characters in your text field you have something else
>> > going on at the browser level.
>> >
>>
>> Well usually in a disabled box you cannot type, no matter what browser you
>> are using.
>
> I guess I wasn't clear enough. Returning false from the form's isEnabled
> method should *not* disable the text field in the browser. It simply
> disables the default processing for the form. You should still be able
> to enter a value in the text field, but it won't be validated and the
> backing model will not be updated.
>
> Perhaps you are mistakenly overriding the text field's isEnabled method
> instead. Note that the text field's isEnabled is queried at render time,
> well before you know which button was pressed.
>
>> Anyway I think we can let the fields enabled but override the isRequired():
>> if the submitting is the rootform just return false. In this way component
>> is correctly displayed but validated when submitting the inner form (the one
>> to which it belongs).
>
> This might work for you, but be aware it can trip you up too, e.g. other
> validators on the components will still be invoked and the models for
> components in the nested form will still be updated.
>
> jk
>
> -
> 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: Firefox, be afraid be very afraid!!!

2009-08-06 Thread Petr Fejfar
On Wed, Aug 5, 2009 at 4:12 AM, Steve Tarlton wrote:

> I just spent the better half of a day WASTED because I use Firefox for
> testing my Wicket development. For the life of me, I couldn't figure out why

Is there any resume?

Today I met a similiar problem with Google Chrome when trying to change
an initial Height/Width of ModalWindow.

In my case, the reason was a position/size kept in cookie expiring
after 30 days.

Petr

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



TeamCity configuration for wicketstuff-merged-resources

2009-08-06 Thread Stefan Fussenegger

Hi,

nor sure who's currently in charge as I haven't been around for a while. 
So, who do I have to ask for a change in the TeamCity configuration of 
my wicketstuff-merged-resources project [0]? I just created a branch [1] 
 which I'd like to be added in order to get builds for this branch.


Cheers, Stefan

(btw: is the dev mailing list moderated? I'm not able to subscribe - 
otherwise I would have posted this message there)



[0] http://wicketstuff.org/teamcity/viewType.html?buildTypeId=bt26
[1] 
https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/branches/wicket-1.3.x/wicketstuff-merged-resources/



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



can not close the modal window any more.

2009-08-06 Thread Jing Ge (Besitec IT DEHAM)
Hello all,

Maybe this is a known problem...

when user opens a modal window and the web browser's screen is smaller
than the modal window, than he get the problem: the modal window's head
and foot will be "cut off". After the user maximizes his browser, the
head of the modal window is still out of the screen. The result: user
can not close the modal window any more.

I have googled and found a workaround here (maybe work, I have not
tested it):

http://steve-on-sakai.blogspot.com/2009/05/repositioning-modalwindow-in-
wicket.html

My question is:

Could we do it in this way: before the modal window is opened, use
javascript checking the browser screen and set the right position to the
modal window. The Head, i.e. title with the "X" and right edge, should
be NEVER out of screen.

Do I miss some feature of wicket modal window? Any help will be
appreciated. :-)

Best Regards!
Jing


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



Re: Nested forms : don't process inner form when outer form is submitted

2009-08-06 Thread John Krasnay
On Thu, Aug 06, 2009 at 07:09:20AM -0700, nytrus wrote:
> 
> John Krasnay wrote:
> > 
> > The isEnabled method only controls form processing on the server. If you
> > can't even type characters in your text field you have something else
> > going on at the browser level.
> > 
> 
> Well usually in a disabled box you cannot type, no matter what browser you
> are using.

I guess I wasn't clear enough. Returning false from the form's isEnabled
method should *not* disable the text field in the browser. It simply
disables the default processing for the form. You should still be able
to enter a value in the text field, but it won't be validated and the
backing model will not be updated.

Perhaps you are mistakenly overriding the text field's isEnabled method
instead. Note that the text field's isEnabled is queried at render time,
well before you know which button was pressed.

> Anyway I think we can let the fields enabled but override the isRequired():
> if the submitting is the rootform just return false. In this way component
> is correctly displayed but validated when submitting the inner form (the one
> to which it belongs).

This might work for you, but be aware it can trip you up too, e.g. other
validators on the components will still be invoked and the models for
components in the nested form will still be updated.

jk

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



Re: Nested forms : don't process inner form when outer form is submitted

2009-08-06 Thread nytrus



John Krasnay wrote:
> 
> The isEnabled method only controls form processing on the server. If you
> can't even type characters in your text field you have something else
> going on at the browser level.
> 

Well usually in a disabled box you cannot type, no matter what browser you
are using.
Anyway I think we can let the fields enabled but override the isRequired():
if the submitting is the rootform just return false. In this way component
is correctly displayed but validated when submitting the inner form (the one
to which it belongs).
-- 
View this message in context: 
http://www.nabble.com/Nested-forms-%3A-don%27t-process-inner-form-when-outer-form-is-submitted-tp21910941p24847306.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: Nested forms : don't process inner form when outer form is submitted

2009-08-06 Thread John Krasnay
On Thu, Aug 06, 2009 at 02:40:13AM -0700, nytrus wrote:
> 
> In the example, the inner form is enabled only when the submitter button is
> that of itself (i.e. I'm submitting the inner form). In all other cases the
> form is always disabled:

Yes, that is the point.

> I've tried the example and in factthe form is
> totally disabled, I can't fill my textfield and I can't even submit the
> form. Something is wrong with the example?

The isEnabled method only controls form processing on the server. If you
can't even type characters in your text field you have something else
going on at the browser level.

jk

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



Re: Can I send a parameter value to RequestCycle?

2009-08-06 Thread marius1maru

 Thank you for your answer Igor.

 I did not manage to append the id to the url. I tried something like this:

tabbedPanel = new AjaxTabbedPanel("mytabpanel", tabs) {

@Override
protected WebMarkupContainer newLink(String linkId, 
final int index) {

final WebMarkupContainer c = new 
IndicatingAjaxLink(linkId) {

@Override
public void onClick(AjaxRequestTarget 
target) {
setSelectedTab(index);
if (target != null) {

target.addComponent(MyTabbedPanel.this);
}
onAjaxUpdate(target);
}
};

c.add(new SimpleAttributeModifier("href", 
"&itemId=xxx"));

return c;
}

 I also tried: 
final IModel model = new 
AbstractReadOnlyModel() {
   @Override
   public String getObject() {
return "&itemId=xxx";
   }
};

add(new AttributeModifier("href", model) {
   @Override
   protected String newValue(String currentValue, 
String
replacementValue) {
  return currentValue + replacementValue;
   }
});

 but in WebRequestCycle, the URL is always without "&itemId=xxx" at the end.

Can you please tell me what am I missing here? Or what should I do to modify
the url generated by ajaxtabpanel?

Thank you,
Marius Anton


igor.vaynberg wrote:
> 
> your request cycle has access to the url that caused the page expired
> exception. at that point you cannot know anything else because there
> is no longer a session either.
> 
> what you might want to do is append itemid to the urls generated by
> the ajaxtabbedpanel.
> 
> -igor
> 
> On Wed, Aug 5, 2009 at 1:52 AM, Marius Anton wrote:
>> Hello everybody,
>>
>> I hope that someone can help me on this.
>>
>>  I have a page that displays information about a particular item. On that
>> page there is also an ajax tab panel (from wicket.extensions).
>>  For every item, the url looks like this:
>> http://mysite?itemId=-x. After the page expires I want the
>> current page to be refreshed.
>>
>>  After the page expires, and the user clicks on one of the tabs, a page
>> expired exception is thrown. I have a custom request cycle, witch extends
>> WebRequestCycle, that caches that exception,
>>  but the problem is that I can not redirect the user to the same page
>> because there in my request cycle I am not able to see the parameter
>>  "itemId". Inside RequstCycle, if I try request.getUrl, I get something
>> like this: mypage?wicket:interface=:5:10:::0:&random=0.8618006417527795.
>>
>>  My question is: can I somehow send a parameter(itemId) to the request
>> cycle when a page expired exception is thrown?
>> Or how can I refresh the current page(witch has the itemId as parameter)
>> when the user clicks on an ajax link(in this case a tab)
>> after the page expired?
>>
>> Any sugestion will be apreciated.
>>
>>
>>
> 
> -
> 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/Can-I-send-a-parameter-value-to-RequestCycle--tp24823173p24846158.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: How Wicket's big concepts/objects work together and in what order?

2009-08-06 Thread T Ames
I think for most people anyway, you learn by doing.  I would think that by
now you have a basic understanding to put together a really decent web
application. There is quite a learning curve, but you do not have to
understand all of the internals.

I learn more about Wicket each time I do a web app.  I don't think you could
really be a "good" Wicket programmer unless you have several apps under your
belt.  Just go in a DO IT! The understanding will come with experience.



On Thu, Aug 6, 2009 at 7:54 AM, jWeekend wrote:

>
> David,
>
> Jonathan Locke and I have started writing an article describing the Wicket
> architecture (as opposed to the Architecture of A Wicket Application). It
> will be the document I wish could have found when I had the good fortune to
> come across Wicket in 2007.
>
> In the meantime, we have a few articles on the wiki by Dima (pen name syl)
> like
>
> http://cwiki.apache.org/WICKET/request-cycle-and-request-cycle-processor.html
> this  that you may find useful.
>
> Regards - Cemal
> jWeekend
> OO, Java Technologies, Wicket - Training & Consultancy
> http://jWeekend.com
>
>
>
> David Chang-5 wrote:
> >
> >
> > Hello, I am learning Wicket now and feel a bit confused by the new
> > concepts in Wicket regarding how they work together and in what order.
> >
> > The big concepts I am talking about include:
> >
> > Application
> > Session
> > Request
> > RequestCycle
> > RequestCycleProcessor
> > RequestTarget
> > SessionStore
> > Request
> > Response
> >
> > Suppose I have a simple page with just one Wicket label. A user requests
> > this page. I would like to know how the above objects/concepts get
> > involved and in what order.
> >
> > If it needs too much description, then forget it. If it does not take too
> > much of your time or you want to refresh yourself by give me an
> > explanation, I really appreciate it.
> >
> > I want to be a good Wicket programmer.
> >
> > Thank you!
> >
> >
> >
> >
> >
> >
> > -
> > 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/August-London-Wicket-Event-%28just-a-drink-%29-tp24834574p24845115.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 pages as actions

2009-08-06 Thread Wilhelmsen Tor Iver

> http://localhost:8080/web/?wicket:interface=:3:logout::ILinkListener::
> 
> I don't see the need to expose implementation details (i.e. ?wicket in
> the
> URL) at this point. Therefore, does it make more sense that the
> LogoutPage
> (the response page) itself performs the logout action? The link for
> logging
> out would then simply become a bookmarkable link to the logout page.
> For
> some reason, this doesn't really feel right to me, though.

It does make sense to me; in that case you just mount("/logout", 
LogoutPage.class); in your app, and sign out in a suitable method. Having it as 
a separate page you can also give a "goodbye message" to the user.

> I'd much rather keep the functionality as is and, instead, have the URL
> disguised. I do understand the basics of URL mounting and encoding but
> don't
> understand how I can use it to disguise this particular scenario.

Try looking into the relationship between IRequestTarget (which you can 
reimplement your button as) and IRequestTargetUrlCodingStrategy and/or urlFor().

- Tor Iver

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



Re: How Wicket's big concepts/objects work together and in what order?

2009-08-06 Thread jWeekend

David,

Jonathan Locke and I have started writing an article describing the Wicket
architecture (as opposed to the Architecture of A Wicket Application). It
will be the document I wish could have found when I had the good fortune to
come across Wicket in 2007.

In the meantime, we have a few articles on the wiki by Dima (pen name syl)
like 
http://cwiki.apache.org/WICKET/request-cycle-and-request-cycle-processor.html
this  that you may find useful.

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

  

David Chang-5 wrote:
> 
> 
> Hello, I am learning Wicket now and feel a bit confused by the new
> concepts in Wicket regarding how they work together and in what order.
> 
> The big concepts I am talking about include:
> 
> Application
> Session
> Request
> RequestCycle
> RequestCycleProcessor
> RequestTarget
> SessionStore
> Request
> Response
> 
> Suppose I have a simple page with just one Wicket label. A user requests
> this page. I would like to know how the above objects/concepts get
> involved and in what order.
> 
> If it needs too much description, then forget it. If it does not take too
> much of your time or you want to refresh yourself by give me an
> explanation, I really appreciate it.
> 
> I want to be a good Wicket programmer.
> 
> Thank you!
> 
> 
> 
> 
>   
> 
> -
> 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/August-London-Wicket-Event-%28just-a-drink-%29-tp24834574p24845115.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



Wicket pages as actions

2009-08-06 Thread Andrew Easter
Would it be considered bad practice to use a Wicket page as an action? i.e.
it doesn't do anything but perform some particular action (e.g. logout) and
then forward onto another page.

I'm coming up, again, against my biggest annoyance with Wicket - URLs. I
want to create a logout function in my application and so have created a
logout link component:

public class LogoutLink extends Link
{
   public LogoutLink( String id )
   {
  super( id );
   }

   @Override
   public void onClick()
   {
  AuthenticatedWebSession session = AuthenticatedWebSession.get();
  session.signOut();
  setResponsePage( LogoutPage.class );
   }
}

When I put this component within a page (in my case, an AccessDeniedPage),
as the AccessDeniedPage will handle the request, the URL for logging out is:

http://localhost:8080/web/?wicket:interface=:3:logout::ILinkListener::

I don't see the need to expose implementation details (i.e. ?wicket in the
URL) at this point. Therefore, does it make more sense that the LogoutPage
(the response page) itself performs the logout action? The link for logging
out would then simply become a bookmarkable link to the logout page. For
some reason, this doesn't really feel right to me, though.

I'd much rather keep the functionality as is and, instead, have the URL
disguised. I do understand the basics of URL mounting and encoding but don't
understand how I can use it to disguise this particular scenario.

Regards,

Andrew


Re: wicket rewriting name attributes in form

2009-08-06 Thread Alex Objelean

Override getInputName() method of each FormComponent..

Alex Objelean


Bas Vroling wrote:
> 
> I have written an wicket page that collects some user input and  
> calculates values. These values need to be sent to an external python  
> script that does something with this data and renders a results page.  
> This almost works fine but wicket messes up my form. In the HTML  
> template I have specified my form like this:
> 
> 
>name="protein_id" />
>   
> 
> 
> but when wicket renders the page it creates this:
> 
> 
>name="mutantPredictionSubmitPanel:proteinId" value="adrb2_human"/>
>   
> 
> 
> The difference is in the name of proteinId value being rewritten from  
> "protein_id" to "mutantPredictionSubmitPanel:proteinId", and this  
> causes the python script at the other end to choke.
> 
> Is there a way to disable the rewriting of the name attribute, or  
> specify my own name?
> 
> 
> 
> -
> 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/wicket-rewriting-name-attributes-in-form-tp24842731p24842984.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



After update from 1.3.5 to 1.3.7 my css-images are not found

2009-08-06 Thread Per Newgro
Hi *,

with 1.3.7 we got #Wicket-1992 solved. But now my css added images are not 
displayed anymore. Instead i get this message in my logs:
2009-08-06 11:50:26.286 ERROR SharedResourceRequestTarget: shared resource 
org.apache.wicket.Application/null/null/null/webresources/navi_items.gif not 
found or not allowed access

Ok i understand that there was a security issue and it is solved. But how can i 
display my images now?

In css i load it this way:

div.navigation div.imageBackward {
background: url("navi_items.gif") no-repeat;
width: 12px;
height: 10px;
cursor: pointer;
}

Thanks for help
Cheers
Per

-- 
Jetzt kostenlos herunterladen: Internet Explorer 8 und Mozilla Firefox 3 -
sicherer, schneller und einfacher! http://portal.gmx.net/de/go/chbrowser

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



Re: Nested forms : don't process inner form when outer form is submitted

2009-08-06 Thread nytrus

In the example, the inner form is enabled only when the submitter button is
that of itself (i.e. I'm submitting the inner form). In all other cases the
form is always disabled: I've tried the example and in factthe form is
totally disabled, I can't fill my textfield and I can't even submit the
form. Something is wrong with the example?


John Krasnay wrote:
> 
> Have a look at the bottom of this page:
> 
> http://cwiki.apache.org/WICKET/conditional-validation.html
> 
> The example shown disables the whole inner form when the outer form is
> submitted, meaning the inner form won't even be submitted. If you want
> the inner form to be submitted but just not required, remove the
> isEnabled override and implement isRequired on your text fields with
> similar code.
> 
> jk
> 
> On Tue, Feb 10, 2009 at 12:33:00AM -0800, Marieke Vandamme wrote:
>> 
>> Thanks for the suggestions, but I'm still not sure how to implement it.
>> My innerform implements IFormVisitorParticipant. I override
>> processChildren(), but how do I know which form is getting submitted???
>> Because when innerform is submitted, i want to return true, otherwise
>> false. 
>> Thanks for any help!! Marieke.
>> 
>> 
>> igor.vaynberg wrote:
>> > 
>> > try letting your inner form implement IFormVisitorParticipant.
>> > 
>> > another way is to override isrequired() and check for the submitting
>> > component.
>> > 
>> > -igor
>> > 
>> > On Mon, Feb 9, 2009 at 3:17 AM, Marieke Vandamme  wrote:
>> >>
>> >> Hello,
>> >>
>> >> I've been reading a lot about nested forms and what should happen with
>> >> the
>> >> inner forms when the outer form gets submitted. But I didn't found out
>> >> how
>> >> you can implement what i'm trying:
>> >>
>> >> I have inner form with some RequiredTextFields on it. These are
>> required
>> >> when the inner form is processed with an AjaxButton, but not when the
>> >> outer
>> >> form is submitted.
>> >>
>> >> How can I do this? Thanks for any help !!! Marieke.
>> >> --
>> >> View this message in context:
>> >>
>> http://www.nabble.com/Nested-forms-%3A-don%27t-process-inner-form-when-outer-form-is-submitted-tp21910941p21910941.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/Nested-forms-%3A-don%27t-process-inner-form-when-outer-form-is-submitted-tp21910941p21929547.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/Nested-forms-%3A-don%27t-process-inner-form-when-outer-form-is-submitted-tp21910941p24841072.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 rewriting name attributes in form

2009-08-06 Thread Martijn Dashorst
new AttributeModifier("value", true, model)

Martijn

On Thu, Aug 6, 2009 at 11:24 AM, Bas Vroling wrote:
> Ok, that makes sense. However, I need the wicket stuff to have the
> calculated parameters appear in the the submission form.
> So how would I get these values in the form with labels and
> WebMarkupContainers?
>
> On 6 Aug, at 11:16, Erik van Oosten wrote:
>
>> Hi Bas,
>>
>> Wicket needs to write a generated name attribute so that it knows exactly
>> which value comes back from the client.
>>
>> But since you're not posting to the server but to some other script, why
>> bother with using Wicket components? Just use the raw html, and if you must
>> use Label and WebMarkupContainer to manipulate the html.
>>
>> Regards,
>>  Erik.
>>
>>
>> Bas Vroling schreef:
>>>
>>> I have written an wicket page that collects some user input and
>>> calculates values. These values need to be sent to an external python script
>>> that does something with this data and renders a results page. This almost
>>> works fine but wicket messes up my form. In the HTML template I have
>>> specified my form like this:
>>>
>>> 
>>>       >> name="protein_id" />
>>>       
>>> 
>>>
>>> but when wicket renders the page it creates this:
>>>
>>> 
>>>       >> name="mutantPredictionSubmitPanel:proteinId" value="adrb2_human"/>
>>>       
>>> 
>>>
>>> The difference is in the name of proteinId value being rewritten from
>>> "protein_id" to "mutantPredictionSubmitPanel:proteinId", and this causes the
>>> python script at the other end to choke.
>>>
>>> Is there a way to disable the rewriting of the name attribute, or specify
>>> my own name?
>>>
>>>
>>
>> --
>> Erik van Oosten
>> http://day-to-day-stuff.blogspot.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
>
>



-- 
Become a Wicket expert, learn from the best: http://wicketinaction.com
Apache Wicket 1.4 increases type safety for web applications
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.4.0

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



Re: wicket rewriting name attributes in form

2009-08-06 Thread Bas Vroling
Ok, that makes sense. However, I need the wicket stuff to have the  
calculated parameters appear in the the submission form.
So how would I get these values in the form with labels and  
WebMarkupContainers?


On 6 Aug, at 11:16, Erik van Oosten wrote:


Hi Bas,

Wicket needs to write a generated name attribute so that it knows  
exactly which value comes back from the client.


But since you're not posting to the server but to some other script,  
why bother with using Wicket components? Just use the raw html, and  
if you must use Label and WebMarkupContainer to manipulate the html.


Regards,
  Erik.


Bas Vroling schreef:
I have written an wicket page that collects some user input and  
calculates values. These values need to be sent to an external  
python script that does something with this data and renders a  
results page. This almost works fine but wicket messes up my form.  
In the HTML template I have specified my form like this:



   name="protein_id" />

   


but when wicket renders the page it creates this:


   name="mutantPredictionSubmitPanel:proteinId" value="adrb2_human"/>

   


The difference is in the name of proteinId value being rewritten  
from "protein_id" to "mutantPredictionSubmitPanel:proteinId", and  
this causes the python script at the other end to choke.


Is there a way to disable the rewriting of the name attribute, or  
specify my own name?





--
Erik van Oosten
http://day-to-day-stuff.blogspot.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: wicket rewriting name attributes in form

2009-08-06 Thread Erik van Oosten

Hi Bas,

Wicket needs to write a generated name attribute so that it knows 
exactly which value comes back from the client.


But since you're not posting to the server but to some other script, why 
bother with using Wicket components? Just use the raw html, and if you 
must use Label and WebMarkupContainer to manipulate the html.


Regards,
   Erik.


Bas Vroling schreef:
I have written an wicket page that collects some user input and 
calculates values. These values need to be sent to an external python 
script that does something with this data and renders a results page. 
This almost works fine but wicket messes up my form. In the HTML 
template I have specified my form like this:



name="protein_id" />




but when wicket renders the page it creates this:


name="mutantPredictionSubmitPanel:proteinId" value="adrb2_human"/>




The difference is in the name of proteinId value being rewritten from 
"protein_id" to "mutantPredictionSubmitPanel:proteinId", and this 
causes the python script at the other end to choke.


Is there a way to disable the rewriting of the name attribute, or 
specify my own name?





--
Erik van Oosten
http://day-to-day-stuff.blogspot.com/



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



wicket rewriting name attributes in form

2009-08-06 Thread Bas Vroling
I have written an wicket page that collects some user input and  
calculates values. These values need to be sent to an external python  
script that does something with this data and renders a results page.  
This almost works fine but wicket messes up my form. In the HTML  
template I have specified my form like this:



		name="protein_id" />




but when wicket renders the page it creates this:


		name="mutantPredictionSubmitPanel:proteinId" value="adrb2_human"/>




The difference is in the name of proteinId value being rewritten from  
"protein_id" to "mutantPredictionSubmitPanel:proteinId", and this  
causes the python script at the other end to choke.


Is there a way to disable the rewriting of the name attribute, or  
specify my own name?




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



DataView/IDataProvider/Detach

2009-08-06 Thread Gabi Kaltman
Hi,

I'm very young on the Wicket planet, so please excuse my simple question 
related to DataView/IDataProvider

My configuration:
1. I use a DataView (MyDataView)
2. I added a PageNavigator to MyDataView
3. I defined a IDataProvider attached to  MyDataView (MyDataProvider)
4. MyDataProvider has a not-serializable field (MyField)
5. MyField is used in the method MyDataProvider.size()
6. I use Wicket 1.4.0

What I do:
1.  In the method MyDataProvider.detach() , I nullify MyField (MyField = null)

What happens:
1. When I navigate through pages, I get a NPE in MyDataProvider.size() as 
MyField became null

How I fixed it:
1. I overrode in MyDataView the method getDataProvider(). Didn't work. I 
noticed that this method is never invoked
2. I tested again null in MyDataProvider.size(). If MyField is null, I just 
reinitialize it. It works

My question is if this solution is the optimal one, or there is a better one?

Thanks,
kaltman