You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by "Mathias P.W Nilsson" <ma...@snyltarna.se> on 2009/03/18 23:17:46 UTC
Explaination of Ajax in Wicket
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 );
userContainer.add( firstName );
final TextField street = new TextField( "street" );
street.setOutputMarkupId( true );
userContainer.add( street );
final TextField socialSecurityNumber = new TextField(
"socialSecurityNumber", new Model( "") );
//socialSecurityNumber.setModelObject( new String(""));
socialSecurityNumber.setOutputMarkupId( true );
purchaseForm.add( socialSecurityNumber );
userContainer.add( country );
purchaseForm.add( userContainer );
purchaseForm.setOutputMarkupId( true );
final List tabs = new LinkedList();
tabs.add( new KreditorTab( new Model( "Faktura")){
public Panel getPanel(String panelId){return new PaymentMethodPanel(
panelId ){
@Override
public void onPaymentChanged( IPayment payment, AjaxRequestTarget target
) {
setPayment(payment);
target.addComponent(userContainer);
}
@Override
public List<IPayment> getPayments() {
List<IPayment> payments = new LinkedList<IPayment>();
for( IPayment payment : getPaymentFactory().getPayments() ){
if( payment.getPaymentMethod().equals( PaymentMethod.KREDITOR)){
if( ((KreditorPayment) payment).getCampaign() == -1 )
payments.add( payment );
}
}
return payments;
}
@Override
public boolean isVisible(){
if( isLoggedIn() && getUser().getCountry().getCode().equals( "SE" ) ){
return true;
}
return false;
}
};
}
@Override
public boolean isSwedishOnly() {
return true;
}
});
tabs.add( new PaymentTab( new Model( "Kortbetalning")){
public Panel getPanel(String panelId){return new PaymentMethodPanel(
panelId ){
@Override
public void onPaymentChanged( IPayment payment, AjaxRequestTarget target
) {
setPayment(payment);
}
@Override
public List<IPayment> getPayments() {
List<IPayment> payments = new LinkedList<IPayment>();
for( IPayment payment : getPaymentFactory().getPayments() ){
if( payment.getPaymentMethod().equals( PaymentMethod.CREDIT_CARD)){
payments.add( payment );
}
}
return payments;
}
};
}
@Override
public boolean isSwedishOnly() {
// TODO Auto-generated method stub
return false;
}
});
tabs.add( new KreditorTab( new Model( "Delbetalning")){
public Panel getPanel(String panelId){return new PaymentMethodPanel(
panelId ){
@Override
public void onPaymentChanged( IPayment payment, AjaxRequestTarget target
) {
setPayment(payment);
}
@Override
public List<IPayment> getPayments() {
List<IPayment> payments = new LinkedList<IPayment>();
for( IPayment payment : getPaymentFactory().getPayments() ){
if( payment.getPaymentMethod().equals( PaymentMethod.KREDITOR)){
if( ((KreditorPayment) payment).getCampaign() != -1 )
payments.add( payment );
}
}
return payments;
}
@Override
public boolean isVisible(){
if( isLoggedIn() && getUser().getCountry().getCode().equals( "SE" ) ){
return true;
}
return false;
}
};
}
@Override
public boolean isSwedishOnly() {
return true;
}
});
tabs.add( new PaymentTab( new Model( "Postförskott")){
public Panel getPanel(String panelId){return new PaymentMethodPanel(
panelId ){
@Override
public void onPaymentChanged( IPayment payment, AjaxRequestTarget target
) {
setPayment(payment);
}
@Override
public List<IPayment> getPayments() {
List<IPayment> payments = new LinkedList<IPayment>();
for( IPayment payment : getPaymentFactory().getPayments() ){
if( payment.getPaymentMethod().equals( PaymentMethod.POST_PARCEL)){
payments.add( payment );
}
}
return payments;
}
@Override
public boolean isVisible(){
if( isLoggedIn() && getUser().getCountry().getCode().equals( "SE" ) ){
return true;
}
return false;
}
};
}
@Override
public boolean isSwedishOnly() {
// TODO Auto-generated method stub
return true;
}
});
panel = new AjaxTabbedPanel("dsf" , tabs ){
@Override
protected WebMarkupContainer newLink(java.lang.String linkId, final int
index){
return new AjaxLink( linkId ){
int selectedTab = getSelectedTab();
boolean selected = (index == selectedTab);
@Override
public void onClick(AjaxRequestTarget target) {
setSelectedTab(index);
if( target != null ){
target.addComponent( panel );
if( getTabs().get( index ) instanceof KreditorTab ){
socialSecurityNumber.setVisible( true );
target.addComponent( userContainer );
}else{
socialSecurityNumber.setVisible( false );
target.addComponent( userContainer );
}
}
onAjaxUpdate(target);
}
@Override
public boolean isEnabled(){
if( isLoggedIn() ){
PaymentTab tab = (PaymentTab)getTabs().get( index );
if( tab.isSwedishOnly() ){
if( getUser().getCountry().getCode().equals( "SE" ) ){
return true;
}
return false;
}
return true;
}
return false;
}
};
}
};
panel.setOutputMarkupId( true );
purchaseForm.add( panel );
AjaxLink addressLink = new AjaxLink( "addressLink", new Model( )){
@Override
public void onClick(AjaxRequestTarget target) {
if( getPayment() instanceof KreditorPayment ){
KreditorFactory.Address a = getKreditorFactory().getAddress(
getStore(), socialSecurityNumber.getModelObjectAsString() );
if( a != null ){
street.setModelObject( a.getAddress() );
}
}
//target.addComponent( socialSecurityNumber );
}
};
userContainer.add( addressLink );
AjaxSubmitLink submit = new AjaxSubmitLink( "submit" , purchaseForm ){
@Override
protected void onSubmit(AjaxRequestTarget target, Form form) {
System.out.println( getPayment() );
}
@Override
public boolean isEnabled(){
if( ! isLoggedIn() ) return false;
return true;
}
};
purchaseForm.add( submit );
}
private abstract class PaymentTab extends AbstractTab{
private static final long serialVersionUID = 1L;
public PaymentTab(IModel title) {
super(title);
}
public abstract boolean isSwedishOnly();
}
private abstract class KreditorTab extends PaymentTab{
public KreditorTab(IModel title) {
super(title);
}
}
}
--
View this message in context: http://www.nabble.com/Explaination-of-Ajax-in-Wicket-tp22589797p22589797.html
Sent from the Wicket - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: Explaination of Ajax in Wicket
Posted by James Carman <jc...@carmanconsulting.com>.
On Wed, Mar 18, 2009 at 9:26 PM, Mathias P.W Nilsson
<ma...@snyltarna.se> wrote:
>
> After chaning all my AjaxLink to AjaxSubmitLink it works a little better,
> still some questions.
>
> Why can't I use ajaxLink here?
>
In order for the form's values to get into your model objects, the
form must be submitted.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: Explaination of Ajax in Wicket
Posted by James Carman <jc...@carmanconsulting.com>.
Care to elaborate on how/why you're confused?
On Wed, Mar 18, 2009 at 9:34 PM, Mathias P.W Nilsson
<ma...@snyltarna.se> wrote:
>
> 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-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: Explaination of Ajax in Wicket
Posted by "Mathias P.W Nilsson" <ma...@snyltarna.se>.
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-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: Explaination of Ajax in Wicket
Posted by "Mathias P.W Nilsson" <ma...@snyltarna.se>.
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-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: Explaination of Ajax in Wicket
Posted by "Mathias P.W Nilsson" <ma...@snyltarna.se>.
Thanks!
I switched AjaxLink to AjaxSubmitLink but still not able to get correct
data. Any other pointers?
--
View this message in context: http://www.nabble.com/Explaination-of-Ajax-in-Wicket-tp22589797p22591768.html
Sent from the Wicket - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: Explaination of Ajax in Wicket
Posted by Igor Vaynberg <ig...@gmail.com>.
you are using a server-side tab panel with tab links that are not
submit links, that means
a) only form elements that are on the current tab when you press
submit are processed
b) any time you switch tabs you lose form data from the previous tab.
-igor
On Wed, Mar 18, 2009 at 3:17 PM, Mathias P.W Nilsson
<ma...@snyltarna.se> wrote:
>
> 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 );
> userContainer.add( firstName );
>
> final TextField street = new TextField( "street" );
> street.setOutputMarkupId( true );
> userContainer.add( street );
>
> final TextField socialSecurityNumber = new TextField(
> "socialSecurityNumber", new Model( "") );
> //socialSecurityNumber.setModelObject( new String(""));
> socialSecurityNumber.setOutputMarkupId( true );
> purchaseForm.add( socialSecurityNumber );
>
> userContainer.add( country );
>
> purchaseForm.add( userContainer );
> purchaseForm.setOutputMarkupId( true );
>
> final List tabs = new LinkedList();
> tabs.add( new KreditorTab( new Model( "Faktura")){
> public Panel getPanel(String panelId){return new PaymentMethodPanel(
> panelId ){
> @Override
> public void onPaymentChanged( IPayment payment, AjaxRequestTarget target
> ) {
> setPayment(payment);
> target.addComponent(userContainer);
> }
> @Override
> public List<IPayment> getPayments() {
> List<IPayment> payments = new LinkedList<IPayment>();
> for( IPayment payment : getPaymentFactory().getPayments() ){
> if( payment.getPaymentMethod().equals( PaymentMethod.KREDITOR)){
> if( ((KreditorPayment) payment).getCampaign() == -1 )
> payments.add( payment );
> }
> }
> return payments;
> }
>
> @Override
> public boolean isVisible(){
> if( isLoggedIn() && getUser().getCountry().getCode().equals( "SE" ) ){
> return true;
> }
>
> return false;
> }
> };
> }
>
> @Override
> public boolean isSwedishOnly() {
> return true;
> }
>
>
> });
> tabs.add( new PaymentTab( new Model( "Kortbetalning")){
> public Panel getPanel(String panelId){return new PaymentMethodPanel(
> panelId ){
> @Override
> public void onPaymentChanged( IPayment payment, AjaxRequestTarget target
> ) {
> setPayment(payment);
> }
> @Override
> public List<IPayment> getPayments() {
> List<IPayment> payments = new LinkedList<IPayment>();
> for( IPayment payment : getPaymentFactory().getPayments() ){
> if( payment.getPaymentMethod().equals( PaymentMethod.CREDIT_CARD)){
> payments.add( payment );
> }
> }
> return payments;
> }
>
>
>
> };
> }
>
> @Override
> public boolean isSwedishOnly() {
> // TODO Auto-generated method stub
> return false;
> }
>
>
> });
>
> tabs.add( new KreditorTab( new Model( "Delbetalning")){
> public Panel getPanel(String panelId){return new PaymentMethodPanel(
> panelId ){
> @Override
> public void onPaymentChanged( IPayment payment, AjaxRequestTarget target
> ) {
> setPayment(payment);
> }
> @Override
> public List<IPayment> getPayments() {
> List<IPayment> payments = new LinkedList<IPayment>();
> for( IPayment payment : getPaymentFactory().getPayments() ){
> if( payment.getPaymentMethod().equals( PaymentMethod.KREDITOR)){
> if( ((KreditorPayment) payment).getCampaign() != -1 )
> payments.add( payment );
> }
> }
> return payments;
> }
>
> @Override
> public boolean isVisible(){
> if( isLoggedIn() && getUser().getCountry().getCode().equals( "SE" ) ){
> return true;
> }
>
> return false;
> }
> };
> }
>
> @Override
> public boolean isSwedishOnly() {
> return true;
> }
>
>
> });
>
> tabs.add( new PaymentTab( new Model( "Postförskott")){
> public Panel getPanel(String panelId){return new PaymentMethodPanel(
> panelId ){
> @Override
> public void onPaymentChanged( IPayment payment, AjaxRequestTarget target
> ) {
> setPayment(payment);
>
> }
>
> @Override
> public List<IPayment> getPayments() {
> List<IPayment> payments = new LinkedList<IPayment>();
> for( IPayment payment : getPaymentFactory().getPayments() ){
> if( payment.getPaymentMethod().equals( PaymentMethod.POST_PARCEL)){
> payments.add( payment );
> }
> }
> return payments;
> }
>
> @Override
> public boolean isVisible(){
> if( isLoggedIn() && getUser().getCountry().getCode().equals( "SE" ) ){
> return true;
> }
>
> return false;
> }
>
>
> };
> }
>
> @Override
> public boolean isSwedishOnly() {
> // TODO Auto-generated method stub
> return true;
> }
>
>
>
> });
>
> panel = new AjaxTabbedPanel("dsf" , tabs ){
> @Override
> protected WebMarkupContainer newLink(java.lang.String linkId, final int
> index){
> return new AjaxLink( linkId ){
> int selectedTab = getSelectedTab();
> boolean selected = (index == selectedTab);
>
> @Override
> public void onClick(AjaxRequestTarget target) {
> setSelectedTab(index);
> if( target != null ){
> target.addComponent( panel );
> if( getTabs().get( index ) instanceof KreditorTab ){
> socialSecurityNumber.setVisible( true );
> target.addComponent( userContainer );
> }else{
> socialSecurityNumber.setVisible( false );
> target.addComponent( userContainer );
> }
> }
>
> onAjaxUpdate(target);
> }
>
> @Override
> public boolean isEnabled(){
> if( isLoggedIn() ){
> PaymentTab tab = (PaymentTab)getTabs().get( index );
> if( tab.isSwedishOnly() ){
> if( getUser().getCountry().getCode().equals( "SE" ) ){
> return true;
> }
> return false;
> }
>
> return true;
> }
> return false;
> }
>
> };
> }
>
> };
> panel.setOutputMarkupId( true );
> purchaseForm.add( panel );
>
> AjaxLink addressLink = new AjaxLink( "addressLink", new Model( )){
>
> @Override
> public void onClick(AjaxRequestTarget target) {
>
> if( getPayment() instanceof KreditorPayment ){
> KreditorFactory.Address a = getKreditorFactory().getAddress(
> getStore(), socialSecurityNumber.getModelObjectAsString() );
> if( a != null ){
> street.setModelObject( a.getAddress() );
> }
>
> }
> //target.addComponent( socialSecurityNumber );
> }
>
> };
> userContainer.add( addressLink );
>
> AjaxSubmitLink submit = new AjaxSubmitLink( "submit" , purchaseForm ){
>
> @Override
> protected void onSubmit(AjaxRequestTarget target, Form form) {
>
> System.out.println( getPayment() );
>
> }
>
> @Override
> public boolean isEnabled(){
> if( ! isLoggedIn() ) return false;
>
> return true;
> }
>
> };
>
> purchaseForm.add( submit );
>
>
> }
>
>
> private abstract class PaymentTab extends AbstractTab{
> private static final long serialVersionUID = 1L;
>
> public PaymentTab(IModel title) {
> super(title);
> }
>
> public abstract boolean isSwedishOnly();
> }
>
> private abstract class KreditorTab extends PaymentTab{
>
> public KreditorTab(IModel title) {
> super(title);
> }
> }
> }
>
>
> --
> View this message in context: http://www.nabble.com/Explaination-of-Ajax-in-Wicket-tp22589797p22589797.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>