Re: Overriding markup loading results in errors with inheritance

2013-04-28 Thread Martin Grigorov
Hi,

Please create a quickstart and attach it to a ticket in Jira.
I'm interested to see what breaks.
Thanks!


On Mon, Apr 29, 2013 at 1:02 AM, mazabel  wrote:

> Thank you for your reply.
>
> The Wicket help describes how to change the file location the markup is
> loaded from.
>
> Since some of the markup files will eventually be loaded from a data base,
> simply adding another resource folder is not sufficient. I need to override
> ResourceStreamLocator and return a custom IResourceStream. When I do this,
> I
> get the described error for any markup containing inheritence.
>
> It is irrelevant whether I use a FileResourceStream as in my example code
> or
> a StringResourceStream from the markup code or something else, the error is
> always the same.
>
> Putting *exactly* the same markup code to the default location and
> returning
> super.locate(clazz,path), all works fine. Therefore the markup itself has
> no
> errors. Obviously, there is a difference whether I created the stream
> myself
> or use the stream created by standard ResourceStreamLocator, although
> getInputStream()  delivers in both cases the same content.
>
> Martin
>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Overriding-markup-loading-results-in-errors-with-inheritance-tp4658319p4658369.html
> Sent from the Users forum 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
>
>


-- 
Martin Grigorov
Wicket Training & Consulting
http://jWeekend.com 


Re: "Authorization" header in http

2013-04-28 Thread Martin Grigorov
Hi,

See http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html, p. 14.8.
The "Authorization" header is a _request_ header. I.e. the user agent
should set it. Wicket can set _response_ headers. An exception is Ajax
request where Wicketcan set request headers.

Your use case sounds like normal session tracking. Once authenticated you
bind a session. This way the servlet container will use either JSESSIONID
cookie or jsessionid request path parameter.


On Mon, Apr 29, 2013 at 3:23 AM, Gonzalo Aguilar Delgado <
gagui...@aguilardelgado.com> wrote:

> Hello,
>
> I'm using AuthenticatedWebApplication class to manage my login and
> roles. While it works well I want wicket to set the "Authorization" http
> header each time it does a request.
>
> I don't really know if this makes sense.
>
> The application is currently working in this context
>
> http://localhost:8080/lead-services-war/
>
> If I login wicket should set the "Authorization" header in http.
>
>
> I have some services running in
> http://localhost:8080/lead-services-war/services and I need to use the
> same authorization made by wicket in this services. Do you know how to
> propagate this authorization?
>
> Thank you a lot in advance.
>
> Best regards,
>



-- 
Martin Grigorov
Wicket Training & Consulting
http://jWeekend.com 


Re: Form not displaying messages correctly

2013-04-28 Thread Martin Grigorov
Here is an example of Ajax form submit:
http://www.wicket-library.com/wicket-examples-6.0.x/ajax/form


On Mon, Apr 29, 2013 at 1:56 AM, Taro Fukunaga  wrote:

> If I just try to get the value from the field, I see that the value is
> null.
>
> textInput = new TextField( "textInput", new
> IModel() {
>
> @Override
> public void detach() {
> // TODO Auto-generated method stub
>
> }
>
> @Override
> public Integer getObject() {
> return days;
> }
>
> @Override
> public void setObject( Integer object ) {
> value = object.intValue(); // 'object' is null, causes NPE
> }
> }, Integer.class );
>
> input.add( new IValidator() {
>
> private static final long serialVersionUID = 1L;
>
> @Override
> public void validate( IValidatable validatable ) {
> if ( !isValidNumber( validatable.getValue() ) ) {
> validatable.error( new ValidationError( "The input is
> not valid" ) );
> }
> }
>
> } );
>
> I think this is what I really don't understand. Why is the value of my text
> field null if the form is submitted with an AjaxButton? I think with a
> regular Button it was okay. Now the code never goes to the validator.
>
>
>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Form-not-displaying-messages-correctly-tp4658351p4658370.html
> Sent from the Users forum 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
>
>


-- 
Martin Grigorov
Wicket Training & Consulting
http://jWeekend.com 


"Authorization" header in http

2013-04-28 Thread Gonzalo Aguilar Delgado
Hello, 

I'm using AuthenticatedWebApplication class to manage my login and
roles. While it works well I want wicket to set the "Authorization" http
header each time it does a request. 

I don't really know if this makes sense.

The application is currently working in this context 

http://localhost:8080/lead-services-war/

If I login wicket should set the "Authorization" header in http. 


I have some services running in
http://localhost:8080/lead-services-war/services and I need to use the
same authorization made by wicket in this services. Do you know how to
propagate this authorization?

Thank you a lot in advance.

Best regards,


Re: Form not displaying messages correctly

2013-04-28 Thread Taro Fukunaga
If I just try to get the value from the field, I see that the value is null.

textInput = new TextField( "textInput", new
IModel() {

@Override
public void detach() {
// TODO Auto-generated method stub

}

@Override
public Integer getObject() {
return days;
}

@Override
public void setObject( Integer object ) {
value = object.intValue(); // 'object' is null, causes NPE
}
}, Integer.class );

input.add( new IValidator() {

private static final long serialVersionUID = 1L;

@Override
public void validate( IValidatable validatable ) {
if ( !isValidNumber( validatable.getValue() ) ) {
validatable.error( new ValidationError( "The input is
not valid" ) );
}
}

} );

I think this is what I really don't understand. Why is the value of my text
field null if the form is submitted with an AjaxButton? I think with a
regular Button it was okay. Now the code never goes to the validator.





--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Form-not-displaying-messages-correctly-tp4658351p4658370.html
Sent from the Users forum 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: Overriding markup loading results in errors with inheritance

2013-04-28 Thread mazabel
Thank you for your reply.

The Wicket help describes how to change the file location the markup is
loaded from. 

Since some of the markup files will eventually be loaded from a data base,
simply adding another resource folder is not sufficient. I need to override
ResourceStreamLocator and return a custom IResourceStream. When I do this, I
get the described error for any markup containing inheritence. 

It is irrelevant whether I use a FileResourceStream as in my example code or
a StringResourceStream from the markup code or something else, the error is
always the same. 

Putting *exactly* the same markup code to the default location and returning
super.locate(clazz,path), all works fine. Therefore the markup itself has no
errors. Obviously, there is a difference whether I created the stream myself
or use the stream created by standard ResourceStreamLocator, although
getInputStream()  delivers in both cases the same content. 

Martin



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Overriding-markup-loading-results-in-errors-with-inheritance-tp4658319p4658369.html
Sent from the Users forum 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: Disabling Individual Checkboxes in CheckGroup

2013-04-28 Thread Sven Meier

Hi,

>1) None of the checkboxes changes state after the Ajax update (but the 
Ajax request is processed)


You're calling #setRenderBodyOnly(false) too late. By default CheckGroup 
does not render its tag, so you have to enable it for Ajax updates 
*before* it is rendered:


  final CheckGroup appsCheckGroup=new CheckGroup("apps");
  appsCheckGroup.setOutputMarkupId(true);
  appsCheckGroup.setRenderBodyOnly(false);
  add(appsCheckGroup);

2) The line "In Ajax addComponent" happens BEFORE the line "In Ajax 
ListView.populateItem"


Sure it does. #populateItem() is called when the ListView is rendered to 
the Ajax response *after* it was added to the ART.


There's no need to create a new ListView and use #addOrReplace() in 
Ajax-Requests. Just update the original ListView:


  private boolean enabled = true;

  final CheckGroup appsCheckGroup=new CheckGroup("apps");
  appsCheckGroup.setOutputMarkupId(true);
  appsCheckGroup.setRenderBodyOnly(false);
  add(appsCheckGroup);

  ListView appListView = new ListView("appList", appList) {
@Override
protected ListItem newItem(final int index, IModel itemModel)
{
return new ListItem(index, itemModel) {
 protected void onComponentTag(ComponentTag tag) {
   tag.put("title", ((ApplL)itemModel.getObject()).getApplDc());
 }
};
}

@Override
protected void populateItem(final ListItem arg0) {
  Check app = new Check("app", arg0.getModel(), appsCheckGroup) {
protected void onConfigure() {
  super.onConfigure();

  setEnabled(enabled);
}
  };
  arg0.add(app);

  Label lblApp = new Label("lblApp", new 
PropertyModel(arg0.getModel(), "applCd"));

  arg0.add(lblApp);
}
  };
  appListView.setReuseItems(true);
  appsCheckGroup.add(appListView);

Note how all access to the model object is done as late as possible.

The Ajax update is quite simple then:

structureDropDown.add(new AjaxFormComponentUpdatingBehavior("onchange")
{
  public void onUpdate(ART target) {
enabled != enabled;

target.addComponent(appsCheckGroup);
  }
}


Hope this helps
Sven


On 04/28/2013 10:59 PM, eugenebalt wrote:

Here is the full code. This is an urgent problem so any advice much
appreciated.

ISSUE: Cannot enable/disable Checks in an Ajax update, their state remains
the same.

The Checks in the CheckGroup are supposed to change depending on a DropDown
change.

1) On Page Construction, all Checks in the CheckGroup are initially enabled

final CheckGroup appsCheckGroup=new CheckGroup("apps");
appsCheckGroup.setOutputMarkupId(true);
add(appsCheckGroup);
ListView appListView = new ListView("appList", appList) {
@Override
protected void populateItem(ListItem arg0) {

Check app = new Check("app", arg0.getModel(), appsCheckGroup);
ApplL appObject = (ApplL)arg0.getModelObject();
app.add(new 
SimpleAttributeModifier("title",appObject.getApplDc()));
arg0.add(app);

  *app.setEnabled(true);*

Label lblApp = new Label("lblApp", appObject.getApplCd());
lblApp.add(new SimpleAttributeModifier("title", appObject.getApplDc()));
arg0.add(lblApp);
}
};
appListView.setReuseItems(true);
appsCheckGroup.add(appListView);


2) In the Ajax Request (invoked from a separate DropDown):

structureDropDown.add(new AjaxFormComponentUpdatingBehavior("onchange")
{
final CheckGroup appsCheckGroup = 
(CheckGroup)UM01SearchForm.get("apps");

ListView appListView = new ListView("appList", appList) {

@Override
protected void populateItem(ListItem arg0) {
Check app = new Check("app", arg0.getModel(), 
appsCheckGroup);

System.out.println("In Ajax ListView.populateItem");

ApplL appObject = (ApplL)arg0.getModelObject();
app.add(new 
SimpleAttributeModifier("title",appObject.getApplDc()));
  

*app.setEnabled(false);*


arg0.add(app);
Label lblApp = new Label("lblApp", appObject.getApplCd());
lblApp.add(new SimpleAttributeModifier("title", 
appObject.getApplDc()));
arg0.add(lblApp);
}
};

appListView.setReuseItems(true);
appsCheckGroup.addOrReplace(appListView);

System.out.println("In Ajax addComponent");

target.addComponent(appsCheckGroup.setRenderBodyOnly(false));

}

}

OUTPUT:
1) None of the checkboxes changes state after the Ajax update (but the Ajax
request is processed)
2) The line "In Ajax addComponent" happens BEFORE the line "In Ajax
ListView.populateItem"

I've also tried directly accessing the Checks inside the CheckGroup, but
that didn't work for me, the state still doesn't change: 

Re: Form not displaying messages correctly

2013-04-28 Thread Martin Grigorov
You don't need FormValidator for this.
A plain IValidator will do the job.
FormValidator should be used when you need to make some more complex
validation which involves several form components.

So just do:

TextField textField = new TextField<>("someId", someModel,
Integer.class);
textField.add(new IValidator() {

  public void validate(IValidatable validatable) {
 if (!isValidNumber(validatable.getValue())) {
validatable.error(new ValidationError("The input is not valid"));
 }
  }
});


AjaxButton submitButton = new AjaxButton("btn", form) {

  // onSubmit() ...

  protected void onError(AjaxRequestTarget target, Form form) {

 // 1. if the form is in ModalWindow then
 target.add(feedbackPanel);


 // 2. If you want to show Modal with the error then:
 modalWindow.setContent(new
SomePanelWithExplanation(ModalWindow.CONTENT_ID));
 modalWindow.open(target);
  }

}

There may be typos. I haven't written this code in IDE.






On Sun, Apr 28, 2013 at 10:43 PM, Taro Fukunaga wrote:

> When validation fails I need to display a validation error message in the
> ModalWindow. This code is from my validator.
>
> public class MyValidator
> extends AbstractFormValidator
> implements Serializable {
>
> private final TextField textField;
>
> public MyValidator( TextField textField ) {
> this.textField = textField;
> }
>
> @Override
> public FormComponent[] getDependentFormComponents() {
>
> return new FormComponent[] { textField };
> }
>
> @Override
> public void validate( Form form ) {
>
> Integer value = textField.getConvertedInput();
>
> if ( !isValidNumber( value.intValue() ) ) {
>
> error( textField, ""invalid" );
> }
> }
>
> And in my panel I add it to my text field:
>
> add( new MyFormValidator( textField ) );
>
> However when I run my code and submit the request, I get an NPE when
> value.initValue() is called because getConvertedInput() returns null. There
> is no value in the textField at this moment. That's why I thought that I
> need to possibly attach a behavior to the text field in order to get the
> value.
>
>
>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Form-not-displaying-messages-correctly-tp4658351p4658365.html
> Sent from the Users forum 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
>
>


-- 
Martin Grigorov
Wicket Training & Consulting
http://jWeekend.com 


Re: Disabling Individual Checkboxes in CheckGroup

2013-04-28 Thread eugenebalt
Here is the full code. This is an urgent problem so any advice much
appreciated.

ISSUE: Cannot enable/disable Checks in an Ajax update, their state remains
the same.

The Checks in the CheckGroup are supposed to change depending on a DropDown
change.

1) On Page Construction, all Checks in the CheckGroup are initially enabled

final CheckGroup appsCheckGroup=new CheckGroup("apps");
appsCheckGroup.setOutputMarkupId(true);
add(appsCheckGroup);
ListView appListView = new ListView("appList", appList) { 
@Override
protected void populateItem(ListItem arg0) {

Check app = new Check("app", arg0.getModel(), appsCheckGroup);
ApplL appObject = (ApplL)arg0.getModelObject();
app.add(new 
SimpleAttributeModifier("title",appObject.getApplDc()));
arg0.add(app);

 *app.setEnabled(true);*

Label lblApp = new Label("lblApp", appObject.getApplCd());
lblApp.add(new SimpleAttributeModifier("title", appObject.getApplDc()));
arg0.add(lblApp);
}
};
appListView.setReuseItems(true);
appsCheckGroup.add(appListView);


2) In the Ajax Request (invoked from a separate DropDown):

structureDropDown.add(new AjaxFormComponentUpdatingBehavior("onchange")
{
final CheckGroup appsCheckGroup = 
(CheckGroup)UM01SearchForm.get("apps"); 

ListView appListView = new ListView("appList", appList) {

@Override
protected void populateItem(ListItem arg0) {
Check app = new Check("app", arg0.getModel(), 
appsCheckGroup);

System.out.println("In Ajax ListView.populateItem");

ApplL appObject = (ApplL)arg0.getModelObject();
app.add(new 
SimpleAttributeModifier("title",appObject.getApplDc()));


*app.setEnabled(false);*


arg0.add(app);
Label lblApp = new Label("lblApp", appObject.getApplCd());
lblApp.add(new SimpleAttributeModifier("title", 
appObject.getApplDc()));
arg0.add(lblApp); 
}
};

appListView.setReuseItems(true);
appsCheckGroup.addOrReplace(appListView);

System.out.println("In Ajax addComponent");

target.addComponent(appsCheckGroup.setRenderBodyOnly(false));

}

}

OUTPUT:
1) None of the checkboxes changes state after the Ajax update (but the Ajax
request is processed)
2) The line "In Ajax addComponent" happens BEFORE the line "In Ajax
ListView.populateItem"

I've also tried directly accessing the Checks inside the CheckGroup, but
that didn't work for me, the state still doesn't change: e.g., for Check #3,

// Direct Access Test
Check c3 =
(Check)((ListItem)((ListView)appsCheckGroup.get("appList")).get("3")).get("app");
c3.setEnabled(false);
target.addComponent(c3);


Thanks for any help.



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Disabling-Individual-Checkboxes-in-CheckGroup-tp4658165p4658366.html
Sent from the Users forum 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: Form not displaying messages correctly

2013-04-28 Thread Taro Fukunaga
When validation fails I need to display a validation error message in the
ModalWindow. This code is from my validator.

public class MyValidator
extends AbstractFormValidator
implements Serializable {

private final TextField textField;

public MyValidator( TextField textField ) {
this.textField = textField;
}

@Override
public FormComponent[] getDependentFormComponents() {

return new FormComponent[] { textField };
}

@Override
public void validate( Form form ) {

Integer value = textField.getConvertedInput();

if ( !isValidNumber( value.intValue() ) ) {

error( textField, ""invalid" );
}
}

And in my panel I add it to my text field:

add( new MyFormValidator( textField ) );

However when I run my code and submit the request, I get an NPE when
value.initValue() is called because getConvertedInput() returns null. There
is no value in the textField at this moment. That's why I thought that I
need to possibly attach a behavior to the text field in order to get the
value. 





--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Form-not-displaying-messages-correctly-tp4658351p4658365.html
Sent from the Users forum 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: Form not displaying messages correctly

2013-04-28 Thread Martin Grigorov
Hi,

Give more information what you want to do.
Show us some more code too.


On Sun, Apr 28, 2013 at 9:55 PM, Taro Fukunaga  wrote:

> Thanks Martin.
>
> I changed my code from Button to AjaxButton. But now when I try to validate
> some input I'm not getting any value.
>
> public class MyFormValidator
> extends AbstractFormValidator
> implements Serializable {
>
>   @Override
>   public void validate( Form form ) {
> Integer value = textField.getConvertedInput(); // returns null
>
> This technique was mentioned in
> http://tomaszdziurko.pl/2010/02/wicket-ajax-modal-are-you-sure-window/
> 
> but it's not working for me.
>
> I've read something about adding an AjaxFormComponentUpdatingBehavior to a
> field, but I'm not sure if this is what I want. I want the value of the
> field at the time that I submit it, not every time I type in something.
>
> Looking at
> http://tomaszdziurko.pl/2010/02/wicket-ajax-modal-are-you-sure-window/
> 
>   I
> may have to change my code in the form even further. Right now my form
> doesn't have a reference to the ModalWindow, but this post suggests that I
> need to explictly call ModalWindow.close() in order to close it from an
> AjaxButton.
>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Form-not-displaying-messages-correctly-tp4658351p4658363.html
> Sent from the Users forum 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
>
>


-- 
Martin Grigorov
Wicket Training & Consulting
http://jWeekend.com 


Re: Form not displaying messages correctly

2013-04-28 Thread Taro Fukunaga
Thanks Martin.

I changed my code from Button to AjaxButton. But now when I try to validate
some input I'm not getting any value. 

public class MyFormValidator
extends AbstractFormValidator
implements Serializable {

  @Override
  public void validate( Form form ) {
Integer value = textField.getConvertedInput(); // returns null

This technique was mentioned in 
http://tomaszdziurko.pl/2010/02/wicket-ajax-modal-are-you-sure-window/
  
but it's not working for me.

I've read something about adding an AjaxFormComponentUpdatingBehavior to a
field, but I'm not sure if this is what I want. I want the value of the
field at the time that I submit it, not every time I type in something. 

Looking at 
http://tomaszdziurko.pl/2010/02/wicket-ajax-modal-are-you-sure-window/
   I
may have to change my code in the form even further. Right now my form
doesn't have a reference to the ModalWindow, but this post suggests that I
need to explictly call ModalWindow.close() in order to close it from an
AjaxButton.



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Form-not-displaying-messages-correctly-tp4658351p4658363.html
Sent from the Users forum 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: Session timeout

2013-04-28 Thread Martin Grigorov
There is no WicketFilter here.
You use Atmosphere, and I guess you have atmosphere.xml that specifies the
delegation to WicketFilter.

I suggest you to create a quickstart with Wicket only and test it.
If  it works then ask in Atmosphere forums. If it doesn't then create a
ticket and attach your application so we can debug it.


On Sun, Apr 28, 2013 at 9:37 PM, souvikbhattacharyas <
souvikbhattachar...@gmail.com> wrote:

> Then its really shocking that it's not working for me. I am attaching my
> web.xml below.
>
>
> 
> 
> protected
> /*
> TRACE
> PUT
> OPTIONS
> DELETE
> 
> 
>
> 
> 30
> 
>
>
> 
> wicket.ssp
> org.atmosphere.cpr.AtmosphereServlet
> 
> applicationClassName
> Start up class
> 
> 
> listings
> false
> 
> 
> configuration
> deployment
> 
> 
> org.atmosphere.useWebSocket
> false
> 
> 
> org.atmosphere.useNative
> true
> 
> 
> org.atmosphere.cpr.sessionSupport
> true
> 
> 
> filterMappingUrlPattern
> /ssp/*
> 
> 
>
> org.atmosphere.cpr.broadcastFilterClasses
>
> org.atmosphere.client.TrackMessageSizeFilter
> 
> 0
> 
>
> 
> wicket.ssp
> /sst/*
> 
> 
>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Session-timeout-tp4658356p4658360.html
> Sent from the Users forum 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
>
>


-- 
Martin Grigorov
Wicket Training & Consulting
http://jWeekend.com 


Re: Disabling Individual Checkboxes in CheckGroup

2013-04-28 Thread eugenebalt
Paul: The Check is constructed *inside populateItem()*. This is already too
late, my output shows this happens after the Ajax ecent.

There is no way to construct a Check outside the populateItem, as far as I
know. This is how Checks are used:

CheckGroup cg = new CheckGroup("apps");
add(cg);
ListView appListView = new ListView("appList", appList) {
  @Override
  protected void populateItem (ListItem arg0)
  {
 Check app = new Check("app", arg0.getModel(), appsCheckGroup);
 arg0.add(app);
 
 // enabled/disabled here, or in Check constructor
  }
};
appListView.setReuseItems(true);
cg.add(appListView);



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Disabling-Individual-Checkboxes-in-CheckGroup-tp4658165p4658361.html
Sent from the Users forum 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: Session timeout

2013-04-28 Thread souvikbhattacharyas
Then its really shocking that it's not working for me. I am attaching my
web.xml below.




protected
/*
TRACE
PUT
OPTIONS
DELETE




30




wicket.ssp
org.atmosphere.cpr.AtmosphereServlet

applicationClassName
Start up class


listings
false 


configuration
deployment


org.atmosphere.useWebSocket
false


org.atmosphere.useNative
true


org.atmosphere.cpr.sessionSupport
true


filterMappingUrlPattern
/ssp/*


   
org.atmosphere.cpr.broadcastFilterClasses
   
org.atmosphere.client.TrackMessageSizeFilter

0



wicket.ssp
/sst/*





--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Session-timeout-tp4658356p4658360.html
Sent from the Users forum 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: Session timeout

2013-04-28 Thread Martin Grigorov
no


On Sun, Apr 28, 2013 at 9:30 PM, souvikbhattacharyas <
souvikbhattachar...@gmail.com> wrote:

> Hi,
> In my web.xml I specified session timeout the way we usuallly do with
> other web application but still its not working. Is ther any other
> settings.
>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Session-timeout-tp4658356p4658358.html
> Sent from the Users forum 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
>
>


-- 
Martin Grigorov
Wicket Training & Consulting
http://jWeekend.com 


Re: Session timeout

2013-04-28 Thread souvikbhattacharyas
Hi,
In my web.xml I specified session timeout the way we usuallly do with
other web application but still its not working. Is ther any other settings.



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Session-timeout-tp4658356p4658358.html
Sent from the Users forum 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: Session timeout

2013-04-28 Thread Martin Grigorov
Hi,

Wicket doesn't manage the timeout.
What whatever is specified in web.xml it is used.
Make sure there are no requests and the session will expire.


On Sun, Apr 28, 2013 at 9:10 PM, souvikbhattacharyas <
souvikbhattachar...@gmail.com> wrote:

> Hi,
>Recently Wicket put me in another problem of Session out. In normal web
> application what we do is simply declare session-timeout in web. xml and it
> works fine for us. But in wicket specifying session timeout in web.xml is
> not working anymore. But I need session time out for my application badly.
> Also I can't implemt Ajax Behavior or Ajax Timer for every class to check
> the session time out. That why I need some ay out to implement session time
> out for my program to work. Any help is appreciated.
>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Session-timeout-tp4658356.html
> Sent from the Users forum 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
>
>


-- 
Martin Grigorov
Wicket Training & Consulting
http://jWeekend.com 


Session timeout

2013-04-28 Thread souvikbhattacharyas
Hi,
   Recently Wicket put me in another problem of Session out. In normal web
application what we do is simply declare session-timeout in web. xml and it
works fine for us. But in wicket specifying session timeout in web.xml is
not working anymore. But I need session time out for my application badly.
Also I can't implemt Ajax Behavior or Ajax Timer for every class to check
the session time out. That why I need some ay out to implement session time
out for my program to work. Any help is appreciated.



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Session-timeout-tp4658356.html
Sent from the Users forum 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: Disabling Individual Checkboxes in CheckGroup

2013-04-28 Thread Igor Vaynberg
On Fri, Apr 26, 2013 at 8:39 AM, eugenebalt  wrote:
> Igor,
>
> The problem is, you do check.setEnabled(false) in *ListView.populateItem()*
> for a CheckGroup control.

so?

> This method executes AFTER the Ajax update. It's too late to do
> check.setEnable(false) on the render of the CheckGroup's ListView. We need
> to disable/enable checkboxes in a CheckGroup as part of the Ajax update.

you call setenabled(false) on a check. then rerender it using ajax.
perhaps you should show some code so we can better understand what you
are trying to do.

-igor

>
> (This does work with CheckBoxMultipleChoice, because there is no ListView
> rendering and the checkboxes can be handled individually, but we need a grid
> layout and we don't get it with that control.)
>
> Thanks
>
>
>
> --
> View this message in context: 
> http://apache-wicket.1842946.n4.nabble.com/Disabling-Individual-Checkboxes-in-CheckGroup-tp4658165p4658320.html
> Sent from the Users forum 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: Form not displaying messages correctly

2013-04-28 Thread Martin Grigorov
Hi,


On Sat, Apr 27, 2013 at 11:29 PM, Taro Fukunaga wrote:

> I have a FencedFeedbackPanel inside a form but when I try to display a
> message, the form closes and the message is displayed on the main page
> instead of in my form. The form is in turn inside a modal window (see
> hierarchy below). When I have invalid input, I want my form (and modal
> window) to stay open and the error message displayed on that form so that
> the user can correct it.
>

ModalWindow is an Ajax component so you need to use AjaxButton or
AjaxSubmitLink to submit the form inside it.
Otherwise the whole page is re-rendered and the modal is being "closed"
(i.e. it is not opened in the new page instance).

When there is an error in a validation the button's
#onError(AjaxRequestTarget) will be called and here you have to do:
target.add(feedbackPanel)


>
> public class MyForm extends Form {
>   public MyForm {
> FencedFeedbackPanel feedbackPanel = new FencedFeedbackPanel(
> "myFeedbackPanel", this );
> feedbackPanel.setOutputMarkupId( true );
> add( feedbackPanel );
> ...
>   }
> }
>
> I am also using a FormValidator and am adding it to my field for
> validation.
>
> public class MyForm extends Form {
>   public MyForm {
>...
>final TextField myInput = new TextField( "myInput",
> new
> IModel() {
>add( new MyFormValidator( myInput ) );
>
> The code for MyFormValidator is similar to
> http://blog.armstrongconsulting.com/?p=40, except that I'm using a
> TextField instead of a TextArea. Like the example, in my code I am
> just saying error() in the validator and am expecting it to display inside
> the form.
>
> 
> http://wicket.apache.org";>
>   
> 
>
>
>
> The Hierarchy is like this:
>
> MyPage
>   |
> MyModalWindow
>   |
> MyPanel
>   |
> MyForm
>   |
> Input Field
>
> I'm using Wicket 6.5
>
> Thank you.
>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Form-not-displaying-messages-correctly-tp4658351.html
> Sent from the Users forum 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
>
>


-- 
Martin Grigorov
Wicket Training & Consulting
http://jWeekend.com