Re: Need to Understand CheckGroup and Check

2009-04-30 Thread Mathias P.W Nilsson

The selection variable is a collection or a wicket model with an object of
collection. You can preselect you values by using the same classes there.

Consider this

FormString form = new FormString( form );

String[] someStrings = new String[]{ Wicket , Hibernate, Maven,
Spring };
String[] other = new String[]{ Wicket , Hibernate, Maven, Spring,
C#, NHibernate };
CheckGroupString group = new CheckGroupString( group, Arrays.asList(
someStrings ) );
ListViewString stringView = new ListViewString( stringView ,
Arrays.asList( other ) ){
  private static final long serialVersionUID = 1L;
  @Override
  protected void populateItem(ListItemString item) {
item.add( new CheckString( item, item.getModel() ));
  }

};

group.add( stringView );
form.add( group );
add( form );



Here the someStrings will be checked, that is ( Wicket , Hibernate,
Maven, Spring ). NHibernate and C# will not be checked.
Hope this helps.

-- 
View this message in context: 
http://www.nabble.com/Need-to-Understand-CheckGroup-and-Check-tp23307190p23311015.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 to remove a row from DataTable?

2009-04-30 Thread Mathias P.W Nilsson

I don't know if you can remove one row and just update the row as you can
with TreeTable but maybe some here could guide you.

If it is good enough to update the whole table then maybe somthing like
this. this is typed from my head so there may be errors.

public abstract DeleteContactPanel extends Panel{
  public DeleteContactPanel(String id, final Contact contact) { 
super(id); 
setOutputMarkupId(true); 
final Form form = new Form(form); 
form.add(new AjaxSubmitLink(delete) { 
  @Override 
  protected void onSubmit(AjaxRequestTarget target,  Form form) { 
service.deleteContact(contact); 
onDelete( target );
System.out.println(OK Deleted); 
  } 
}); 
add(form); 
  } 
  public abstract void onDelete( AjaxrequestTarget target );
}


final ListIColumn columns = new ArrayListIColumn();
columns.add(new AbstractColumn(new Model(Delete)) {
  public void populateItem(Item cellItem, String componentId, IModel
rowModel) {
Contact contact = ((Contact) rowModel.getObject());
cellItem.add(new  DeleteContactPanel(componentId, contact){
  public void onDelete( AjaxRequestTarget target ){
// Add table here and show flashmessage
info( Row deleted );
target.addComponent( feedback );
target.addComponent( datatable );
  }
});
  }
});


-- 
View this message in context: 
http://www.nabble.com/How-to-remove-a-row-from-DataTable--tp23312849p23313786.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 to remove a row from DataTable?

2009-04-30 Thread Mathias P.W Nilsson

Actually is the wicket coders that uses this style in amost every component. 
-- 
View this message in context: 
http://www.nabble.com/How-to-remove-a-row-from-DataTable--tp23312849p23315231.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: adding javascript to response

2009-04-23 Thread Mathias P.W Nilsson

If you have an AjaxSubmitLink you can do the following

public void onSubmit( AjaxRequestTarget target, Form form ){
   target.appendJavascript( alert( 'hi!' ); );
}
-- 
View this message in context: 
http://www.nabble.com/adding-javascript-to-response-tp23187923p23197512.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: ModalWindow Position

2009-04-23 Thread Mathias P.W Nilsson

You could maybe make your own javascript for the modal window

Wicket.Window.prototype.center = function() { 
  // Set your window here.
 }; 
-- 
View this message in context: 
http://www.nabble.com/ModalWindow-Position-tp23156615p23197519.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: Constructor not being called when Back button clicked

2009-04-01 Thread Mathias P.W Nilsson

Like matej says

@Override
protected void setHeaders(WebResponse response) { 
   response.setHeader(Pragma, no-cache); 
  response.setHeader(Cache-Control, no-cache, max-age=0,
must-revalidate, no-store); 

   } 
-- 
View this message in context: 
http://www.nabble.com/Constructor-not-being-called-when-Back-button-clicked-tp22827398p22829529.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: simple Link

2009-03-29 Thread Mathias P.W Nilsson

Have a look at source code of ExternalLink and Link to see the differens.
-- 
View this message in context: 
http://www.nabble.com/simple-Link-tp22760269p22766869.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



Compound property model

2009-03-27 Thread Mathias P.W Nilsson

Hi,


When testing this the user in the onSubmit is null. I load a list of
Connectors and make an CompoundPropertyModel for the list. Every connector
has a user. How can I achive this so that the list is populated with users
in the onSubmit()?

package se.sosalarm.planner.web.page.chain.connector;


import java.util.List;

import org.apache.wicket.ajax.AjaxRequestTarget;
import org.apache.wicket.ajax.markup.html.form.AjaxSubmitLink;
import org.apache.wicket.markup.html.WebPage;
import org.apache.wicket.markup.html.basic.Label;
import org.apache.wicket.markup.html.form.ChoiceRenderer;
import org.apache.wicket.markup.html.form.DropDownChoice;
import org.apache.wicket.markup.html.form.Form;
import org.apache.wicket.markup.html.list.ListItem;
import org.apache.wicket.markup.html.list.ListView;
import org.apache.wicket.model.CompoundPropertyModel;
import org.apache.wicket.model.IModel;
import org.apache.wicket.model.LoadableDetachableModel;
import org.apache.wicket.model.Model;
import org.apache.wicket.spring.injection.annot.SpringBean;

import se.sosalarm.planner.entities.chain.connector.Connector;
import se.sosalarm.planner.entities.user.User;
import se.sosalarm.planner.service.ConnectorService;
import se.sosalarm.planner.service.UserService;



public class ConfigureWindow extends WebPage {

private static final long serialVersionUID = 1L;

@SpringBean( name = connectorService )
private ConnectorService connectorService;

@SpringBean( name = userService )
private UserService userService;
   



public UserService getUserService() {
return userService;
}


public ConnectorService getConnectorService() {
return connectorService;
}


public void setConnectorService(ConnectorService connectorService) {
this.connectorService = connectorService;
}


private Connector connector;


public ConfigureWindow(final IModelConnector model) {
this.connector = model.getObject();

IModel imo = new LoadableDetachableModel(){

@Override
protected Object load() {
 return  getConnectorService().getChilds(connector);
}

};

   Form configureForm = new Form( configureForm );
   
   final ListView view = new ListView( userView ,  new
CompoundPropertyModel( imo ) ){

@Override
protected void populateItem(final ListItem item) {

item.setModel(new 
CompoundPropertyModel(item.getModel().getObject()));
final Connector c = (Connector) item.getModelObject();
IModel ju = new LoadableDetachableModel(){

@Override
protected Object load() {
return 
getUserService().getAvailableUsers( c );
}

};


DropDownChoice userChoice = new DropDownChoice( user, 
item.getModel(),ju  );
item.add( userChoice );
item.add( new Label( name ));
}
   
   };
   
   AjaxSubmitLink submit = new AjaxSubmitLink( submit , configureForm 
){

@Override
protected void onSubmit(AjaxRequestTarget target, Form? form) 
{
ListConnector connectors = 
(ListConnector)view.getModelObject();
System.out.println( view.getModelObject() );

for( Connector c : connectors ){
if( c.getUser() != null ){
System.out.println( c.getName() + : + 
c.getUser().getFullName() );
}

}

}
   
   };
   configureForm.add( submit );
   configureForm.add( view );
   add( configureForm );

}

   
}
-- 
View this message in context: 
http://www.nabble.com/Compound-property-model-tp22744472p22744472.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



AjaxTabbedPanel stopped working.

2009-03-21 Thread Mathias P.W Nilsson

Hi,

I know this code is long but for some reason my
AjaxTabbedPanel,link,onSubmit() is not getting called. 

package se.edgesoft.hairless.web.page.site.checkout;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
import java.util.LinkedList;
import java.util.List;

import org.apache.wicket.ajax.AjaxRequestTarget;
import org.apache.wicket.ajax.form.AjaxFormComponentUpdatingBehavior;
import org.apache.wicket.ajax.markup.html.AjaxLink;
import org.apache.wicket.ajax.markup.html.form.AjaxCheckBox;
import org.apache.wicket.ajax.markup.html.form.AjaxSubmitLink;
import org.apache.wicket.extensions.ajax.markup.html.tabs.AjaxTabbedPanel;
import org.apache.wicket.extensions.markup.html.tabs.AbstractTab;
import org.apache.wicket.markup.html.WebMarkupContainer;
import org.apache.wicket.markup.html.basic.Label;
import org.apache.wicket.markup.html.form.CheckBox;
import org.apache.wicket.markup.html.form.ChoiceRenderer;
import org.apache.wicket.markup.html.form.DropDownChoice;
import org.apache.wicket.markup.html.form.Form;
import org.apache.wicket.markup.html.form.TextField;
import org.apache.wicket.markup.html.link.BookmarkablePageLink;
import org.apache.wicket.markup.html.link.Link;
import org.apache.wicket.markup.html.panel.FeedbackPanel;
import org.apache.wicket.markup.html.panel.Fragment;
import org.apache.wicket.markup.html.panel.Panel;
import org.apache.wicket.model.CompoundPropertyModel;
import org.apache.wicket.model.IModel;
import org.apache.wicket.model.LoadableDetachableModel;
import org.apache.wicket.model.Model;
import org.apache.wicket.model.PropertyModel;
import org.apache.wicket.protocol.http.WebRequest;
import org.apache.wicket.spring.injection.annot.SpringBean;
import org.apache.wicket.validation.validator.EmailAddressValidator;
import org.apache.wicket.validation.validator.StringValidator;

import se.edgesoft.hairless.entities.cart.Cart;
import se.edgesoft.hairless.entities.cart.CartItem;
import se.edgesoft.hairless.entities.country.FreightCost;
import se.edgesoft.hairless.entities.item.Item;
import se.edgesoft.hairless.entities.item.SubItem;
import se.edgesoft.hairless.entities.item.attribute.Attribute;
import se.edgesoft.hairless.entities.order.Order;
import se.edgesoft.hairless.entities.order.OrderItem;
import se.edgesoft.hairless.entities.order.kreditor.KreditorOrder;
import se.edgesoft.hairless.entities.order.posten.PostenOrder;
import se.edgesoft.hairless.entities.presentation.Presentation;
import se.edgesoft.hairless.entities.presentation.PresentationType;
import se.edgesoft.hairless.entities.translation.Translation;
import se.edgesoft.hairless.entities.translation.TranslationType;
import se.edgesoft.hairless.entities.user.User;
import se.edgesoft.hairless.model.order.payment.DirectPayment;
import se.edgesoft.hairless.model.order.payment.IPayment;
import se.edgesoft.hairless.model.order.payment.KreditorException;
import se.edgesoft.hairless.model.order.payment.KreditorFactory;
import se.edgesoft.hairless.model.order.payment.KreditorPayment;
import se.edgesoft.hairless.model.order.payment.MonthlyKreditorPayment;
import se.edgesoft.hairless.model.order.payment.PaymentFactory;
import se.edgesoft.hairless.model.order.payment.PaymentMethod;
import se.edgesoft.hairless.model.order.posten.PostenPaymentMethod;
import se.edgesoft.hairless.model.presentation.PresentationManager;
import se.edgesoft.hairless.model.translation.Translator;
import se.edgesoft.hairless.model.translation.TranslatorManager;
import se.edgesoft.hairless.session.HairlessSession;
import se.edgesoft.hairless.utils.DateValidator;
import se.edgesoft.hairless.web.components.form.ForgotPassWordForm;
import se.edgesoft.hairless.web.components.form.NewUserForm;
import se.edgesoft.hairless.web.page.site.Base;
import se.edgesoft.hairless.web.page.site.OverviewablePage;
import se.edgesoft.hairless.web.page.site.customerservice.Terms;
import se.edgesoft.hairless.web.panels.cart.PurchaseItemPanel;

public class PurchasePage extends OverviewablePage{

AjaxTabbedPanel panel;
private IPayment payment;
PurchaseItemPanel immediateDeliveryPanel;
@SpringBean( name = PaymentFactory )
private PaymentFactory paymentFactory;
@SpringBean( name = KreditorFactory )
private KreditorFactory kreditorFactory;


private User user;

public KreditorFactory getKreditorFactory() {
return kreditorFactory;
}


public PaymentFactory getPaymentFactory() {
return paymentFactory;
}


public IPayment getPayment() {
return payment;
}


public void setPayment(IPayment payment) {
this.payment = payment;
}


public PurchasePage(){
Presentation presentation = new PresentationManager( getStore()
).getPresentation( PresentationType.CART );
Translation 

Re: AjaxTabbedPanel stopped working.

2009-03-21 Thread Mathias P.W Nilsson

Thanks! You really saved my day.
-- 
View this message in context: 
http://www.nabble.com/AjaxTabbedPanel-stopped-working.-tp22639328p22639422.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: Disable or hide tabs in AjaxTabbedpanel

2009-03-19 Thread Mathias P.W Nilsson

When hiding the link and the panel the li elements is still visible.
-- 
View this message in context: 
http://www.nabble.com/Disable-or-hide-tabs-in-AjaxTabbedpanel-tp22585946p22608409.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



Disable or hide tabs in AjaxTabbedpanel

2009-03-18 Thread Mathias P.W Nilsson

Hi,

I need a way to hide or disable a tab for certain conditions. Is there a way
of doing this with overriding newLink(java.lang.String linkId, int index) ?
I need to get this to work with ajax.

example.

User changes language and I need to disable or hide certain tabs.

-- 
View this message in context: 
http://www.nabble.com/Disable-or-hide-tabs-in-AjaxTabbedpanel-tp22585946p22585946.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



Explaination of Ajax in Wicket

2009-03-18 Thread Mathias P.W Nilsson

When using an ajaxlink my modelObjectAsString on a textField is always empty.

It is always set to where it was when the page was generated

package se.edgesoft.hairless.web.page.site.checkout;

import java.util.LinkedList;
import java.util.List;

import org.apache.wicket.ajax.AjaxRequestTarget;
import org.apache.wicket.ajax.form.AjaxFormComponentUpdatingBehavior;
import org.apache.wicket.ajax.markup.html.AjaxLink;
import org.apache.wicket.ajax.markup.html.form.AjaxSubmitLink;
import org.apache.wicket.extensions.ajax.markup.html.tabs.AjaxTabbedPanel;
import org.apache.wicket.extensions.markup.html.tabs.AbstractTab;
import org.apache.wicket.markup.html.WebMarkupContainer;
import org.apache.wicket.markup.html.form.ChoiceRenderer;
import org.apache.wicket.markup.html.form.DropDownChoice;
import org.apache.wicket.markup.html.form.Form;
import org.apache.wicket.markup.html.form.TextField;
import org.apache.wicket.markup.html.panel.Panel;
import org.apache.wicket.model.CompoundPropertyModel;
import org.apache.wicket.model.IModel;
import org.apache.wicket.model.LoadableDetachableModel;
import org.apache.wicket.model.Model;
import org.apache.wicket.spring.injection.annot.SpringBean;

import se.edgesoft.hairless.entities.presentation.Presentation;
import se.edgesoft.hairless.entities.presentation.PresentationType;
import se.edgesoft.hairless.entities.translation.Translation;
import se.edgesoft.hairless.entities.translation.TranslationType;
import se.edgesoft.hairless.entities.user.User;
import se.edgesoft.hairless.model.order.payment.IPayment;
import se.edgesoft.hairless.model.order.payment.KreditorFactory;
import se.edgesoft.hairless.model.order.payment.KreditorPayment;
import se.edgesoft.hairless.model.order.payment.PaymentFactory;
import se.edgesoft.hairless.model.order.payment.PaymentMethod;
import se.edgesoft.hairless.model.presentation.PresentationManager;
import se.edgesoft.hairless.model.translation.TranslatorManager;
import se.edgesoft.hairless.web.page.site.OverviewablePage;

public class PurchasePage extends OverviewablePage{

AjaxTabbedPanel panel;
private IPayment payment;
@SpringBean( name = PaymentFactory )
private PaymentFactory paymentFactory;
@SpringBean( name = KreditorFactory )
private KreditorFactory kreditorFactory;

public KreditorFactory getKreditorFactory() {
return kreditorFactory;
}


public PaymentFactory getPaymentFactory() {
return paymentFactory;
}


public IPayment getPayment() {
return payment;
}


public void setPayment(IPayment payment) {
this.payment = payment;
}


public PurchasePage(){
Presentation presentation = new PresentationManager( getStore()
).getPresentation( PresentationType.CART );
Translation translation = new TranslatorManager( getStore()
).getTranslation( TranslationType.CART );
setBackground( presentation );
addOverview( translation, presentation );
addPromotion( true );

IModel countryModel = new LoadableDetachableModel(){

@Override
protected Object load() {
return getCountryDao().getCountries();
}

};

IModel userModel = new LoadableDetachableModel(){

@Override
protected Object load() {
return new  User();
}

};

final Form purchaseForm = new Form( purchase.form );
add( purchaseForm );

final WebMarkupContainer userContainer = new WebMarkupContainer(
userContainer,new CompoundPropertyModel(userModel)){
@Override
public boolean isVisible(){
if( ! isLoggedIn() ) return false;

return true;
}

};
userContainer.setOutputMarkupId( true );


final DropDownChoice country = new DropDownChoice( country ,
countryModel, new ChoiceRenderer( name , name) );
country.add( new AjaxFormComponentUpdatingBehavior( onchange 
){

@Override
protected void onUpdate(AjaxRequestTarget target) {
target.addComponent( panel );
}

});

final TextField firstName = new TextField( firstName );
firstName.setOutputMarkupId( true );
   

Re: Explaination of Ajax in Wicket

2009-03-18 Thread Mathias P.W Nilsson

After chaning all my AjaxLink to AjaxSubmitLink it works a little better,
still some questions.

Why can't I use ajaxLink here? 

another question on Ajax and wicket.

Let's say I have a MarkupContainer with some fields. This is contained in
another MarkupContainer. When switching tab I want to hide the inner
Markupconteiner.
All containers have setOutputMarkupId( true ). The Container is not hidden. 
-- 
View this message in context: 
http://www.nabble.com/Explaination-of-Ajax-in-Wicket-tp22589797p22592154.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: Explaination of Ajax in Wicket

2009-03-18 Thread Mathias P.W Nilsson

Ok, I got it to work but I'm still rather confused. 
-- 
View this message in context: 
http://www.nabble.com/Explaination-of-Ajax-in-Wicket-tp22589797p22592233.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



XML localization

2009-03-05 Thread Mathias P.W Nilsson

I've tried search the forum and googled but no answer so I'll give it a try.

A while ago we needed to implement a new language to our wicket site. We
changed from .properties to .xml to get this to work.

The problem is that some things has stopped working. Consider the following

We have a textfield in a form that needs to be required. In our .properties
file I added

form.email.Required=Please fill in email

when doing this is a .xml it does not work.

form.email.Required ( not working )
email.Required ( not working )
Required ( working )

Any comments?
-- 
View this message in context: 
http://www.nabble.com/XML-localization-tp22349788p22349788.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: Model on Select

2009-02-13 Thread Mathias P.W Nilsson

After switching from Select and SelectOption to DropDownChoice it works.
Maybe there is a problem with my Select code or there is a wicket bug.

// Mathias
-- 
View this message in context: 
http://www.nabble.com/Model-on-Select-tp21973981p21994805.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: Adding/Replacing links in Panels

2009-02-13 Thread Mathias P.W Nilsson

Hi,

I guess there could be other ways to do this better. Try using break after
each case. 

switch( comp ){
  case ROLE:
break;
}

If you don't use break the link will be added twice
-- 
View this message in context: 
http://www.nabble.com/Adding-Replacing-links-in-Panels-tp21989041p21994847.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



What's your take on handling markup in properties, html, wicket

2009-02-13 Thread Mathias P.W Nilsson

Hi,

Just wondering how this should be handled without DRY.

In many scenarios we have multiple languages that should have the same
markup but different text. This could be handled by using variation and put
every language in an own html file like myWicketPage_style_en.html.

However, this is not the optimal way and I don't think variation is made for
this either. It would be very annoing having 14 different html files if we
have 14 different languages that we should support. 

Sometimes the languages should look different ( not the same look. Different
positioning of elements ) and here we could use variation. As far as I'm
concerned this is not the right way of handling look and feel. Different css
should be used instead and then place position, coloring of the markup in a
css. The html file should be the same and the css should handle the layout. 
Take a look at  http://www.csszengarden.com/ http://www.csszengarden.com/ 

Every time I'm dealing with multiple languages the user wants bold, italic,
color in the text. Many times a list will appear just containing text. (
Nothing to do with extracting data from database and let wicket handle it )
This could be added in a properties file but then we would have bold tags,
italic and style tags in the properties file. If something should change we
need to go thru 14 properties files to change the markup in the properties.

Let's say we have the following text in many different languages. Some
markup is changed so you know what I mean.

boldWelcome to our company/boldbrbrHere is some long
text.ullisome [BOLD]text[/BOLD]/liliother text/li/ul

Now imaging this text to be very long.

Now, my question is this. How do you handle tagged markup for different
languages without repeating markup tags.

* Variation and the text in the html file.
* different properties file with markup in it
* Other technique?


-- 
View this message in context: 
http://www.nabble.com/What%27s-your-take-on-handling-markup-in-properties%2C-html%2C-wicket-tp21995782p21995782.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: Model on Select

2009-02-13 Thread Mathias P.W Nilsson

That may be the case but I have already tried that and it does not solve my
problem. 
-- 
View this message in context: 
http://www.nabble.com/Model-on-Select-tp21973981p22001539.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: Model on Select

2009-02-13 Thread Mathias P.W Nilsson

Thanks anyway for your time, but I think I will stick to DropDownChoice for
now. 
-- 
View this message in context: 
http://www.nabble.com/Model-on-Select-tp21973981p22001718.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: What's your take on handling markup in properties, html, wicket

2009-02-13 Thread Mathias P.W Nilsson

It would be a lot of split ups in the properties files and a lot of
wicket:message but I guess it is the best way when separation markup from
pure text. 

This is always a problem. I'm dealing with the same concern when a user
want's to add html markup to a news that is saved in the database. 

The best way would be to always have pure text and then some aspects on
marking it up but I don't see how that could be accomplished.

-- 
View this message in context: 
http://www.nabble.com/What%27s-your-take-on-handling-markup-in-properties%2C-html%2C-wicket-tp21995782p22001969.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: Model on Select

2009-02-13 Thread Mathias P.W Nilsson

Hi again,

I created a small project with wicket extension and here it worked fine,
even if I used setReuseItems( false ).

So the problem must be in my code somewere. 
-- 
View this message in context: 
http://www.nabble.com/Model-on-Select-tp21973981p22002751.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



Model on Select

2009-02-12 Thread Mathias P.W Nilsson

Hi,

I'm using CompoundPropertyModel on a form. When using with SelectOption I
can't set the selected index.
The none select option is there to add a none to the list. How can I set
the selected option in the listview? Any Pointers?

 materialCategoryInformation = new Select(materialCategoryInformation );
materialCategoryInformation.add(new SelectOption(none, new
Model(/*NULL*/)));
materialCategoryInformation.setRequired(true);
materialCategoryInformation.setOutputMarkupId( true );

ListView materialCategoryList = new ListView( materialCategoryList
, materialCategoryModel ){
private static final long serialVersionUID = 1L;

@Override
protected void populateItem( final ListItem item ){
item.setRenderBodyOnly( true );
final CodedChainInformation codedInformation =
(CodedChainInformation) item.getModelObject();

SelectOption option = new SelectOption( option , new 
Model(
(Serializable) item.getModelObject() )){
private static final long 
serialVersionUID = 1L;

@Override
protected void onComponentTagBody( MarkupStream 
markupStream,
ComponentTag tag ){
String name = 
codedInformation.getName();
if( ! codedInformation.isSeparator() )
name = nbsp;nbsp; + name;
replaceComponentTagBody(markupStream, 
tag, name  );

}
};

item.add( option );

if( codedInformation.isSeparator() ){
option.add( new SimpleAttributeModifier( 
class , separator
));
}else{
option.add( new SimpleAttributeModifier( 
class , sub ) );
}


}
};
-- 
View this message in context: 
http://www.nabble.com/Model-on-Select-tp21973981p21973981.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: Model on Select

2009-02-12 Thread Mathias P.W Nilsson

Odd, the first time ever I access the page the select option is set otherwise
it is not.
-- 
View this message in context: 
http://www.nabble.com/Model-on-Select-tp21973981p21975007.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: Model on Select

2009-02-12 Thread Mathias P.W Nilsson

How is this possible.

The first time my web container is loaded and I access the page all
dropdowns and Select are set according to the values that my class has( new
CompoundPropertyModel( new Model( myClass ) ) ). When returning to this page
a second time the Select is not set. I have tried all that I can come up
with. 

Any pointers? 
-- 
View this message in context: 
http://www.nabble.com/Model-on-Select-tp21973981p21981372.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: AjaxFallbackDefaultDataTable and AjaxLink

2009-02-02 Thread Mathias P.W Nilsson

Why should it be strange to edit properties for let's say a user in a modal
window?
-- 
View this message in context: 
http://www.nabble.com/AjaxFallbackDefaultDataTable-and-AjaxLink-tp21687636p21797485.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: UTF-8 bug in wicket? Or in Tomcat?

2009-01-29 Thread Mathias P.W Nilsson

Do you save it to a database and then display the text? How do you present
it?
-- 
View this message in context: 
http://www.nabble.com/UTF-8-bug-in-wicket--Or-in-Tomcat--tp21738467p21738754.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



AjaxFallbackDefaultDataTable and AjaxLink

2009-01-27 Thread Mathias P.W Nilsson

Hi,

I have override the newRowItem for the AjaxFallbackDefaultDataTable to make
the entire row clickable. ( return new ClickableItem ). Can anyone help me
with some pointers in how to make the row open a model window for editing. 

// Mathias
-- 
View this message in context: 
http://www.nabble.com/AjaxFallbackDefaultDataTable-and-AjaxLink-tp21687636p21687636.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: Developing environment with wicket

2009-01-21 Thread Mathias P.W Nilsson

Thanks for the quick response. Will I be able to use Spring, jax-ws with this
with the hair I have lest intact :)
-- 
View this message in context: 
http://www.nabble.com/Developing-environment-with-wicket-tp21589337p21590117.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



Advice on payment options with wicket

2009-01-14 Thread Mathias P.W Nilsson

Hi,

I have developed an application with wicket that has been around for about a
year. A user can have serveral options for payment - Visa, MasterCard, Post
parcel, invoice( several diffrent ) and some banks.

My problem is that if the user choose visa, mastercard then a form should be
filled with data and sent to a servlet not managed by me. For invoice and
banking different data also sent to a servlet and post parcel to a wicket
page.

The user should onlysee a ListView of choices but the code becomes really
spagettyish. Especially since some of the payments requires price updates
and modal window checking for social security number. Some advice on how to
implement this with wicket would be really greatful without a 4000 rows
wicket page. 


-- 
View this message in context: 
http://www.nabble.com/Advice-on-payment-options-with-wicket-tp21452753p21452753.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: Advice on payment options with wicket

2009-01-14 Thread Mathias P.W Nilsson

The main problem is the external form. I need to send the form to an external
server. Since I need wicket to check the form first I need a wicket form and
then a plain html form. The form is submitted when all the data is checked.
Since there is 10 different forms the webpage get's cluttered. Is there a
way to make external form from wicket? 
-- 
View this message in context: 
http://www.nabble.com/Advice-on-payment-options-with-wicket-tp21452753p21459848.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



IllegalstateException with Hybrid strategy

2009-01-14 Thread Mathias P.W Nilsson

I get this error a lot

java.lang.IllegalStateException: URL fragment has unmatched key/value pair:
id/3
9258/sort/refilled/favicon

The favicon must be requested by some user or spider. Anyone know how to get
around this?
-- 
View this message in context: 
http://www.nabble.com/IllegalstateException-with-Hybrid-strategy-tp21460864p21460864.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: Advice on payment options with wicket

2009-01-14 Thread Mathias P.W Nilsson

This is what I'm doing ( via an javascript call from wicket ajax after the
form is validated). Problem is that the model must be emptied when the form
is submitted ( cart, order ) and then the page get's rerendered. It's all
fussy. 

10 forms in the same page. Must be a smarter solution.
-- 
View this message in context: 
http://www.nabble.com/Advice-on-payment-options-with-wicket-tp21452753p21461128.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: [OT] wicket users around the world

2008-12-26 Thread Mathias P.W Nilsson

Munkedal, Sweden.

I used wicket for 2 intranet projects and one external project.

http://www.boardstore.se http://www.boardstore.se 
http://www.eddyemery.com http://www.eddyemery.com 

They both run the same wicket code.
-- 
View this message in context: 
http://www.nabble.com/-OT--wicket-users-around-the-world-tp20962108p21174081.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: getting page expired

2008-12-09 Thread Mathias P.W Nilsson

What does userMap( userName ) returns? Make sure it is an object that
implements serializable.

-- 
View this message in context: 
http://www.nabble.com/getting-page-expired-tp20921513p20923466.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: getting page expired

2008-12-09 Thread Mathias P.W Nilsson

Are there any loggers in the class? When using private Logger logger =
Logger.getLogger(this.getClass());
this might cause pag expired. If it is contained in a wicket web page. At
least I know some of my collegues has got this a while ago. I'm not familiar
with WASP so there might be someone else that can help you.
-- 
View this message in context: 
http://www.nabble.com/getting-page-expired-tp20921513p20923599.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Create custom UrlCodingStrategy

2008-12-03 Thread Mathias P.W Nilsson

Is there no solution to this?

this is my app ( http://localhost/myapp ). All I want is to be able to have
a customer name after myapp that follows in the application.
-- 
View this message in context: 
http://www.nabble.com/Create-custom-UrlCodingStrategy-tp20660813p20812776.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Create custom UrlCodingStrategy

2008-12-03 Thread Mathias P.W Nilsson

Also you must handle the second parameter /login maybe by switching different
panels or redirect to another page ! 

How should this be done? I must keep the customer/customerId in every page.
What happens when redirecting?
-- 
View this message in context: 
http://www.nabble.com/Create-custom-UrlCodingStrategy-tp20660813p20813923.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Create custom UrlCodingStrategy

2008-12-03 Thread Mathias P.W Nilsson

Problem is this

setResponsePage(new LoginPage(moreParam); 

will not generate an url like http://localhost/myapp/customer1/login.
-- 
View this message in context: 
http://www.nabble.com/Create-custom-UrlCodingStrategy-tp20660813p20814520.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Create custom UrlCodingStrategy

2008-12-02 Thread Mathias P.W Nilsson

Nope this is not what I mean!

What if I want to mount /events to Event.class and 100 customers needs to
use the same page with different variation?

when the user attempts http://localhost/myapp/test/events/ ( test is the
customer name ) then it should invoke /events.
http://localhost/myapp/test2/events should invoke the same page but with the
test2 customers variation. I do not want to mount test2/events , test/events
since there could be 100 customers that uses this. ( imaging doing this for
all classes and all customers ) I need a way to check the customer name set
variation in the session. 


-- 
View this message in context: 
http://www.nabble.com/Create-custom-UrlCodingStrategy-tp20660813p20792180.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Create custom UrlCodingStrategy

2008-12-02 Thread Mathias P.W Nilsson

Ok

Is there any topic on UrlRewriteFilter and Wicket. I still need to set
variation and locale even when I use UrlRewriteFilter. 
-- 
View this message in context: 
http://www.nabble.com/Create-custom-UrlCodingStrategy-tp20660813p20793471.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Create custom UrlCodingStrategy

2008-12-02 Thread Mathias P.W Nilsson

Thanks!

I will look at this and maybe come back on the subject. One problem that I
saw was that the request didn't get printed in the UrlCodingStrategy because
it was not mounted in init. Maybe I'm wrong about this and need to look it
over again.
-- 
View this message in context: 
http://www.nabble.com/Create-custom-UrlCodingStrategy-tp20660813p20794183.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Create custom UrlCodingStrategy

2008-12-02 Thread Mathias P.W Nilsson

Nope!

I'm lost here. How can I create my own IRequestTargetUrlCodingStrategy when
I need to add a mount path. The mount path is not the same as the page
requested.

Let me explain this more in detail. 

I wan't to mount Base.class to /login. But I need to access the /login thru
/Customer1/login and /Customer2/login. I can't mount every possible customer
reference in init(). 
-- 
View this message in context: 
http://www.nabble.com/Create-custom-UrlCodingStrategy-tp20660813p20794194.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Create custom UrlCodingStrategy

2008-12-02 Thread Mathias P.W Nilsson

Thank you very much but I'm afraid I can't use apache as a front end due to
the server setup. I need a way to do this in wicket. 

-- 
View this message in context: 
http://www.nabble.com/Create-custom-UrlCodingStrategy-tp20660813p20801209.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Create custom UrlCodingStrategy

2008-12-02 Thread Mathias P.W Nilsson

To clarify things. It's something like in this post that I'm after. Get the
customer from db

See Dmitry Kandalov post

http://www.nabble.com/mounting-large-number-of-url-td13972929.html#a14010271
http://www.nabble.com/mounting-large-number-of-url-td13972929.html#a14010271 
-- 
View this message in context: 
http://www.nabble.com/Create-custom-UrlCodingStrategy-tp20660813p20804484.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Create custom UrlCodingStrategy

2008-11-24 Thread Mathias P.W Nilsson

Hi,

I need some info in how to create my own UrlCodingStrategy

This is the preconditions.
I have a database with 20 - 100 customers that needs to access this
application. Every customer has it's own properties files and css variation.

What I want is that let's say Edgesoft wants to use the application. Then
the user will access
http://localhost/app/edgesoft

If I want to mount Base.class I do not want to do /edgesoft/base only base
and the UrlCodingStrategy will handle the rest for me. Check if the customer
exists, set variation and then continue with the request.

An example. 
http://localhost/edgesoft/order/order/13
http://localhost/another/order/order/14
mount( MyStrategy( /order/ ,  );

This should go to the exact same page but with different variation and
properties. How can this be achieved. What classes do I need to subclass to
make this happen? 
-- 
View this message in context: 
http://www.nabble.com/Create-custom-UrlCodingStrategy-tp20660813p20660813.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: mount outside init

2008-11-22 Thread Mathias P.W Nilsson

Thanks!

Yes I am but with no success.

My application can be accessed in http://localhost:8080/myapp

now after my app I need to get the customer path and keep it in every
request. So if the user request login the path should be
http://localhost:8080/myapp/customer1/login. And If the user who can have
access to a lot of customers changes it to
http://localhost:8080/myapp/customer2 then css, properties and a lot of
other data should be changed. 

Now some Customers have languages in their path so a customerpath could be
http://localhost:8080/myapp/customer1/sv/. To use a strategy here is not
very obvious. Any other pointers would be greatly appreciated.
-- 
View this message in context: 
http://www.nabble.com/mount-outside-init-tp20619679p20635711.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



mount outside init

2008-11-21 Thread Mathias P.W Nilsson

Hi!

I'm building an application where I want to set variation and other settings
determined by the path

lets say a user request myapplication/customer1

I want to mount /customer1 to Base.class. I can do this in init by what if I
add another customer via admin. How can I mount /customer2 outside of the
init method of the wicket application class?

Another question would be to keep the /customer1 or /customer2 in every
request so if I call setResponsePage( new Login() ) then I would like to
keep /customer1/login. Any suggestions?
-- 
View this message in context: 
http://www.nabble.com/mount-outside-init-tp20619679p20619679.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: mount outside init

2008-11-21 Thread Mathias P.W Nilsson

Yes it make sence but I would not want a pair here.

I would like http//sub.domain.com/customer1

not http//sub.domain.com/customer/customer1
-- 
View this message in context: 
http://www.nabble.com/mount-outside-init-tp20619679p20620631.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: mount outside init

2008-11-21 Thread Mathias P.W Nilsson

I can't get this to work.

IF I do /customer1 then wicket tries to find a mount with this. 
-- 
View this message in context: 
http://www.nabble.com/mount-outside-init-tp20619679p20621876.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: setOutputMarkupId and Ajax

2008-10-05 Thread Mathias P.W Nilsson

No, I understand. An eclipse plugin could solve a lot of this issues. An
Wicket view that could warn, etc for all things that could go wrong.

I understand now why the programmer needs to set the output and not the
framework
-- 
View this message in context: 
http://www.nabble.com/setOutputMarkupId-and-Ajax-tp19802839p19822392.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



POI HSSFSheet to ListView

2008-09-30 Thread Mathias P.W Nilsson

Hi!

I have alot of Excel documents that I want to present using Wicket and POI.
The problem is that I don't know how to get started using this.

Here is a simple loop on how to extract cells.

InputStream inp = new FileInputStream(workbook.xls);
HSSFWorkbook wb = new HSSFWorkbook(new POIFSFileSystem(inp));
HSSFSheet sheet = wb.getSheetAt(0);
for (Iterator rit = sheet.rowIterator(); rit.hasNext(); ) {
  row = (HSSFRow)rit.next();
  for (Iterator cit = row.cellIterator(); cit.hasNext(); ) {
HSSFCell cell = (HSSFCell)cit.next();
if( cell.getCellType() == HSSFCell.CELL_TYPE_STRING ){
  System.out.println( cell.getRichStringCellValue().getString() );
}
  }
}
-- 
View this message in context: 
http://www.nabble.com/POI-HSSFSheet-to-ListView-tp19739001p19739001.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: POI HSSFSheet to ListView

2008-09-30 Thread Mathias P.W Nilsson

Oh I forgot. I solved it already.

// Mathias
-- 
View this message in context: 
http://www.nabble.com/POI-HSSFSheet-to-ListView-tp19739001p19749515.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Need to add tool tip for hyper link

2008-09-29 Thread Mathias P.W Nilsson

http://wicketstuff.org/confluence/display/STUFFWIKI/wicketstuff-minis-prototip
Prototip 
-- 
View this message in context: 
http://www.nabble.com/Need-to-add-tool-tip-for-hyper-link-tp19730615p19731592.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Best approach dealing with error

2008-09-20 Thread Mathias P.W Nilsson

Hi!

I often get this messages when the application has been running 10-50
minutes.
I don't know how to track it down.

15:08:33,920 ERROR [RequestCycle] Internal error parsing wicket:interface =
:6
org.apache.wicket.WicketRuntimeException: Internal error parsing
wicket:interfac
e = :6
at
org.apache.wicket.protocol.http.request.WebRequestCodingStrategy.addI
nterfaceParameters(WebRequestCodingStrategy.java:583)
at
org.apache.wicket.protocol.http.request.WebRequestCodingStrategy.addI
nterfaceParameters(WebRequestCodingStrategy.java:554)
at
org.apache.wicket.protocol.http.request.WebRequestCodingStrategy.deco
de(WebRequestCodingStrategy.java:199)
at org.apache.wicket.Request.getRequestParameters(Request.java:171)
at org.apache.wicket.RequestCycle.step(RequestCycle.java:1229)
at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1349)
at org.apache.wicket.RequestCycle.request(RequestCycle.java:493)
at
org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:
387)
at
org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.ja
va:199)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:206)
at
org.springframework.orm.jpa.support.OpenEntityManagerInViewFilter.doF
ilterInternal(OpenEntityManagerInViewFilter.java:111)
at
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerR
equestFilter.java:75)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:206)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
alve.java:233)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
alve.java:175)
at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(Authentica
torBase.java:525)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
ava:128)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
ava:102)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
ve.java:109)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.jav
a:286)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java
:844)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.proce
ss(Http11Protocol.java:583)
at
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:44
7)
at java.lang.Thread.run(Thread.java:619)

-- 
View this message in context: 
http://www.nabble.com/Best-approach-dealing-with-error-tp19585579p19585579.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Best approach dealing with error

2008-09-20 Thread Mathias P.W Nilsson

Yes, but I don't get these exceptions local. It is when the application is
deployed so I wont be able to set 
any breakpoints.
-- 
View this message in context: 
http://www.nabble.com/Best-approach-dealing-with-error-tp19585579p19586354.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Best approach dealing with error

2008-09-20 Thread Mathias P.W Nilsson

Thank you. I will look into this right now.
-- 
View this message in context: 
http://www.nabble.com/Best-approach-dealing-with-error-tp19585579p19586484.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



CSS and variation

2008-09-18 Thread Mathias P.W Nilsson

I'm looking at  http://www.csszengarden.com CSS Zengarden  that uses the same
html markup and only alters the css. I would like to use variation like this
and I'm wondering what my approach should be?

I set Session.setVariation( String variation ) in my session object
I have the same java and html file
How can I create different variation of css files?

// Mathias
-- 
View this message in context: 
http://www.nabble.com/CSS-and-variation-tp19554325p19554325.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: CSS and variation

2008-09-18 Thread Mathias P.W Nilsson

Maybe I should also say that my css files isn't in the container. They are
served thru another servlet. All files are external and is located on a file
server. 

so the /resources/class/. doesn't work for me.
-- 
View this message in context: 
http://www.nabble.com/CSS-and-variation-tp19554325p19554767.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Question on markup and wicket page

2008-09-17 Thread Mathias P.W Nilsson

Some very annoing designers is messing things up :) 

Here's the thing. I'm designing the wicket pages and a  common thing is to
add a css attribute to a ListView.
Something like listItem.add( AttributeModifier( myClass , .. to make a
row red, something bold etc.

My problem is that if there a several css  designers ( non java ), then
every now and then they deside to throw away the css class and are not aware
of that it's needed in wicket to markup the list.

They only see the html markup and the css in there and do a css clean not
realizing that the css class is needed.

Sometimes we're not in the same office so it's a little frustrating to
always tell them. What is the proper way of doing this? How can I get rid of
this gap between css designers and wicket designers?

Sometimes I try to add css as a header contribution in the wicket page but
then the designer wondering why their css don't work. 

Pointers?

-- 
View this message in context: 
http://www.nabble.com/Question-on-markup-and-wicket-page-tp19542131p19542131.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Question on markup and wicket page

2008-09-17 Thread Mathias P.W Nilsson

Thanks.

I used this a while but after multiple markup inheritance I just didn't see
the point because the markup don't look like in runtime anyways. 

After reading Wicket In Action I realized that for this to work properly
you'd have to create a lot of wicket:remove tags. 

Very often you will keep the images outside the container in a shared file
server or something like that and have tomcat, apache or a servlet to serve
the static files. This will not work if the designer just opens the html
file in a browser.

I would very much value your opinion in how to avoid this. A css designer
may not even have eclipse, netbeans or any other programming IDE rather some
other tool for css:ing. So stopping and starting tomcat, jboss would be out
of the question. 

How do you solve this? 


-- 
View this message in context: 
http://www.nabble.com/Question-on-markup-and-wicket-page-tp19542131p19543235.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Question on markup and wicket page

2008-09-17 Thread Mathias P.W Nilsson

Great Idé. And a plugin that deals with some things :)

The only plugin to eclipse that I know of is Panda( ... I think ) that let's
you create a new Wicket page and Panel and the markup is created for you.
Now. It would be nice to have a plugin that when you're in markup mode
only let you deal with markup and the wicket:id can not be touched. Locked.
When adding a new Component in java mode the markup is changed at the same
time. 

This would take care of the russian doll crush. I.e that a designer takes
a label out of a wicket container. And crashes the whole application. If the
wicket tags can't be touched the russian doll will be preserved.

-- 
View this message in context: 
http://www.nabble.com/Question-on-markup-and-wicket-page-tp19542131p19544123.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Bookmarkable PagingNavigation

2008-09-09 Thread Mathias P.W Nilsson

Yes, thanks I have read that post serveral times!

Finally managed to get the thing working. Not pretty parsing the pageing
parameters and adding the 
page but it works. Thanks!
-- 
View this message in context: 
http://www.nabble.com/Bookmarkable-PagingNavigation-tp19382751p19389690.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Problem with search and get urls

2008-09-08 Thread Mathias P.W Nilsson

I have a problem with NonVersionedHybridUrlCodingStrategy mounting.

When searching for items a url can result in this

http://localhost:8080/hairless-web/items/search/refilled...

the user searched for refilled... 
Whenever I have a more than one . in the url the following error appears.'
This does not appear when using QueryStringUrlCodingStrategy.

java.lang.IllegalStateException: Empty string name for pagemaps is not
allowed
org.apache.wicket.PageMap.init(PageMap.java:89)

org.apache.wicket.protocol.http.SecondLevelCacheSessionStore$SecondLevelCachePageMap.init(SecondLevelCacheSessionStore.java:248)

org.apache.wicket.protocol.http.SecondLevelCacheSessionStore$SecondLevelCachePageMap.init(SecondLevelCacheSessionStore.java:189)

org.apache.wicket.protocol.http.SecondLevelCacheSessionStore.createPageMap(SecondLevelCacheSessionStore.java:675)
org.apache.wicket.Session.newPageMap(Session.java:911)
org.apache.wicket.Session.pageMapForName(Session.java:931)
org.apache.wicket.PageMap.forName(PageMap.java:67)
org.apache.wicket.Page.init(Page.java:1168)
org.apache.wicket.Page.init(Page.java:237)
org.apache.wicket.markup.html.WebPage.init(WebPage.java:184)

org.apache.wicket.markup.html.pages.ExceptionErrorPage.init(ExceptionErrorPage.java:55)

org.apache.wicket.request.AbstractRequestCycleProcessor.respond(AbstractRequestCycleProcessor.java:163)
org.apache.wicket.RequestCycle.step(RequestCycle.java:1298)
org.apache.wicket.RequestCycle.steps(RequestCycle.java:1349)
org.apache.wicket.RequestCycle.request(RequestCycle.java:493)

org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:387)

org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:199)

org.springframework.orm.jpa.support.OpenEntityManagerInViewFilter.doFilterInternal(OpenEntityManagerInViewFilter.java:111)

org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:75)

-- 
View this message in context: 
http://www.nabble.com/Problem-with-search-and-get-urls-tp19380336p19380336.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Problem with search and get urls

2008-09-08 Thread Mathias P.W Nilsson

Shouldn't . characters be supressed in the HybridUrlCodingStrategy?
-- 
View this message in context: 
http://www.nabble.com/Problem-with-search-and-get-urls-tp19380336p19381312.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Bookmarkable PagingNavigation

2008-09-08 Thread Mathias P.W Nilsson

I've read some post on forum users wanting to use Bookmarkable page links in
their PagingNavigation. 
Now, I'm one of them :)

Google spider can index my wicket application using my PagingNavigation. 
Has anyone come up with an idé on solving this? Any pointers on how to
achieve without having to reimplement PagingNavigationLink,
PagingNavigationLinkIncrementLink?

-- 
View this message in context: 
http://www.nabble.com/Bookmarkable-PagingNavigation-tp19382751p19382751.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Bookmarkable PagingNavigation

2008-09-08 Thread Mathias P.W Nilsson

The IPageable setCurrentPage() must be set when requesting PageParameters,
any suggestions?

This is what I have in mind. For every newPagingNavigationIncrementLink
append the page parameters and the correct page number. 

 
-- 
View this message in context: 
http://www.nabble.com/Bookmarkable-PagingNavigation-tp19382751p19384054.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Bookmarkable PagingNavigation

2008-09-08 Thread Mathias P.W Nilsson

The pageable.setCurrentPage(getPageNumber()); is set in the onClick method of
a PagingNavigationIncrementLink  or  PagingNavigationLink. How can I set the
currentPage when using BookmarkableLink?


-- 
View this message in context: 
http://www.nabble.com/Bookmarkable-PagingNavigation-tp19382751p19384458.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Mount files outside container

2008-09-01 Thread Mathias P.W Nilsson

I will look into this immediately. 
-- 
View this message in context: 
http://www.nabble.com/Mount-files-outside-container-tp19232069p19252473.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Panel with css styling

2008-09-01 Thread Mathias P.W Nilsson

Hi!

I often come across this problem. A panel, let's say for checkout. ( So that
a user knows wich step he/she is in) 
1. Cart 
2. address 
3. payment and delivery 
4. control order 
5. receipt

This panel should be on top of each page showing the purchase steps. Of
course then the user is at step 3 the ( 3. Payment and delivery ) should be
highlighted in some way.

What is your approach on solving this.

What I have done so far is something like this.

Create a panel with the steps in
in every page do something like

CheckoutPanel p = new CheckoutPanel();
add( p ); // Add panel to page
p.setActiveTab( 2 ) ; ... cssing the tab

Can anyone give any suggestions on this. This is not very maintainable.

Let's say I want to change the order of the tabs, Add extra tabs,  then I
have to go into all pages and add, alter the index. I could of course use a
string instead but I have a feeling this could be solved in a much better
way. Suggestions?

The tabs are not clickable but could of course be a link panel of some sort.
Almost every site  has one or many panels like this. A menu that should be
added on each page and highlighting the link that the user is currently
using. Like border in some way.
-- 
View this message in context: 
http://www.nabble.com/Panel-with-css-styling-tp19256267p19256267.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Panel with css styling

2008-09-01 Thread Mathias P.W Nilsson

Thanks!

I have tested Igors idé and this is what I have so far

public abstract class CheckoutStepPanel extends Panel{
private static final long serialVersionUID = 1L;
public String CSS_ACTIVE_STEP = selected;

/**
 * Add Steps as enum. If the Checkout changes then 
 * A serious amount of refactoring must be done
 */
public enum Step{
CART( checkout.step.cart ),
ADDRESS( checkout.step.address ),
PAYMENT( checkout.step.payment ),
CONTROL( checkout.step.control ),
RECEIPT( checkout.step.receipt );

private String resourceKey;

Step( String resourceKey ){
this.resourceKey = resourceKey;
}
public String getResourceKey(){
return this.resourceKey;
}
}
// TODO: Add back navigation if the active step is minor to the current
step
public CheckoutStepPanel( String id ){
super( id );
add( new ListView( steps , Arrays.asList( Step.values()  ) ){
private static final long serialVersionUID = 1L;
@Override
protected void populateItem(ListItem listItem ) {
Step step = ( Step ) listItem.getModelObject();
Label item = new Label( step, new 
ResourceModel( step.getResourceKey()
) );
if( getActiveStep().equals( step ) ){
// Support multiple css classes
item.add( new AttributeAppender( 
class, new Model( CSS_ACTIVE_STEP ),
  ));
}
listItem.add( item );
}
} );

}

protected abstract Step getActiveStep(); 

}

Implementation

add( new CheckoutStepPanel( Steper ){
   @Override
   protected Step getActiveStep() {
  return Step.ADDRESS;
   }
});

I have made the steps in an enum because I can't just add another step
without adding a new page, markup etc.

Questions:
1. Is the resource implementation ok?
2. Other suggestions?




-- 
View this message in context: 
http://www.nabble.com/Panel-with-css-styling-tp19256267p19257876.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Mount files outside container

2008-09-01 Thread Mathias P.W Nilsson

I still have struggle with this image, flash, files and Wicket

Here is my problem.

I have all my css files, images, flashes pdf etc in a dir let's say 

c:/mydir/

To access these files from my webapp I have created a Servlet that get the
files from my dir outside of the container using this path
/Files/myimage.gif

In my web.xml I have the servlet  url-pattern/Files/*/url-pattern

The reasone I have the files outside the container is so that the css, files
can be changed without having to deploy the war file again or that the css
is Changed in the container but after redeploying the changes is lost
because of a designer changing the css.

Now, I can't use wicket declarations in my css file and when I have
background images in my css the servlet is not found. I would like to use
only wicket and not servlets mapping the files outside of the container. How
do you add background images in a css?

Do you keep the background image and the css inside the container? What
about when we need to change background image?


-- 
View this message in context: 
http://www.nabble.com/Mount-files-outside-container-tp19232069p19258448.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



css and components

2008-09-01 Thread Mathias P.W Nilsson

I have created a component and added a css file with HeaderContributor.forCss

How can I make this work with variation? 

On many pages I add a background image to a div by using the
AttributeModifer and adding the style tag to the div.Now I want my html
markup to be clean and not altering the markup from my wicket code like 
http://www.csszengarden.com/ http://www.csszengarden.com/ . How can I only
alter my css files and not the markup. Can it be acheived with wicket? 
-- 
View this message in context: 
http://www.nabble.com/css-and-components-tp19258531p19258531.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: css and components

2008-09-01 Thread Mathias P.W Nilsson

The background images are fetched from database and there are about 10.000
different backgrounds depending on what parameters is passed to the item
list page.
-- 
View this message in context: 
http://www.nabble.com/css-and-components-tp19258531p19259434.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Tomcat crashes out of memory

2008-08-30 Thread Mathias P.W Nilsson

Ok!

Tried to google on external resource wicket by didn't find what I was
looking for. Can you please give me some direction on what way to go?
-- 
View this message in context: 
http://www.nabble.com/Tomcat-crashes-out-of-memory-tp19203247p19231691.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Mount files outside container

2008-08-30 Thread Mathias P.W Nilsson

Hi!

I want to mount files

c:/myFolder/files/. so that I can get it in wicket and from my html.
like /Files/..

Can wicket do this for me? Pointers?
-- 
View this message in context: 
http://www.nabble.com/Mount-files-outside-container-tp19232069p19232069.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Mount files outside container

2008-08-30 Thread Mathias P.W Nilsson

Thank you very much for the suggestion. By doing this I must add all my
images from Wicket code.

Let's say I want to server a logo, background image or something like that.
And just do it via my markup file. Can this be achieved or do I have to use
a servlet?
-- 
View this message in context: 
http://www.nabble.com/Mount-files-outside-container-tp19232069p19233284.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Tomcat crashes out of memory

2008-08-29 Thread Mathias P.W Nilsson

Ok thanks!

Looking more careful it says that the line response.getOUtputStream() causes
the out of memory

@Override
protected void doGet(HttpServletRequest request, HttpServletResponse
response) throws ServletException, IOException {
 BufferedInputStream in = null; 
 ServletOutputStream op = null;
 try {
 File file = new File(
getHairlessApplicationSettings().getFileResourcePath() ,
request.getRequestURI().replace( request.getContextPath(),  ) );
 
 if( file.exists() ){
 
 ServletContext context  = 
getServletConfig().getServletContext();
 String mimetype = context.getMimeType( 
file.getAbsolutePath() );
 response.setContentType( (mimetype != null) ? 
mimetype :
application/octet-stream );
 response.setHeader(Content-Length,
String.valueOf(file.length())); 
 int length   = 0;
 op = response.getOutputStream();
 

 byte[] bbuf = new byte[8192];
 in = new BufferedInputStream(new 
FileInputStream(file));

 if( in != null ){
 while((length = in.read(bbuf)) != -1)
 {
 op.write(bbuf,0,length);
 }
 response.setStatus( 200 );
 }else{
 response.setStatus( 404 ); 
 }

 }else{
response.setStatus( 404 );
 }
   
} catch (Exception e) {
 response.setStatus( 404 );
}finally{
if( in != null ){
try{
in.close();
}catch( Exception e ){
 
}
 }
if( op != null ){
try{
op.flush();
op.close();
}catch( Exception e ){
 
}
}
}
 
}


-- 
View this message in context: 
http://www.nabble.com/Tomcat-crashes-out-of-memory-tp19203247p19216068.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Tomcat crashes out of memory

2008-08-29 Thread Mathias P.W Nilsson

I read in some thread that a GZipfilter could take a lot of memory so I'm
getting rid of my GZipFilter.

I use a Servlet to host files out of the web application context. Can this
be done using only wicket?
-- 
View this message in context: 
http://www.nabble.com/Tomcat-crashes-out-of-memory-tp19203247p19216235.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Tomcat crashes out of memory

2008-08-28 Thread Mathias P.W Nilsson

Hi!

My tomcat crashes with out of memory error. 

I have set this in my startup.bat file
set JAVA_OPTS=-Xms1024m -Xmx1024m -XX:MaxPermSize=256m

Any other pointers? here is some logging

2008-aug-28 17:26:18 org.apache.catalina.core.StandardWrapperValve invoke
ALLVARLIG: Servlet.service() for servlet ItemResourceServlet threw exception
java.lang.OutOfMemoryError
at java.util.zip.Deflater.init(Native Method)
at java.util.zip.Deflater.init(Deflater.java:123)
at java.util.zip.GZIPOutputStream.init(GZIPOutputStream.java:46)
at java.util.zip.GZIPOutputStream.init(GZIPOutputStream.java:58)
at
se.edgesoft.hairless.web.optimization.GZIPResponseStream.init(GZIPResponseStream.java:23)
at
se.edgesoft.hairless.web.optimization.GZIPResponseWrapper.createOutputStream(GZIPResponseWrapper.java:26)
at
se.edgesoft.hairless.web.optimization.GZIPResponseWrapper.getOutputStream(GZIPResponseWrapper.java:48)
at
se.edgesoft.hairless.web.resource.ItemResourceServlet.writeResource(ItemResourceServlet.java:96)
at
se.edgesoft.hairless.web.resource.ItemResourceServlet.doGet(ItemResourceServlet.java:82)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:246)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.springframework.orm.jpa.support.OpenEntityManagerInViewFilter.doFilterInternal(OpenEntityManagerInViewFilter.java:111)
at
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:75)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
se.edgesoft.hairless.web.optimization.GZIPFilter.doFilter(GZIPFilter.java:34)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:525)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at 
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:619)
-- 
View this message in context: 
http://www.nabble.com/Tomcat-crashes-out-of-memory-tp19203247p19203247.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



PageParameter question

2008-08-15 Thread Mathias P.W Nilsson

Hi!

I try to use the page parameters class for passing a lot of queries. Now it
is very important that if I pass
?Item=13Gender=femaleCategory=13 that I get this in the correct order.
Used for internal bread crumbs and background image replacement.

When I use the PageParameters the parameters are not retained in the order I
added them. Comments anyone?

Let's say I make this

PageParameters params = new PageParameters();
params.add( category, 12 );
params.add( brand, 11 );


And I use this to check the parameters

Iterator iter = params.keySet().iterator();
while( iter.hasNext() ){
  String key = (String)iter.next();
}

A do not get the order I'm looking for.


-- 
View this message in context: 
http://www.nabble.com/PageParameter-question-tp1829p1829.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: PageParameter question

2008-08-15 Thread Mathias P.W Nilsson

Well of course, the Wicket ValueMap extends HashMap. OK, to get this
parameters in a correct order I need to roll my own PageParameter?
-- 
View this message in context: 
http://www.nabble.com/PageParameter-question-tp1829p19000196.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: PageParameter question

2008-08-15 Thread Mathias P.W Nilsson

I don't quite know what you mean. I must still pass PageParameters to the
contructor of a page? How could this help me?
-- 
View this message in context: 
http://www.nabble.com/PageParameter-question-tp1829p19001494.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: PageParameter question

2008-08-15 Thread Mathias P.W Nilsson

Ok, what other stratergy is there

1. A user chooses a Brand. Customer has requested that a top logo, text and
background image changes for that particular brand and list all items.
2. Customer continues to filter on a Category. The search is narrowed.
Background is preserved but 2 breadcrumbs path is made to follow.

1. A user chooses a Department instead as a first choice. Top logo,
background images changes for the department and list the items
2. User continues the search. 

It is critical with the sortorder since the breadcrumbs and the top logo,
text and background is determined.

What other choice is there?
-- 
View this message in context: 
http://www.nabble.com/PageParameter-question-tp1829p19004816.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: PageParameter question

2008-08-15 Thread Mathias P.W Nilsson

I have already solved this using wicket ultimate stateful WebFramework.

Customer requires that the site must be google friendly.
-- 
View this message in context: 
http://www.nabble.com/PageParameter-question-tp1829p19004831.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Google friendly site remaining wickets nice stateful page contructor

2008-08-14 Thread Mathias P.W Nilsson

Hi!

When building a site for a customer with wicket one of the nicest thing is
that you can create a page and pass objects, Arrays etc to the page
constructor. I use this on almost every page.

ListItemFilter filters = new LinkedListItemFilter();

filters.add( new BrandFilter( new Brand( 12 ) ) );
filters.add( new OutletFilter( false ) );
filters.add( new GenderFilter( Gender.FEMALE ) ) ;
.
setResponsePage( new ItemPage( filters ) );

Now, If I should use PageParameters for this and remain the query in the
PageParameters I would have a difficult time to parse this. When Using the
PageNavigator I would get in even more trouble. 

My question is. How do you get around this if the customer requires the site
to be google friendly and you still want to use a stateful approach? Is
there some other way of letting wicket take care of the state and still have
google friendly sites without using PageParameters?

SiteMaps?
Static pages?

Has anyone experienced the same problem?
-- 
View this message in context: 
http://www.nabble.com/Google-friendly-site-remaining-wickets-nice-stateful-page-contructor-tp18981499p18981499.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: More on wicket url stratergy

2008-07-02 Thread Mathias P.W Nilsson

Can you please elaborate. 

I have this Link in my List class
Link itemLink = new Link( itemLink, listItem.getModel() ){
  @Override
  public void onClick() {
PageParameters parameters = new PageParameters();
parameters.add( ItemId, ((Item)getModelObject()).getId().toString());
ItemPage itemPage = new  ItemPage( parameters, ItemListPage.this );
itemPage.setRedirect( true );
setResponsePage( itemPage  );
  }
};
This will produce url like wicket:interface=:2

In My application class I have tried a number of mounting but without
success. Any more pointers?
I use the reference for the ItemListPage to go back from ItemPage to
ItemListPage plus I use the same background as in the ItemListPage.

If a google spider where to index this it would not be successful so I need
a way to get this to be bookmarkable.
-- 
View this message in context: 
http://www.nabble.com/More-on-wicket-url-stratergy-tp18212748p18239900.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: More on wicket url stratergy

2008-07-02 Thread Mathias P.W Nilsson

https://localhost/hairless-web/?wicket:interface=:2:itemRepeater:3:itemLink::ILinkListener::

// Mathias
-- 
View this message in context: 
http://www.nabble.com/More-on-wicket-url-stratergy-tp18212748p18240461.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



More on wicket url stratergy

2008-07-01 Thread Mathias P.W Nilsson

In my itemList class I set the response page like this. 

setResponsePage(  new ItemPage( parameters, ItemListPage.this ) );

Now the ItemListPage.this is for back travelling and to get the background
from the list class. Is it possible to make the itemPage bookmarkable?
-- 
View this message in context: 
http://www.nabble.com/More-on-wicket-url-stratergy-tp18212748p18212748.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: More on wicket url stratergy

2008-07-01 Thread Mathias P.W Nilsson

Thanks, but this what not what I meant


My ItemPage takes the ItemListPage as a parameter in the constructor so that
I can go back to the
exact location I were before.

Now If I want to use the Item as a bookmarkable page, how can this be
achieved with a reference to ItemListPage?
-- 
View this message in context: 
http://www.nabble.com/More-on-wicket-url-stratergy-tp18212748p18214136.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Exception for MixedParamUrlCodingStrategy

2008-06-29 Thread Mathias P.W Nilsson

Hi!
I'm using MixedParamUrlCodingStrategy and I must miss something in how this
is set up properly

I have mounted the page in init in my application class
mount(new MixedParamUrlCodingStrategy(brand, BrandInterceptor.class,new
String[]{id}));

When building up the bookmarkable page link I do this in my Root page

Brand brand = (Brand) item.getModelObject();
PageParameters params = new PageParameters();
params.add( id,  brand.getId().toString() );
Link brandLink = new BookmarkablePageLink( brandLink
,BrandInterceptor.class, params );

But it always ends with this error. 

[RequestCycle] Too many path parts, please provide sufficient number of path
parameter names
java.lang.IllegalArgumentException: Too many path parts, please provide
sufficient number of path parameter names
at
org.apache.wicket.request.target.coding.MixedParamUrlCodingStrategy.decodeParameters(MixedParamUrlCodingStrategy.java:178)

Any pointers on how to solve this?
-- 
View this message in context: 
http://www.nabble.com/Exception-for-MixedParamUrlCodingStrategy-tp18184025p18184025.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Exception for MixedParamUrlCodingStrategy

2008-06-29 Thread Mathias P.W Nilsson

https://localhost/hairless-web/brand/71/

this is the generated URL.

The BrandInterceptor send request to ItemList. Maybe this isn't the way to
do this?

public BrandInterceptor( PageParameters parameters ){

filters = new LinkedListItemFilter(); 
Long brandId = parameters.getLong( id );
if ( brandId != null ) { 
Brand brand = getBrandDao().getBrand( brandId );
filters.add( new BrandFilter( brand ));
setResponsePage( new ItemListPage( filters )  );
} else{

setResponsePage( new Base() );
}
}
-- 
View this message in context: 
http://www.nabble.com/Exception-for-MixedParamUrlCodingStrategy-tp18184025p18185147.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Exception for MixedParamUrlCodingStrategy

2008-06-29 Thread Mathias P.W Nilsson

I read in some Post from Igor that the best way of doing this should be

throw new RestartResponseAtInterceptPageException(new ItemListPage( filters
) );

This seams to solve the problem
-- 
View this message in context: 
http://www.nabble.com/Exception-for-MixedParamUrlCodingStrategy-tp18184025p18185193.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Effect for Ajax

2008-06-28 Thread Mathias P.W Nilsson

It worked now. Have some problem with the Effect.HighLight in Firefox but the
reason for the problem was that my GZipFilter zipped the javascripts
resources.
-- 
View this message in context: 
http://www.nabble.com/Effect-for-Ajax-tp18138812p18173126.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Effect for Ajax

2008-06-26 Thread Mathias P.W Nilsson

Wicket 1.3.3
wicketstuff-scriptaculous 1.3-SNAPSHOT
-- 
View this message in context: 
http://www.nabble.com/Effect-for-Ajax-tp18138812p18144246.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Trying to make bookmarkablelink

2008-06-25 Thread Mathias P.W Nilsson

Hi!

I get this error when trying to make a bookmarkable page.

java.lang.IllegalArgumentException: Too many path parts, please provide
sufficient number of path parameter names

This is my mouting, mount(new MixedParamUrlCodingStrategy(ItemInterceptor,
ItemInterceptor.class,new String[]{}));

This is the code for making the link 

Brand brand = (Brand) item.getModelObject();
PageParameters params = new PageParameters();
params.add( Brand,  brand.getId().toString() 
);
Link brandLink = new BookmarkablePageLink( 
brandLink
,ItemInterceptor.class, params );

And it generates this url... I don't know why the slash is there. Anyone

https://localhost/hairless-web/ItemInterceptor/?Brand=76
-- 
View this message in context: 
http://www.nabble.com/Trying-to-make-bookmarkablelink-tp18115889p18115889.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Trying to make bookmarkablelink

2008-06-25 Thread Mathias P.W Nilsson

No, I'm not sure. I just want to make my urls google friendly. And tried some
strategies. 

Do you have a better solution for making urls google friendly?
-- 
View this message in context: 
http://www.nabble.com/Trying-to-make-bookmarkablelink-tp18115889p18124088.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



SubmitLink enter listener

2008-06-23 Thread Mathias P.W Nilsson

Hi!

How can I get SubmitLink , AjaxSubmitLink and preferrably Link, AjaxLink to
respond to enter?

I'd hoped that submit did this but maybe this requires javascript?
-- 
View this message in context: 
http://www.nabble.com/SubmitLink-enter-listener-tp18078769p18078769.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Google friendly urls

2008-06-23 Thread Mathias P.W Nilsson

Hi!

I'm trying to get my wicket urls to work with google spiders. Right now I
have the ?wicket:interface=:1 and I was just wondering.

Do I have to use PageParameters to get urls like ?Brand=34 

I now pass objects to a pages constructor. Thanks

Like

ListItemFilter filters = new LinkedListItemFilter();
filters.add( new StoreFilter( 1 ) );
filters.add( new BalanceFilter( 1 ) );
filters.add( new BrandFilter( 34 ) );


setResponsePage( new ItemPage( filters ) ) ;


-- 
View this message in context: 
http://www.nabble.com/Google-friendly-urls-tp18079064p18079064.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



  1   2   3   >