DropDownChoice does not push value into Model

2010-08-13 Thread nivs

Hi All,

http://apache-wicket.1842946.n4.nabble.com/file/n2323809/Code.txt Code.txt 

I have a drop down choice control on the search panel and its selected
choices are pushed to the model only once or the first time.

Please have a look at the attached code: 

As part of this code, I noticed that when I uncomment  the following line,
the drop down choice works every time.(as it is supposed to)

public void initialise(String id){
//cpm.getObject().setStudy(searchCriteria);///Set the search criteria object
back in order for status to be filled in the next submit/search
}
However, this will not resolve my issue, because if I refreshed the study in
the model when the details page is loaded, the problem re-occurs.

Not sure why this is hapenning, I tried to debug as much as I can, all i can
get to is, when i re-set the model's study instance after the search results
have arrived , then it works. If I do not, then it fails to capture the
value from DDC.

Thank you again

Cheers
Niv


 



-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/DropDownChoice-does-not-push-value-into-Model-tp2323809p2323809.html
Sent from the Wicket - User mailing list archive at Nabble.com.

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



Re: Wicket 1.5-M1 and DropDownChoice wantOnSelectionChanged

2010-08-13 Thread Igor Vaynberg
can you create a quickstart that reproduces this?

-igor

2010/8/12 Major Péter majorpe...@sch.bme.hu:
 Hi,

 I'm getting weird error, while using DDC wantOnSelectionChanged like this:
 http://stewie.sch.bme.hu/gitweb/?p=aldaris/korok;a=blob;f=sch-pek-web/src/main/java/hu/sch/web/kp/group/GroupHistory.java;h=fffd7b583a6cd5723e06efb905eb8dcd69bc077e;hb=wicket15#l118
 When I click on a ddc row, I'm getting:
 https://host/korok/wicket/page?15-2.IOnChangeListener-valuationsvaluations=4

 Which will redirect me with 302 to:
 https://aldaris.sch.bme.hu:18181/wicket/page?17

 and there I have a component not found exception for 'valuations' on
 page 'homepage'.

 What is wrong here?

 Regards,
 Peter

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



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



Re: Wicket 1.5-M1 causing IllegalStateException

2010-08-13 Thread Igor Vaynberg
2010/8/12 Major Péter majorpe...@sch.bme.hu:
 Hi,

 I have a page with the ~following markup:
 form
  table (DataView)
  tra href=link //tr
  /table
 /form

 The link is constructed like:
 Link valuationLink = new Link(valuationLink) {
   �...@override
    public void onClick() {
        setResponsePage(new ValuationDetails(val, getPage()));
    }
 };

 When I click on this link, I get HTTP 500 and the following stacktrace:
 java.lang.IllegalStateException
        at
 org.apache.catalina.connector.ResponseFacade.sendRedirect(ResponseFacade.java:522)
        at
 org.apache.wicket.protocol.http.servlet.ServletWebResponse.sendRedirect(ServletWebResponse.java:232)
        at
 org.apache.wicket.protocol.http.BufferedWebResponse$SendRedirectAction.invoke(BufferedWebResponse.java:275)
        at
 org.apache.wicket.protocol.http.BufferedWebResponse.writeTo(BufferedWebResponse.java:439)
        at
 org.apache.wicket.protocol.http.HeaderBufferingWebResponse.flush(HeaderBufferingWebResponse.java:87)
        at
 org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:145)
        at
 org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:188)
        at
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
        at
 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:215)
        at
 org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:277)
        at
 org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:188)
        at
 org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:641)


looks like the servlet container does not like the redirect url. can
you set a breakpoint and tell us what the original url is and what url
wicket is trying to redirect to?

 should I create JIRA issues instead of mailing them? :)

yeah, that will make things easier.

-igor

 Regards,
 Peter

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



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



Re: Wicket 1.5-M1 causing IllegalStateException

2010-08-13 Thread Martin Grigorov
The breakpoint should be
at: 
org.apache.wicket.request.http.handler.RedirectRequestHandler.respond(IRequestCycle)
 (wicket-request project)

On Fri, Aug 13, 2010 at 9:54 AM, Igor Vaynberg igor.vaynb...@gmail.comwrote:

 2010/8/12 Major Péter majorpe...@sch.bme.hu:
  Hi,
 
  I have a page with the ~following markup:
  form
   table (DataView)
   tra href=link //tr
   /table
  /form
 
  The link is constructed like:
  Link valuationLink = new Link(valuationLink) {
 @Override
 public void onClick() {
 setResponsePage(new ValuationDetails(val, getPage()));
 }
  };
 
  When I click on this link, I get HTTP 500 and the following stacktrace:
  java.lang.IllegalStateException
 at
 
 org.apache.catalina.connector.ResponseFacade.sendRedirect(ResponseFacade.java:522)
 at
 
 org.apache.wicket.protocol.http.servlet.ServletWebResponse.sendRedirect(ServletWebResponse.java:232)
 at
 
 org.apache.wicket.protocol.http.BufferedWebResponse$SendRedirectAction.invoke(BufferedWebResponse.java:275)
 at
 
 org.apache.wicket.protocol.http.BufferedWebResponse.writeTo(BufferedWebResponse.java:439)
 at
 
 org.apache.wicket.protocol.http.HeaderBufferingWebResponse.flush(HeaderBufferingWebResponse.java:87)
 at
 
 org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:145)
 at
 
 org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:188)
 at
 
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
 at
 
 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:215)
 at
 
 org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:277)
 at
 
 org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:188)
 at
 
 org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:641)
 

 looks like the servlet container does not like the redirect url. can
 you set a breakpoint and tell us what the original url is and what url
 wicket is trying to redirect to?

  should I create JIRA issues instead of mailing them? :)

 yeah, that will make things easier.

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

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




overriding newRowItem() in AjaxFallbackDefaultDataTable

2010-08-13 Thread Josh Kamau
Hi

Somebody please help me with a sample code on how to override the newRowItem
method of the AjaxFallbackDefaultDataTable


I would like to display some of the columns as links . is this the way to do
it?

regards.

Josh


RE: overriding newRowItem() in AjaxFallbackDefaultDataTable

2010-08-13 Thread Bodis, Jerome

Somebody please help me with a sample code on how to override the newRowItem 
method of the AjaxFallbackDefaultDataTable

_dbsTable = new 
AjaxFallbackDefaultDataTableDnsDomainBuildingSubnet(dbsTable, dbsColumns, 
dbsProvider, 20)
{
// add a tooltip to each row
@Override   
protected ItemDnsDomainBuildingSubnet 
newRowItem(String id,
int index, 
IModelDnsDomainBuildingSubnet model) {

ItemDnsDomainBuildingSubnet item = 
super.newRowItem(id, index, model);

String info = blabla;

item.add(new JQueryTooltipBehavior(info));

return item;
}
};

I would like to display some of the columns as links . is this the way to do 
it?

Add a panel with your links (or whatever content you need) to an AbstractColumn 
and append this to your list of columns (ListIColumnXX)

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



Re: overriding newRowItem() in AjaxFallbackDefaultDataTable

2010-08-13 Thread Josh Kamau
Thanks Jerome. What i want is to make the data in the cells clickable so
that users can use them to drill down. For example, one column displays
invoice numbers. I want the invoice number displayed to be a link so that a
user can click it to open the invoice details page. I thought i would do so
by overriding the way the cells are rendered. I am still not able to do
this.

Regards.
Josh

On Fri, Aug 13, 2010 at 12:59 PM, Bodis, Jerome bo...@uni-mainz.de wrote:


 Somebody please help me with a sample code on how to override the
 newRowItem method of the AjaxFallbackDefaultDataTable

 _dbsTable = new
 AjaxFallbackDefaultDataTableDnsDomainBuildingSubnet(dbsTable,
 dbsColumns, dbsProvider, 20)
{
// add a tooltip to each row
@Override
protected ItemDnsDomainBuildingSubnet
 newRowItem(String id,
int index,
 IModelDnsDomainBuildingSubnet model) {

ItemDnsDomainBuildingSubnet item =
 super.newRowItem(id, index, model);

String info = blabla;

item.add(new JQueryTooltipBehavior(info));

return item;
 }
};

 I would like to display some of the columns as links . is this the way to
 do it?

 Add a panel with your links (or whatever content you need) to an
 AbstractColumn and append this to your list of columns (ListIColumnXX)

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




getPage() Question

2010-08-13 Thread Thierry Peng

Hi

I have a Singlepage Application where I swap some panels on the main 
page depending what the user does. Specifically I have a Panel for 
changing the password which looks like:



@SuppressWarnings(serial)
public class ChangePasswordPanel extends Panel
{
 @Inject
 private ChangePasswordAction action;

 @Inject
 private AmtUserHome home;



 @SuppressWarnings(unchecked)
 public ChangePasswordPanel(String id)
 {
   super(id);
   this.setOutputMarkupId(true);

.. some fields added here

   Button change = new Button(change, new 
ResourceModel(middle.changepw.change))
   {
 @Override
 public void onSubmit()
 {
   getPage().addOrReplace(new ChangePasswordSuccessPanel(middle));
   action.saveChanges(); 
   super.onSubmit();

 }
   };
   ..some code
   Button cancel = new Button(cancel, new 
ResourceModel(middle.changepw.cancel))
   {
 @Override
 public void onSubmit()
 {
   
   getPage().addOrReplace(new ChangePasswordPanel(middle));

   getPage().addOrReplace(new ChangePasswordInformationPanel(right));
   super.onSubmit();
 }

 @Override
 public boolean isVisible()
 {
   PostfachModel model = session.getModel();
   return !model.isNeedsPasswordChange();
 }
   };

   cancel.setDefaultFormProcessing(false);
   
.. some more code


   add(form);
   
   container.add(oldPassword);

   form.add(cancel, change, text, password, passwordrepeat, container);

 }
}


However, I'm encountering the following exception:

java.lang.IllegalStateException: No Page found for component [MarkupContainer 
[Component id = cancel]]
at org.apache.wicket.Component.getPage(Component.java:1756)
at 
ch.admin.bj.ba.postfach.ui.panels.ChangePasswordPanel$5.onSubmit(ChangePasswordPanel.java:102)
at org.apache.wicket.markup.html.form.Form.onFormSubmitted(Form.java:882)

But only when I click the cancel button (102 points to 

getPage().addOrReplace(new ChangePasswordInformationPanel(right));

). The submit(change) button works fine and I'm using in both 
onsubmit() almost the identical code. Is there any explanation for this 
behaviour? The buttons in the html are identical:


input type=submit class=button wicket:id=change/
input type=submit class=button wicket:id=cancel/

Wicket version is 1.4.9 on a glassfish 3

Thanks in advance

thierry



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



Re: overriding newRowItem() in AjaxFallbackDefaultDataTable

2010-08-13 Thread Ernesto Reinaldo Barreiro
Josh,

You could do something similar to the following example:

columns.add(new PropertyColumnBroker(new ResourceModel(code),
codigo, codigo) {

private static final long serialVersionUID = 1L;

@Override
public void populateItem(ItemICellPopulatorBroker 
item, String
componentId, IModelBroker rowModel)
{
item.add(new EditBrokerLinkPanel(componentId,
rowModel.getObject(), Step9.class));
}

});

where

public class EditBrokerLinkPanel extends Panel {

private static final long serialVersionUID = 1L;

private String codigo;

/**
 * @param id
 */
public EditBrokerLinkPanel(String id, Broker broker, final Class?
extends WebPage searchPage) {
super(id);
this.codigo = broker.getCodigo();
LinkString link = new LinkString(link, new 
ModelString(this.codigo)) {

private static final long serialVersionUID = 1L;

@Override
public void onClick() {
setResponsePage(new 
EditBrokerPage(getModelObject(), searchPage));
}
};
add(link);
link.add(new Label(text, codigo));
}
}

and EditBrokerLinkPanel.html

html xmlns:wicket=org.apache.wicket
body
wicket:panel
a wicket:id=link title=Editar
span wicket:id=text/span
/a
/wicket:panel
/body
/html

Of course, you this is just an example to illustrate how you could do
it and you will have to roll out your own classes...

Regards,

Ernesto


On Fri, Aug 13, 2010 at 12:05 PM, Josh Kamau joshnet2...@gmail.com wrote:
 Thanks Jerome. What i want is to make the data in the cells clickable so
 that users can use them to drill down. For example, one column displays
 invoice numbers. I want the invoice number displayed to be a link so that a
 user can click it to open the invoice details page. I thought i would do so
 by overriding the way the cells are rendered. I am still not able to do
 this.

 Regards.
 Josh

 On Fri, Aug 13, 2010 at 12:59 PM, Bodis, Jerome bo...@uni-mainz.de wrote:


 Somebody please help me with a sample code on how to override the
 newRowItem method of the AjaxFallbackDefaultDataTable

 _dbsTable = new
 AjaxFallbackDefaultDataTableDnsDomainBuildingSubnet(dbsTable,
 dbsColumns, dbsProvider, 20)
                {
                        // add a tooltip to each row
                       �...@override
                        protected ItemDnsDomainBuildingSubnet
 newRowItem(String id,
                                        int index,
 IModelDnsDomainBuildingSubnet model) {

                                ItemDnsDomainBuildingSubnet item =
 super.newRowItem(id, index, model);

                                String info = blabla;

                                item.add(new JQueryTooltipBehavior(info));

                                return item;
                         }
                };

 I would like to display some of the columns as links . is this the way to
 do it?

 Add a panel with your links (or whatever content you need) to an
 AbstractColumn and append this to your list of columns (ListIColumnXX)

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




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



Re: Wicket 1.5-M1 causing IllegalStateException

2010-08-13 Thread Major Péter
Hi,

thanks for the tip, but that had nothing to do with your breakpoint.
Stay tuned, EPIC bug:

The problem was basically, that the linked Page contained a not 1.5-M1
compatible TinyMCE component, which used old version of
ResourceReference. My Page class couldn't be loaded, since there was a
NoClassDefFoundError, since it couldn't find the ResourceReference class.

Now take a look at my onClick:
public void onClick() {
setResponsePage(new ValuationDetails(val, getPage()));
}

the onClick is called with method.invoke(..), since the class couldn't
be loaded I have a nice InvocationTargetException, which is catched
nicely, this is handled great, but there is some another magic involved
there, which I haven't debug further, but in the end in
BufferedWebResponse#writeTo I have two SendRedirectActions, one is for
wicket/page?10 and one is for korok/consider?11 (I've started from
korok/consider), and this could only result in IllegalStateException.

A better handling would be maybe in ServletWebResponse#sendRedirect to
check whether redirect is already null, and throw a nice
wicketruntimeexception instead. (or find out, how could I have two
sendredirectaction)

Best Regards,
Peter

2010-08-13 10:02 keltezéssel, Martin Grigorov írta:
 The breakpoint should be
 at: 
 org.apache.wicket.request.http.handler.RedirectRequestHandler.respond(IRequestCycle)
  (wicket-request project)
 
 On Fri, Aug 13, 2010 at 9:54 AM, Igor Vaynberg igor.vaynb...@gmail.comwrote:
 
 2010/8/12 Major Péter majorpe...@sch.bme.hu:
 Hi,

 I have a page with the ~following markup:
 form
  table (DataView)
  tra href=link //tr
  /table
 /form

 The link is constructed like:
 Link valuationLink = new Link(valuationLink) {
@Override
public void onClick() {
setResponsePage(new ValuationDetails(val, getPage()));
}
 };

 When I click on this link, I get HTTP 500 and the following stacktrace:
 java.lang.IllegalStateException
at

 org.apache.catalina.connector.ResponseFacade.sendRedirect(ResponseFacade.java:522)
at

 org.apache.wicket.protocol.http.servlet.ServletWebResponse.sendRedirect(ServletWebResponse.java:232)
at

 org.apache.wicket.protocol.http.BufferedWebResponse$SendRedirectAction.invoke(BufferedWebResponse.java:275)
at

 org.apache.wicket.protocol.http.BufferedWebResponse.writeTo(BufferedWebResponse.java:439)
at

 org.apache.wicket.protocol.http.HeaderBufferingWebResponse.flush(HeaderBufferingWebResponse.java:87)
at

 org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:145)
at

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

 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
at

 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:215)
at

 org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:277)
at

 org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:188)
at

 org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:641)


 looks like the servlet container does not like the redirect url. can
 you set a breakpoint and tell us what the original url is and what url
 wicket is trying to redirect to?

 should I create JIRA issues instead of mailing them? :)

 yeah, that will make things easier.

 -igor

 Regards,
 Peter

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



RE: overriding newRowItem() in AjaxFallbackDefaultDataTable

2010-08-13 Thread Bodis, Jerome
Just create a panel that holds you links/buttons or whatever and that is loaded 
with your invoice model. The panel could have a link with your invoice number 
and in the onClick/onSubmit method you trigger a redirect to your details page 
or something like this.
Take a look at the wicket phonebook demo application or see my last column:

ListIColumnObject[] columns = new ArrayListIColumnObject[]();
columns.add(new AbstractColumnObject[](new ModelString(Name), dnsAname) 
{ XXX });
columns.add(new AbstractColumnObject[](new ModelString(Sub-Domäne), 
dnsDomain) { XXX });
columns.add(new AbstractColumnObject[](new ModelString(Ip), ipAddress) 
{ XXX });
columns.add(new AbstractColumnObject[](new ModelString(Mac), 
etherHwAddr) { XXX });
columns.add(new AbstractColumnObject[](new ModelString(Standort), 
location) { XXX });
columns.add(new AbstractColumnObject[](new ModelString( ))
{ 
public void populateItem(ItemICellPopulatorObject[] cellItem, 
String componentId, IModelObject[] rowModel) 
{   
/*
* A panel that has some buttons
*/
ActionsPanelDevice actions = new ActionsPanelDevice( SOME 
PARAMETER )
{
@Override
public void onSubmitButton1(AjaxRequestTarget target, 
Form form) 
{
DO SOMETHING
}
});
_devicesAFDDT = new AjaxFallbackDefaultDataTableObject[](devicesTable, 
columns, dataProvider, 20)



-Original Message-
From: Josh Kamau [mailto:joshnet2...@gmail.com] 
Sent: Friday, August 13, 2010 12:05 PM
To: users@wicket.apache.org
Subject: Re: overriding newRowItem() in AjaxFallbackDefaultDataTable

Thanks Jerome. What i want is to make the data in the cells clickable so that 
users can use them to drill down. For example, one column displays invoice 
numbers. I want the invoice number displayed to be a link so that a user can 
click it to open the invoice details page. I thought i would do so by 
overriding the way the cells are rendered. I am still not able to do this.

Regards.
Josh

On Fri, Aug 13, 2010 at 12:59 PM, Bodis, Jerome bo...@uni-mainz.de wrote:


 Somebody please help me with a sample code on how to override the
 newRowItem method of the AjaxFallbackDefaultDataTable

 _dbsTable = new
 AjaxFallbackDefaultDataTableDnsDomainBuildingSubnet(dbsTable,
 dbsColumns, dbsProvider, 20)
{
// add a tooltip to each row
@Override
protected ItemDnsDomainBuildingSubnet 
 newRowItem(String id,
int index, 
 IModelDnsDomainBuildingSubnet model) {

ItemDnsDomainBuildingSubnet item = 
 super.newRowItem(id, index, model);

String info = blabla;

item.add(new 
 JQueryTooltipBehavior(info));

return item;
 }
};

 I would like to display some of the columns as links . is this the 
 way to
 do it?

 Add a panel with your links (or whatever content you need) to an 
 AbstractColumn and append this to your list of columns 
 (ListIColumnXX)

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



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



Re: Wicket 1.5-M1 causing IllegalStateException

2010-08-13 Thread Major Péter
 A better handling would be maybe in ServletWebResponse#sendRedirect to
 check whether redirect is already null, and throw a nice

I mean true, not null..

 wicketruntimeexception instead. (or find out, how could I have two
 sendredirectaction)

or both

Regards,
Peter

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



Re: getPage() Question

2010-08-13 Thread Thierry Peng

I figured it out.

For who is interested:

The first getPage().addOrReplace replaced the middlepanel which was also 
the current changepasswordpanel.
The second call on getParent() can only yield null because the panel in 
question was already swapped.


So there are two valid solutions:

first use the var-arg:

getPage().addOrReplace( new MiddleInfoPanel(middle),new 
LoginPanel(right));


second, swap first the right panel, then the middle panel

getPage().addOrReplace(new LoginPanel(right));
getPage().addOrReplace(new MiddleInfoPanel(middle));



both solutions works and my faith in wicket is saved

silly me

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



Re: overriding newRowItem() in AjaxFallbackDefaultDataTable

2010-08-13 Thread Josh Kamau
I understand it now. Thanks for your assistance


On Fri, Aug 13, 2010 at 1:36 PM, Bodis, Jerome bo...@uni-mainz.de wrote:

 Just create a panel that holds you links/buttons or whatever and that is
 loaded with your invoice model. The panel could have a link with your
 invoice number and in the onClick/onSubmit method you trigger a redirect to
 your details page or something like this.
 Take a look at the wicket phonebook demo application or see my last column:

 ListIColumnObject[] columns = new ArrayListIColumnObject[]();
 columns.add(new AbstractColumnObject[](new ModelString(Name),
 dnsAname) { XXX });
 columns.add(new AbstractColumnObject[](new ModelString(Sub-Domäne),
 dnsDomain) { XXX });
 columns.add(new AbstractColumnObject[](new ModelString(Ip),
 ipAddress) { XXX });
 columns.add(new AbstractColumnObject[](new ModelString(Mac),
 etherHwAddr) { XXX });
 columns.add(new AbstractColumnObject[](new ModelString(Standort),
 location) { XXX });
 columns.add(new AbstractColumnObject[](new ModelString( ))
 {
public void populateItem(ItemICellPopulatorObject[] cellItem,
 String componentId, IModelObject[] rowModel)
{
/*
* A panel that has some buttons
*/
ActionsPanelDevice actions = new ActionsPanelDevice(
 SOME PARAMETER )
{
@Override
public void onSubmitButton1(AjaxRequestTarget
 target, Form form)
{
DO SOMETHING
}
 });
 _devicesAFDDT = new AjaxFallbackDefaultDataTableObject[](devicesTable,
 columns, dataProvider, 20)



 -Original Message-
 From: Josh Kamau [mailto:joshnet2...@gmail.com]
 Sent: Friday, August 13, 2010 12:05 PM
 To: users@wicket.apache.org
 Subject: Re: overriding newRowItem() in AjaxFallbackDefaultDataTable

 Thanks Jerome. What i want is to make the data in the cells clickable so
 that users can use them to drill down. For example, one column displays
 invoice numbers. I want the invoice number displayed to be a link so that a
 user can click it to open the invoice details page. I thought i would do so
 by overriding the way the cells are rendered. I am still not able to do
 this.

 Regards.
 Josh

 On Fri, Aug 13, 2010 at 12:59 PM, Bodis, Jerome bo...@uni-mainz.de
 wrote:

 
  Somebody please help me with a sample code on how to override the
  newRowItem method of the AjaxFallbackDefaultDataTable
 
  _dbsTable = new
  AjaxFallbackDefaultDataTableDnsDomainBuildingSubnet(dbsTable,
  dbsColumns, dbsProvider, 20)
 {
 // add a tooltip to each row
 @Override
 protected ItemDnsDomainBuildingSubnet
  newRowItem(String id,
 int index,
  IModelDnsDomainBuildingSubnet model) {
 
 ItemDnsDomainBuildingSubnet item =
  super.newRowItem(id, index, model);
 
 String info = blabla;
 
 item.add(new
  JQueryTooltipBehavior(info));
 
 return item;
  }
 };
 
  I would like to display some of the columns as links . is this the
  way to
  do it?
 
  Add a panel with your links (or whatever content you need) to an
  AbstractColumn and append this to your list of columns
  (ListIColumnXX)
 
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 

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




Re: DropDownChoice does not push value into Model

2010-08-13 Thread James Carman
Your DDC is bound to the original StudyModel's study with the lines:

PropertyModel propertyModel = new
PropertyModel(studyModel.getStudy(),Constants.STUDY_STATUS);
studyStatusDpChoices = new
DropDownChoice(Constants.STUDY_DROP_DOWN_CHOICE,propertyModel,studyStatusList,defaultChoiceRenderer);

Then, you're replacing the StudyModel with this line:

this.setModelObject(new StudyModel());

Thus, they get out of synch.

On Fri, Aug 13, 2010 at 3:30 AM, nivs shravann...@gmail.com wrote:

 Hi All,

 http://apache-wicket.1842946.n4.nabble.com/file/n2323809/Code.txt Code.txt

 I have a drop down choice control on the search panel and its selected
 choices are pushed to the model only once or the first time.

 Please have a look at the attached code:

 As part of this code, I noticed that when I uncomment  the following line,
 the drop down choice works every time.(as it is supposed to)

 public void initialise(String id){
 //cpm.getObject().setStudy(searchCriteria);///Set the search criteria object
 back in order for status to be filled in the next submit/search
 }
 However, this will not resolve my issue, because if I refreshed the study in
 the model when the details page is loaded, the problem re-occurs.

 Not sure why this is hapenning, I tried to debug as much as I can, all i can
 get to is, when i re-set the model's study instance after the search results
 have arrived , then it works. If I do not, then it fails to capture the
 value from DDC.

 Thank you again

 Cheers
 Niv






 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/DropDownChoice-does-not-push-value-into-Model-tp2323809p2323809.html
 Sent from the Wicket - User mailing list archive at Nabble.com.

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



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



Re: DropDownChoice does not push value into Model

2010-08-13 Thread nivs

James

Thanks for pointing it out. Later in the code I have added, so the study
object/instance in the initial model should be in synch right? Correct me if
I am wrong.  Let me also think about this point u made. But yeah do let me
know if i have made a mistake.

cpm = (CompoundPropertyModelStudyModel)this.getModel();reset the
original one
Cheers



On Fri, Aug 13, 2010 at 7:49 PM, James Carman [via Apache Wicket] 
ml-node+2324076-505065694-32...@n4.nabble.comml-node%2b2324076-505065694-32...@n4.nabble.com
 wrote:

 Your DDC is bound to the original StudyModel's study with the lines:

 PropertyModel propertyModel = new
 PropertyModel(studyModel.getStudy(),Constants.STUDY_STATUS);
 studyStatusDpChoices = new
 DropDownChoice(Constants.STUDY_DROP_DOWN_CHOICE,propertyModel,studyStatusList,defaultChoiceRenderer);


 Then, you're replacing the StudyModel with this line:

 this.setModelObject(new StudyModel());

 Thus, they get out of synch.

 On Fri, Aug 13, 2010 at 3:30 AM, nivs [hidden 
 email]http://user/SendEmail.jtp?type=nodenode=2324076i=0
 wrote:

 
  Hi All,
 
  http://apache-wicket.1842946.n4.nabble.com/file/n2323809/Code.txthttp://apache-wicket.1842946.n4.nabble.com/file/n2323809/Code.txt?by-user=t
   Code.txt

 
  I have a drop down choice control on the search panel and its selected
  choices are pushed to the model only once or the first time.
 
  Please have a look at the attached code:
 
  As part of this code, I noticed that when I uncomment  the following
 line,
  the drop down choice works every time.(as it is supposed to)
 
  public void initialise(String id){
  //cpm.getObject().setStudy(searchCriteria);///Set the search criteria
 object
  back in order for status to be filled in the next submit/search
  }
  However, this will not resolve my issue, because if I refreshed the study
 in
  the model when the details page is loaded, the problem re-occurs.
 
  Not sure why this is hapenning, I tried to debug as much as I can, all i
 can
  get to is, when i re-set the model's study instance after the search
 results
  have arrived , then it works. If I do not, then it fails to capture the
  value from DDC.
 
  Thank you again
 
  Cheers
  Niv
 
 
 
 
 
 
  --
  View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/DropDownChoice-does-not-push-value-into-Model-tp2323809p2323809.htmlhttp://apache-wicket.1842946.n4.nabble.com/DropDownChoice-does-not-push-value-into-Model-tp2323809p2323809.html?by-user=t
  Sent from the Wicket - User mailing list archive at Nabble.com.
 
  -
  To unsubscribe, e-mail: [hidden 
  email]http://user/SendEmail.jtp?type=nodenode=2324076i=1
  For additional commands, e-mail: [hidden 
  email]http://user/SendEmail.jtp?type=nodenode=2324076i=2
 
 

 -
 To unsubscribe, e-mail: [hidden 
 email]http://user/SendEmail.jtp?type=nodenode=2324076i=3
 For additional commands, e-mail: [hidden 
 email]http://user/SendEmail.jtp?type=nodenode=2324076i=4



 --
  View message @
 http://apache-wicket.1842946.n4.nabble.com/DropDownChoice-does-not-push-value-into-Model-tp2323809p2324076.html
 To unsubscribe from DropDownChoice does not push value into Model, click
 herehttp://apache-wicket.1842946.n4.nabble.com/template/NodeServlet.jtp?tpl=unsubscribe_by_codenode=2323809code=c2hyYXZhbm5pdmVAZ21haWwuY29tfDIzMjM4MDl8LTkwOTU2NzkzNA==.




-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/DropDownChoice-does-not-push-value-into-Model-tp2323809p2324176.html
Sent from the Wicket - User mailing list archive at Nabble.com.


wicket-extensions alive?

2010-08-13 Thread gnugrf

I had added wicket-extensions to my pom.xml, because I was planning on making
use of DataTable and DefaultDataTable, however, I hadn't yet added any code
that would require the dependency. Made a couple changes to my project over
the weekend, and went to recompile and tomcat wouldnt start. Checked the
logs and was greeted with:

Invocation of init method failed; nested exception is
java.lang.NoClassDefFoundError: org/apache/commons/collections/map/LRUMap.
After trial and error removing some code...I finally removed the dependency
(needle in a haystack), and all the errors went away.

Q1- Is wicket-extensions alive and well? The wicket docs are still
referencing the library, so I'm guessing yes, even though it seems a couple
years since an update.

Q2- If it is alive, can anybody tell me whats going on with the errors im
having? 
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/wicket-extensions-alive-tp2324725p2324725.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



General question - business logic with Wicket, where to put it?

2010-08-13 Thread Brown, Berlin [GCG-PFS]
What is the best practice for where to put business logic in Wicket.
 
At first, I had put logic in the page constructor, but now I have
learned a little bit about the Lifecycle of a page, the serialization of
the page.  So putting any kind of logic there didn't seem like a good
idea.
 
I placed logic in the action buttons onSubmit methods and form onSubmit
methods.
 
Placing any logic here in the onSubmits methods are OK, but sometimes it
is difficult to find all the dependent objects.
 
I gues I am used to a Struts MVC approach, where you have one Page
action and then communicate with all of your dependent objects (say a
form bean with all of the data);
 
With Wicket, I see these issues:
 
1. When will the page constructor get invoked (should any kind of
business logic be placed here?)
2. Where and when will the onSubmit/onUpdate action methods get invoked
(should any business logic be placed here and are all the dependent
objects available)
 
Berlin Brown


Re: wicket-extensions alive?

2010-08-13 Thread Igor Vaynberg
extensions is alive and well, use it every day.

-igor

On Fri, Aug 13, 2010 at 1:34 PM, gnugrf gnu...@sdf.lonestar.org wrote:

 I had added wicket-extensions to my pom.xml, because I was planning on making
 use of DataTable and DefaultDataTable, however, I hadn't yet added any code
 that would require the dependency. Made a couple changes to my project over
 the weekend, and went to recompile and tomcat wouldnt start. Checked the
 logs and was greeted with:

 Invocation of init method failed; nested exception is
 java.lang.NoClassDefFoundError: org/apache/commons/collections/map/LRUMap.
 After trial and error removing some code...I finally removed the dependency
 (needle in a haystack), and all the errors went away.

 Q1- Is wicket-extensions alive and well? The wicket docs are still
 referencing the library, so I'm guessing yes, even though it seems a couple
 years since an update.

 Q2- If it is alive, can anybody tell me whats going on with the errors im
 having?
 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/wicket-extensions-alive-tp2324725p2324725.html
 Sent from the Wicket - User mailing list archive at Nabble.com.

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



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



Re: wicket-extensions alive?

2010-08-13 Thread James Carman
That's not a wicket class.  You're missing commons-collections.jar

On Aug 13, 2010 4:34 PM, gnugrf gnu...@sdf.lonestar.org wrote:

 I had added wicket-extensions to my pom.xml, because I was planning on
making
 use of DataTable and DefaultDataTable, however, I hadn't yet added any
code
 that would require the dependency. Made a couple changes to my project
over
 the weekend, and went to recompile and tomcat wouldnt start. Checked the
 logs and was greeted with:

 Invocation of init method failed; nested exception is
 java.lang.NoClassDefFoundError: org/apache/commons/collections/map/LRUMap.
 After trial and error removing some code...I finally removed the
dependency
 (needle in a haystack), and all the errors went away.

 Q1- Is wicket-extensions alive and well? The wicket docs are still
 referencing the library, so I'm guessing yes, even though it seems a
couple
 years since an update.

 Q2- If it is alive, can anybody tell me whats going on with the errors im
 having?
 --
 View this message in context:
http://apache-wicket.1842946.n4.nabble.com/wicket-extensions-alive-tp2324725p2324725.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



How to add Scroll to tabpanel

2010-08-13 Thread arunarapole

Hi

Is any one knows how to add scrollbar to tabpanel in wicket

i have a dataview under tabpanel ,i have to add scrollbar to that panel

if any idea please share with me 

Thanks
Aruna
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/How-to-add-Scroll-to-tabpanel-tp2324822p2324822.html
Sent from the Wicket - User mailing list archive at Nabble.com.


Re: How to add Scroll to tabpanel

2010-08-13 Thread Jeremy Thomerson
CSS?  overflow?


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


On Fri, Aug 13, 2010 at 5:15 PM, arunarapole arunakumm...@gmail.com wrote:


 Hi

 Is any one knows how to add scrollbar to tabpanel in wicket

 i have a dataview under tabpanel ,i have to add scrollbar to that panel

 if any idea please share with me

 Thanks
 Aruna
 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/How-to-add-Scroll-to-tabpanel-tp2324822p2324822.html
 Sent from the Wicket - User mailing list archive at Nabble.com.



Re: wicket-extensions alive?

2010-08-13 Thread gnugrf

Yeah I noticed that when I checked the maven repo that it required
commons-collections, so I tried adding version 3.2.1. I ended up with the
following error: 

java.lang.ClassCastException: wicket.extensions.Initializer cannot be cast
to org.apache.wicket.IInitializer

The maven repo stated that wicket-extensions required commons-collections
2.1, so I thought maybe it required an older version...same error. I went as
far as checking my local .m2 repo to make sure I didnt have a corrupted .jar
- which has happened to me before. The jar opens, able to see the
LRUmap.class file, so I am at a loss..

Is the dependency right? --

dependency
groupIdwicket/groupId
artifactIdwicket-extensions/artifactId
version1.2.7/version
/dependency

I noticed that all the other wicket-related stuff is under groupId
org.apache.wicket. Googling around I found someone had this same error
awhile back using inconsistent versions of wicket and wicket-spring, but
that is definitely not the case here.
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/wicket-extensions-alive-tp2324725p2324894.html
Sent from the Wicket - User mailing list archive at Nabble.com.

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



Re: wicket-extensions alive?

2010-08-13 Thread Igor Vaynberg
extensions version should be the same as wicket, so unless you are
using wicket-1.2.7 you are using the wrong version.

-igor

On Fri, Aug 13, 2010 at 5:09 PM, gnugrf gnu...@sdf.lonestar.org wrote:

 Yeah I noticed that when I checked the maven repo that it required
 commons-collections, so I tried adding version 3.2.1. I ended up with the
 following error:

 java.lang.ClassCastException: wicket.extensions.Initializer cannot be cast
 to org.apache.wicket.IInitializer

 The maven repo stated that wicket-extensions required commons-collections
 2.1, so I thought maybe it required an older version...same error. I went as
 far as checking my local .m2 repo to make sure I didnt have a corrupted .jar
 - which has happened to me before. The jar opens, able to see the
 LRUmap.class file, so I am at a loss..

 Is the dependency right? --

 dependency
 groupIdwicket/groupId
 artifactIdwicket-extensions/artifactId
 version1.2.7/version
 /dependency

 I noticed that all the other wicket-related stuff is under groupId
 org.apache.wicket. Googling around I found someone had this same error
 awhile back using inconsistent versions of wicket and wicket-spring, but
 that is definitely not the case here.
 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/wicket-extensions-alive-tp2324725p2324894.html
 Sent from the Wicket - User mailing list archive at Nabble.com.

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



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



Re: Testing modal window

2010-08-13 Thread Kent Tong

Hi Anna,

 I am trying to write a test case to test that the parent page gets
 updated with new values once the modal window closes.

If you use http://wicketpagetest.sourceforge.net, you can test it
easily like:

 DefaultSelenium selenium = ...;
 WicketSelenium ws = ...;
 ws.openBookmarkablePage(AddDataPage.class);
 selenium.click(wicket=//openModal);
 ws.waitUntilAjaxDone();
 selenium.click(wicket=//modal//closeModal);
 ws.waitUntilAjaxDone();

assuming that you the button to open the modal window has a Wicket ID of
openModal, the modal window's Wicket ID is modal, the button in the
modal window to close it has a Wicket ID of closeModal.

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



[Vote] wicketstuff-core structure to support wicket 1.5 related development

2010-08-13 Thread Michael O'Cleirigh

Hello,

With the first milestone of wicket 1.5 released there has been some 
interest expressed for a corresponding wicketstuff-core branch.


Because wicket 1.5 is basically experimental right now I'm not sure if 
switching trunk to track it is the best idea.


But eventually trunk will track 1.5, probably at the release candidate 
stage.


However, I'm willing to implement the consensus opinion on this.

Structure Options:

[ ] - trunk to track 1.5, branch for 1.4.11-SNAPSHOT and subsequent 
releases. (+:no merge later; -: trunk will be broken for an extended period)
[ ] - trunk stays on 1.4.x, create new branch to track 1.5-M1.  (+: no 
switch is needed; -: at some point need to merge the branch back into trunk)


Wicket 1.5 Options:

[ ] wicket 1.5 branch is set to wicket 1.5-M1, hard code to the released 
milestone and increment with each new version until the 1.5 release.
[ ] wicket 1.5 branch is set to wicket 1.5-SNAPSHOT and if there is 
demand we can cut releases to match the wicket milestones and/or release 
candidates.


I'll wait until Monday night (eastern time) before making any changes 
based on the vote.


Thanks,

Mike








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