Re: Wicket with Spring AOP

2011-06-02 Thread Altuğ Bilgin Altıntaş
Merhaba izlem;

I think you should look at Proxy-based Approach. Spring and Wicket
integration type is important.

Please visit :  https://cwiki.apache.org/WICKET/spring.html.

A.

01 Haziran 2011 20:02 tarihinde İzlem Gözükeleş izl...@gmail.com yazdı:

 Furthermore, I changed the source code of spring framework and added serial
 interface for the class raising exception (

 org.springframework.aop.aspectj.annotation.InstantiationModelAwarePointcutAdvisorImp).
 and built it again.

 Application passed this exception, yet raised another
 NotSerializableException for another class from the same package (
 org.springframework.aop.aspectj.annotation).

 Is it possible to use spring's aspect annotations with wicket?

 Secondly, there are third party libraries containg classes which
 aren't Serializable.
 How can we inject these type of classes?

 Thanks,




-- 
*Altuğ*
*www.kodcu.com* http://www.kodcu.com**


Re: While dojo project is still alpha status I want to say something about scaffolding in wicket

2011-06-02 Thread Gonzalo Aguilar Delgado
Hi James, 

Yes, please, send me a .war. My e-mail has no limit in storage. 

gagui...@aguilardelgado.com





El mié, 01-06-2011 a las 16:34 -0400, James Carman escribió:
 On Wed, Jun 1, 2011 at 2:59 PM, Gonzalo Aguilar Delgado
 gagui...@aguilardelgado.com wrote:
 
  Does it took long to program it? Do you think you will maintain it for
  long time?
 
 
 I have been working on the idea for a couple of years.
 
  I cannot run the application because compile problems (need maven3).
 
 
 DOH!  I didn't realize that I made it *require* maven3.  You want me
 to send you a war file for the example application?
 
  Does it support ajax?
 
 
 The example application, which uses the Scaffold component, is all
 ajax-based.  There are ajax-based components in there that you can use
 for submitting your forms, deleting objects, etc.
 
 -
 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: While dojo project is still alpha status I want to say something about scaffolding in wicket

2011-06-02 Thread Gonzalo Aguilar Delgado

Hi James, 

Using dojo it's a very different approach. The idea of using dojo is to
use everything that dojo gives...

I think it has powerfull features:
* Full support for lots of widget (calendar, hour,
autocomplete text fields, etc).
* Theme support. It automagically draws beautiful
widgets with different styles.
* Fully interaction between dojo and wicket. Via ajax.
It's great you can interact without reloading anything.
* Support for mobile devices.


Thought I have some doubts about interaction between your metadata
implementation and the one I have in place. Mainly because what I
explained about the hibernate metadata (that is very robust). It also
support automatic search.

https://github.com/gadLinux/Level2-CLT-Segmentator

It builds a query search for the whole database. Also still in alpha...
I will setup some screenshots so you can see it in action. Have to port
to dojo also. :D

Too many things as I said.

Tnx again.



El mié, 01-06-2011 a las 16:43 -0400, James Carman escribió:
 On Wed, Jun 1, 2011 at 3:41 PM, Gonzalo Aguilar Delgado
 gagui...@aguilardelgado.com wrote:
 
  Your project looks good. Clean code, modular, well organized. I got a
  little bit confused about the PropertyComponentFactory. I cannot find
  where you define the right provider... Was looking into configuration.
 
  In the code it takes to an interface. But not implementation, I looked
  around and seem to find one.
 
 
 PropertyComponentFactory isn't something that you'd be implementing as
 an extender of the framework most likely.  You'll be adding your own
 property editors.  For an example of how to do that, take a look at
 the Joda stuff probably.
 
  The idea is great, everything is pluggable. Even property editors as I
  can see in the example.
 
  The use of your other library, metastopheles, is good enough. The
  problem with it will be automatic detection of links (foreign keys) to
  other clases, specific database types and so on. Something that is
  resolved just sticking to hibernate metadata (I only want one
  persistence engine for now).
 
 
 Right now, Wicketopia doesn't support automatic editing related
 entities.  It's on the to-do list for sure.  Basically, the next big
 thing for Wicketopia would be a search abstraction.  Because, to
 find an entity to associate with the entity you're editing, most
 likely you'll be doing some type of search (unless it's just a
 drop-down, but that will not be the case when there are many objects,
 obviously).
 
 
  Will you discuss about integrating it with dojo libraries?
 
 
 Sure will!  Alexandros Karypidis is working with me on Wicketopia
 right now.  He showed interest by wicket-1.5-izing Wicketopia, so I
 just gave him access to SVN and let him have at it.  If you want to
 add a dojo module, as long as its scope makes sense to be part of the
 framework itself, I see no reason why you can't be made part of the
 team!  I don't plan on maintaining this thing all by myself.  The more
 the merrier, I say!  We just have to make sure we keep our approach as
 user-focused as possible, because Wicketopia is intended to be used by
 other folks, not just us. :)
 
 What exactly is it that you want to do with dojo that you can't do
 with the built-in ajax libraries?  Are you thinking of using a
 specific dojo component of some sort?
 
 -
 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



adding link to datatable

2011-06-02 Thread henry
hi guys am having some issues my code any help will do,am trying to add a
link to my datatable 
firstly i created the DetailPage class

//DetailPage class code
public DetailsPage(String id , IModel entryModel) {
super(id,entryModel);

Link link = new Link(link){
@Override
public void onClick() {
showDetails details = new showDetails(getEntry());
setResponsePage(details);
}
};
   
add(new Label(id,getEntry().getId()+));
add(link);
}

private PhoneTransferRequest getEntry(){
return (PhoneTransferRequest)getDefaultModelObject();
}

and i try adding the DetailPage panel to my datatable

IColumn[]columns = {new AbstractColumnPhoneTransferRequest(new
ModelString(id)) {
public void populateItem(Item cellItem, String componentId, IModel
rowModel)
{
cellItem.add(new DetailsPage(componentId, rowModel));
}
},
new
ExportablePropertyColumnPhoneTransferRequest(Model.of(Initiator),
customerId ),
new
ExportablePropertyColumnPhoneTransferRequest(Model.of(StartTime),
startTime ),
new
ExportablePropertyColumnPhoneTransferRequest(Model.of(switchResponse),
switchResponse),
new
ExportablePropertyColumnPhoneTransferRequest(Model.of(SourceAccount),
sourceAccount),
new
ExportablePropertyColumnPhoneTransferRequest(Model.of(DestAccount),
destAccount),
new
ExportablePropertyColumnPhoneTransferRequest(Model.of(Amount),
amount),
new
ExportablePropertyColumnPhoneTransferRequest(Model.of(Notication),
notificationSent),};

//creating dataTable object
DefaultDataTable dataTable1 = new
DefaultDataTable(datatable,columns,new PhoneTransferProvider(),30);

any time i run this code i get

an INTERNAL ERROR MESSAGE.

please i need to get this sorted out today.

Regards

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/adding-link-to-datatable-tp3567971p3567971.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: adding link to datatable

2011-06-02 Thread James Carman
What is DetailsPage's hierarchy?

On Thu, Jun 2, 2011 at 6:02 AM, henry henstri...@yahoo.com wrote:
 hi guys am having some issues my code any help will do,am trying to add a
 link to my datatable
 firstly i created the DetailPage class

 //DetailPage class code
 public DetailsPage(String id , IModel entryModel) {
        super(id,entryModel);

        Link link = new Link(link){
            @Override
            public void onClick() {
                showDetails details = new showDetails(getEntry());
                setResponsePage(details);
            }
        };

        add(new Label(id,getEntry().getId()+));
        add(link);
    }

    private PhoneTransferRequest getEntry(){
        return (PhoneTransferRequest)getDefaultModelObject();
    }

 and i try adding the DetailPage panel to my datatable

 IColumn[]columns = {new AbstractColumnPhoneTransferRequest(new
 ModelString(id)) {
        public void populateItem(Item cellItem, String componentId, IModel
 rowModel)
        {
            cellItem.add(new DetailsPage(componentId, rowModel));
        }
        },
        new
 ExportablePropertyColumnPhoneTransferRequest(Model.of(Initiator),
 customerId ),
        new
 ExportablePropertyColumnPhoneTransferRequest(Model.of(StartTime),
 startTime ),
        new
 ExportablePropertyColumnPhoneTransferRequest(Model.of(switchResponse),
 switchResponse),
        new
 ExportablePropertyColumnPhoneTransferRequest(Model.of(SourceAccount),
 sourceAccount),
        new
 ExportablePropertyColumnPhoneTransferRequest(Model.of(DestAccount),
 destAccount),
        new
 ExportablePropertyColumnPhoneTransferRequest(Model.of(Amount),
 amount),
        new
 ExportablePropertyColumnPhoneTransferRequest(Model.of(Notication),
 notificationSent),};

        //creating dataTable object
        DefaultDataTable dataTable1 = new
 DefaultDataTable(datatable,columns,new PhoneTransferProvider(),30);

 any time i run this code i get

 an INTERNAL ERROR MESSAGE.

 please i need to get this sorted out today.

 Regards

 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/adding-link-to-datatable-tp3567971p3567971.html
 Sent from the Users forum mailing list archive at Nabble.com.

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



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



Re: adding link to datatable

2011-06-02 Thread James Carman
Class hierarchy.

On Thu, Jun 2, 2011 at 6:56 AM, James Carman ja...@carmanconsulting.com wrote:
 What is DetailsPage's hierarchy?

 On Thu, Jun 2, 2011 at 6:02 AM, henry henstri...@yahoo.com wrote:
 hi guys am having some issues my code any help will do,am trying to add a
 link to my datatable
 firstly i created the DetailPage class

 //DetailPage class code
 public DetailsPage(String id , IModel entryModel) {
        super(id,entryModel);

        Link link = new Link(link){
            @Override
            public void onClick() {
                showDetails details = new showDetails(getEntry());
                setResponsePage(details);
            }
        };

        add(new Label(id,getEntry().getId()+));
        add(link);
    }

    private PhoneTransferRequest getEntry(){
        return (PhoneTransferRequest)getDefaultModelObject();
    }

 and i try adding the DetailPage panel to my datatable

 IColumn[]columns = {new AbstractColumnPhoneTransferRequest(new
 ModelString(id)) {
        public void populateItem(Item cellItem, String componentId, IModel
 rowModel)
        {
            cellItem.add(new DetailsPage(componentId, rowModel));
        }
        },
        new
 ExportablePropertyColumnPhoneTransferRequest(Model.of(Initiator),
 customerId ),
        new
 ExportablePropertyColumnPhoneTransferRequest(Model.of(StartTime),
 startTime ),
        new
 ExportablePropertyColumnPhoneTransferRequest(Model.of(switchResponse),
 switchResponse),
        new
 ExportablePropertyColumnPhoneTransferRequest(Model.of(SourceAccount),
 sourceAccount),
        new
 ExportablePropertyColumnPhoneTransferRequest(Model.of(DestAccount),
 destAccount),
        new
 ExportablePropertyColumnPhoneTransferRequest(Model.of(Amount),
 amount),
        new
 ExportablePropertyColumnPhoneTransferRequest(Model.of(Notication),
 notificationSent),};

        //creating dataTable object
        DefaultDataTable dataTable1 = new
 DefaultDataTable(datatable,columns,new PhoneTransferProvider(),30);

 any time i run this code i get

 an INTERNAL ERROR MESSAGE.

 please i need to get this sorted out today.

 Regards

 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/adding-link-to-datatable-tp3567971p3567971.html
 Sent from the Users forum mailing list archive at Nabble.com.

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




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



Re: adding link to datatable

2011-06-02 Thread henry
here is the DetailsPage hierarchy

//DetailsPage.html

html
head
meta http-equiv=Content-Type content=text/html; charset=UTF-8/
titleDetailsPage/title
link rel=stylesheet type=text/css href=style.css/
/head
wicket:panel
henry 
/wicket:panel
 
/html


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/adding-link-to-datatable-tp3567971p3568176.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: adding link to datatable

2011-06-02 Thread henry
Here is the detailspage.html hierarchy
html
head
meta http-equiv=Content-Type content=text/html; charset=UTF-8/
titleDetailsPage/title
link rel=stylesheet type=text/css href=style.css/
/head
wicket:panel
henry 
/wicket:panel
 
/html

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/adding-link-to-datatable-tp3567971p3568183.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Wicket with Spring AOP

2011-06-02 Thread İzlem Gözükeleş
Merhaba,
I found the problem. My problem was mixing the Wicket and Spring
configurations. I had used both SpringBean and Spring's Autowire mechanisms
in some places...
Now, I modified the code and used only @SpringBean. Everything is working
properly.

2011/6/2 Altuğ Bilgin Altıntaş alt...@gmail.com

 Merhaba izlem;

 I think you should look at Proxy-based Approach. Spring and Wicket
 integration type is important.

 Please visit :  https://cwiki.apache.org/WICKET/spring.html.

 A.

 01 Haziran 2011 20:02 tarihinde İzlem Gözükeleş izl...@gmail.com yazdı:

  Furthermore, I changed the source code of spring framework and added
 serial
  interface for the class raising exception (
 
 
 org.springframework.aop.aspectj.annotation.InstantiationModelAwarePointcutAdvisorImp).
  and built it again.
 
  Application passed this exception, yet raised another
  NotSerializableException for another class from the same package (
  org.springframework.aop.aspectj.annotation).
 
  Is it possible to use spring's aspect annotations with wicket?
 
  Secondly, there are third party libraries containg classes which
  aren't Serializable.
  How can we inject these type of classes?
 
  Thanks,
 



 --
 *Altuğ*
 *www.kodcu.com* http://www.kodcu.com**



Wicket

2011-06-02 Thread Ivoneta
hello everyone

I need some help..

I have an application based on struts... This application has some links,
and I need this links calls a Wicket Pageit is possible?
I think that is possible calls ising the url page , but the problem is the
wicket generates the urls dinamically... 

How can I do this?



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-tp3568681p3568681.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Wicket

2011-06-02 Thread Ivoneta
hello everyone

I need some help..

I have an application based on struts... This application has some links,
and I need this links calls a Wicket Pageit is possible?
I think that is possible calls ising the url page , but the problem is the
wicket generates the urls dinamically... 

How can I do this?



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-tp3568682p3568682.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Wicket

2011-06-02 Thread Igor Vaynberg
mount your wicket page so it has a well known url which you can call
from the struts app.

-igor


On Thu, Jun 2, 2011 at 8:51 AM, Ivoneta ietaraz...@gmail.com wrote:
 hello everyone

 I need some help..

 I have an application based on struts... This application has some links,
 and I need this links calls a Wicket Pageit is possible?
 I think that is possible calls ising the url page , but the problem is the
 wicket generates the urls dinamically...

 How can I do this?



 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/Wicket-tp3568681p3568681.html
 Sent from the Users forum mailing list archive at Nabble.com.

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



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



WicketTester and the rendered page

2011-06-02 Thread msalman
I am testing an application that starts with a login page.  After logging in
the user is taken to the home page.   


@Test
public void test()
{

QuickStartApplication app = new QuickStartApplication();


Class clazz = app.getHomePage();

WicketTester tester = new WicketTester(new 
QuickStartApplication());

WebPage loginPage = null;
try 
{
loginPage = (WebPage) app.getHomePage().newInstance();
} 
catch (Exception e) 
{
e.printStackTrace();
} 

// Start out with the login Page

tester.startPage(loginPage);
tester.assertRenderedPage(LoginPage.class); 


tester.assertComponent(form:name, TextField.class);   

tester.assertComponent(form:password, 
PasswordTextField.class);




// login form
FormTester formTester = tester.newFormTester(form);

formTester.setValue(name, 1);
formTester.setValue(password, 1);

// click button to login
tester.executeAjaxEvent(form:submit, onclick);  
formTester.submit(submit);



// Successfully logged in.  On the HomePage now 
tester.assertRenderedPage(HomePage.class);  



tester.assertComponent(form:text1, TextField.class);  



formTester = tester.newFormTester(form);

formTester.setValue(text1, 1);


// submit the home page form
tester.executeAjaxEvent(form:submit, onclick);  
formTester.submit(submit);


tester.assertRenderedPage(HomePage.class);
// Fails here.  
// junit.framework.AssertionFailedError: expected:HomePage but
was:LoginPage

// Why is that?  It has already asserted earlier that it is the 
home
page..

}


Am I doing this thing right?  Do I understand the Wicket tester right.  

I am attaching a quickstart project that includes the above test.

As always, I would appreciate any help.  

Thanks.


-Mohammad

http://apache-wicket.1842946.n4.nabble.com/file/n3568766/WicketTesterTest.zip
WicketTesterTest.zip 






--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/WicketTester-and-the-rendered-page-tp3568766p3568766.html
Sent from the Users forum mailing list archive at Nabble.com.

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



RE: WicketTester and the rendered page

2011-06-02 Thread John Owen
You submitted the HomePage form. Where do you expect the app to go from there?

-Original Message-
From: msalman [mailto:mohammad_sal...@yahoo.com] 
Sent: Thursday, June 02, 2011 11:24 AM
To: users@wicket.apache.org
Subject: WicketTester and the rendered page

I am testing an application that starts with a login page.  After logging in
the user is taken to the home page.   


@Test
public void test()
{

QuickStartApplication app = new QuickStartApplication();


Class clazz = app.getHomePage();

WicketTester tester = new WicketTester(new 
QuickStartApplication());

WebPage loginPage = null;
try 
{
loginPage = (WebPage) app.getHomePage().newInstance();
} 
catch (Exception e) 
{
e.printStackTrace();
} 

// Start out with the login Page

tester.startPage(loginPage);
tester.assertRenderedPage(LoginPage.class); 


tester.assertComponent(form:name, TextField.class);   

tester.assertComponent(form:password, 
PasswordTextField.class);




// login form
FormTester formTester = tester.newFormTester(form);

formTester.setValue(name, 1);
formTester.setValue(password, 1);

// click button to login
tester.executeAjaxEvent(form:submit, onclick);  
formTester.submit(submit);



// Successfully logged in.  On the HomePage now 
tester.assertRenderedPage(HomePage.class);  



tester.assertComponent(form:text1, TextField.class);  



formTester = tester.newFormTester(form);

formTester.setValue(text1, 1);


// submit the home page form
tester.executeAjaxEvent(form:submit, onclick);  
formTester.submit(submit);


tester.assertRenderedPage(HomePage.class);
// Fails here.  
// junit.framework.AssertionFailedError: expected:HomePage but
was:LoginPage

// Why is that?  It has already asserted earlier that it is the 
home
page..

}


Am I doing this thing right?  Do I understand the Wicket tester right.  

I am attaching a quickstart project that includes the above test.

As always, I would appreciate any help.  

Thanks.


-Mohammad

http://apache-wicket.1842946.n4.nabble.com/file/n3568766/WicketTesterTest.zip
WicketTesterTest.zip 






--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/WicketTester-and-the-rendered-page-tp3568766p3568766.html
Sent from the Users forum mailing list archive at Nabble.com.

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


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



RE: WicketTester and the rendered page

2011-06-02 Thread msalman
Thanks for the quick response.

Well, I want it to stay at the Home Page.  How did it go back to loginPage??

Thanks again.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/WicketTester-and-the-rendered-page-tp3568766p3568826.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: WicketTester and clicking a tree node

2011-06-02 Thread msalman
Pedro, thanks for your response.

I solved my problem in the following way:


For my derived DefaultMutableTreeNode class I added an Ajax link element:


public class CheckBoxSelectableTreeItem 
extends DefaultMutableTreeNode
{
   
   protected AjaxLink clickLink;  // for testing the expand/collapse link

public AjaxLink getClickLink() {
return clickLink;
}




public void setClickLink(AjaxLink clickLink) {
this.clickLink = clickLink;
}

   

}



For my tree class I overrode the newJunctionLink  method like this:


public class CheckBoxTree extends LinkTree
{
  .

@Override
protected Component newJunctionLink(MarkupContainer parent, final String
id, final Object node)
{
AjaxLink link = (AjaxLink) super.newJunctionLink(parent, id, 
node);


((CheckBoxSelectableTreeItem)node).setClickLink(link);

return link;
}
  

}



So in the test when you have the node you can open (expand) it this way:

CheckBoxSelectableTreeItem node=  get Node

AjaxLink nodeLink = node.getClickLink();

tester.executeAjaxEvent(nodeLink, onclick);







--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/WicketTester-and-clicking-a-tree-node-tp3556724p3568831.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Link onClick() method update on runtime

2011-06-02 Thread meduolis
Is there any way to update onClick method for the same link?

Let say I have link


add(new Link(myLink) {
public void onClick() {
// do something here...
}
);


And later, when I click other control I want to update myLink onClick logic

public void onClick() {
// do something else if button clicked
}



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Link-onClick-method-update-on-runtime-tp3568895p3568895.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Link onClick() method update on runtime

2011-06-02 Thread Sven Meier

Sure, it's just Java:

add(new Link(myLink) {
public void onClick() {
if (buttonClicked) {
// do something else if button (was) clicked
} else {
// do something here...
}
}
});

add(new Button(myButton) {
public void onSubmit() {
buttonClicked = true;
}
});

Hope this helps

Sven


On 06/02/2011 07:21 PM, meduolis wrote:

Is there any way to update onClick method for the same link?

Let say I have link


add(new Link(myLink) {
 public void onClick() {
 // do something here...
 }
);


And later, when I click other control I want to update myLink onClick logic

public void onClick() {
 // do something else if button clicked
}



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Link-onClick-method-update-on-runtime-tp3568895p3568895.html
Sent from the Users forum mailing list archive at Nabble.com.

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




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



Re: Link onClick() method update on runtime

2011-06-02 Thread meduolis
I will update this onClick recursive, need some more dynamic solution

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Link-onClick-method-update-on-runtime-tp3568895p3568935.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Link onClick() method update on runtime

2011-06-02 Thread andrea del bene

Hi,

you can consider to attach/remove behaviors to you link. For example :

link = new Link(link){
@Override
public void onClick() {
}
};

link.add(new AjaxEventBehavior(onclick) {
protected void onEvent(AjaxRequestTarget target) {
System.out.println(ajax here!);
}
});


When link is clicked Behavior is run before onClick. You can add/remove 
behaviors according to your needs.

I will update this onClick recursive, need some more dynamic solution

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Link-onClick-method-update-on-runtime-tp3568895p3568935.html
Sent from the Users forum mailing list archive at Nabble.com.

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





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



Re: Link onClick() method update on runtime

2011-06-02 Thread Sven Meier
Use the strategy pattern (i.e. changing the strategy each time a button 
is submitted):


http://en.wikipedia.org/wiki/Strategy_pattern

Sven

On 06/02/2011 07:42 PM, meduolis wrote:

I will update this onClick recursive, need some more dynamic solution

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Link-onClick-method-update-on-runtime-tp3568895p3568935.html
Sent from the Users forum mailing list archive at Nabble.com.

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




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



Re: WicketTester and clicking a tree node

2011-06-02 Thread Pedro Santos
Hi Mohammad, nice you created the test case. I just would recommend to
don't make any reference from your domains objects (TreeNode) to view
ones (AjaxLink) because they are usually packaged in different places.
Take a look at how I created a similar test:

http://svn.apache.org/repos/asf/wicket/releases/wicket-1.4.17/wicket-extensions/src/test/java/org/apache/wicket/extensions/markup/html/tree/MoveChildToParentNodeMarkedForRecreationTest.java

On Thu, Jun 2, 2011 at 1:53 PM, msalman mohammad_sal...@yahoo.com wrote:
 Pedro, thanks for your response.

 I solved my problem in the following way:


 For my derived DefaultMutableTreeNode class I added an Ajax link element:


 public class CheckBoxSelectableTreeItem
 extends DefaultMutableTreeNode
 {
   
   protected AjaxLink clickLink;  // for testing the expand/collapse link

        public AjaxLink getClickLink() {
                return clickLink;
        }




        public void setClickLink(AjaxLink clickLink) {
                this.clickLink = clickLink;
        }

   

 }



 For my tree class I overrode the newJunctionLink  method like this:


 public class CheckBoxTree extends LinkTree
 {
  .

        @Override
        protected Component newJunctionLink(MarkupContainer parent, final 
 String
 id, final Object node)
        {
                AjaxLink link = (AjaxLink) super.newJunctionLink(parent, id, 
 node);


                ((CheckBoxSelectableTreeItem)node).setClickLink(link);

                return link;
        }
  

 }



 So in the test when you have the node you can open (expand) it this way:

                CheckBoxSelectableTreeItem node=  get Node

                AjaxLink nodeLink = node.getClickLink();

                tester.executeAjaxEvent(nodeLink, onclick);







 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/WicketTester-and-clicking-a-tree-node-tp3556724p3568831.html
 Sent from the Users forum mailing list archive at Nabble.com.

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





-- 
Pedro Henrique Oliveira dos Santos

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



Re: Wicket

2011-06-02 Thread Ivoneta
but I don't know how get the URL for the page?
Wicket generates de URL dinamically right?
How can generates an static URL?




--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-tp3568681p3569148.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Wicket

2011-06-02 Thread andrea del bene
You can mount a page to a static path in you Application class. in 
Wicket 1.4.x just call mountBookmarkablePage:


//url for asterisk calls
mountBookmarkablePage(/DialPage, DialPage.class);

Under Wicket 1.5 you should call mountPage instead of mountBookmarkablePage.

but I don't know how get the URL for the page?
Wicket generates de URL dinamically right?
How can generates an static URL?




--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-tp3568681p3569148.html
Sent from the Users forum mailing list archive at Nabble.com.

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





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



Re: WicketTester and clicking a tree node

2011-06-02 Thread msalman
Hi Pedro.

But how do you get the link's id i.e., moveC3ToC2?

I added all the code to the Node and Tree derive classes to so that I could
get the link id.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/WicketTester-and-clicking-a-tree-node-tp3556724p3569317.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: 1.5-SNAPSHOT build repository

2011-06-02 Thread Serban.Balamaci
Ah it's ok to use
https://repository.apache.org/content/repositories/snapshots

didn't have an update policy specified(although default is daily) and the
snapshot version was red, but changing it must have forced an IDE reimport.
repository
idApache Nexus - snapshots/id
   
urlhttps://repository.apache.org/content/repositories/snapshots/url
releases
enabledfalse/enabled
/releases
snapshots
enabledtrue/enabled
updatePolicydaily/updatePolicy
/snapshots
/repository


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/1-5-SNAPSHOT-build-repository-tp3565884p3567743.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: 1.5-SNAPSHOT build repository

2011-06-02 Thread Serban.Balamaci
Hello,
I was referring to a maven snapshot repository from where to have maven
check daily for new builds of the snapshot version.
What I currently do is to manually svn checkout and do mvn install. Not
really a problem but the phrase If you want to stay recent but don't want
to build yourself, you can use the snapshots generated by our bamboo server,
which are available at http://wicketstuff.org/maven/repository/; means that
at some time this was possible?

Thanks.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/1-5-SNAPSHOT-build-repository-tp3565884p3567695.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: How would you realize a delete-Link in a datagrid row?

2011-06-02 Thread dhans006
Hi ,

I am also looking the same, could you please share the details, if you found
the solution.

regards
dhans


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/How-would-you-realize-a-delete-Link-in-a-datagrid-row-tp1889342p3567661.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Images referencing in CSS with Wicket

2011-06-02 Thread Igor Vaynberg
if you want to reference images from css the images have to live next
to the css file. so if your css is in webapp, the images have to be
based in webapp, but if your css lives in a java package the images
have to live there as well. this way relative urls work.

-igor

On Thu, Jun 2, 2011 at 11:04 AM, Suraj Chandran chandransu...@gmail.com wrote:
 Hey guys,

 I am referring to an image in CSS as follows:
 body {
    background-image: url(*images/theme/sky.jpg*);
 }

 But the browser can't load the url. But instead if I place the full path in
 the url, then image loads up just fine.

 I read a similar problem on SO here:
 http://stackoverflow.com/questions/5279232/images-referencing-in-css-with-wicket-for-hundreds-of-images
 In the end of the answer there:  Wicket doesn't support it somehow
 internally. I am quite surprised. For mounting bookmarkable pages for the
 whole package we have mount(path, packageName), but for resources nothing
 (if I understand it right).

 Can someone tell me what is the preferred way of approaching this problem.

 This mounting thing is very confusing for me. Can someone point me to the
 best tutorial about urls/mounts/resources in wicket. I am using 1.5rc4.2

 Thanks a lot,
 Suraj.


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



Preserving user input on ajax changes

2011-06-02 Thread Nelson Segura
I have a form to which I need to add dynamic fields using ajax, whenever the
user clicks on the add new input link.
I need to preserve the current user input, without actually updating the
backing models (or at least preserve input that is not completely valid, or
do not show errors if the user as not entered a required field)

I am using an AjaxSubmitLink to submit the current user input, but

(a) I am not able to preserve the input (if I use
setDefaultFormProcessing(true))
(b) I get validation errors, or lose invalid input if I try to mock with the
onError() method of the AjaxSubmitLink

What is the correct way to do this?

-Nelson


Re: Preserving user input on ajax changes

2011-06-02 Thread Igor Vaynberg
you want setDefaultFormProcessing(false)

-igor

On Thu, Jun 2, 2011 at 3:41 PM, Nelson Segura nsegu...@gmail.com wrote:
 I have a form to which I need to add dynamic fields using ajax, whenever the
 user clicks on the add new input link.
 I need to preserve the current user input, without actually updating the
 backing models (or at least preserve input that is not completely valid, or
 do not show errors if the user as not entered a required field)

 I am using an AjaxSubmitLink to submit the current user input, but

 (a) I am not able to preserve the input (if I use
 setDefaultFormProcessing(true))
 (b) I get validation errors, or lose invalid input if I try to mock with the
 onError() method of the AjaxSubmitLink

 What is the correct way to do this?

 -Nelson


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



Re: Preserving user input on ajax changes

2011-06-02 Thread Nelson Segura
On the AjaxSubmitLink, correct?
When I do that, the input of the other fields is lost (which has not been
previously submitted).
How does wicket exactly decides whether to show the model value or the user
raw input?
My Ajax links is refreshing the whole panel.
-Nelson


On Thu, Jun 2, 2011 at 4:14 PM, Igor Vaynberg igor.vaynb...@gmail.comwrote:

 you want setDefaultFormProcessing(false)

 -igor

 On Thu, Jun 2, 2011 at 3:41 PM, Nelson Segura nsegu...@gmail.com wrote:
  I have a form to which I need to add dynamic fields using ajax, whenever
 the
  user clicks on the add new input link.
  I need to preserve the current user input, without actually updating the
  backing models (or at least preserve input that is not completely valid,
 or
  do not show errors if the user as not entered a required field)
 
  I am using an AjaxSubmitLink to submit the current user input, but
 
  (a) I am not able to preserve the input (if I use
  setDefaultFormProcessing(true))
  (b) I get validation errors, or lose invalid input if I try to mock with
 the
  onError() method of the AjaxSubmitLink
 
  What is the correct way to do this?
 
  -Nelson
 

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




Re: Preserving user input on ajax changes

2011-06-02 Thread Pedro Santos
Hi Nelson, the raw input has preference and it remains in the form
component until be converted and set in the form component model. For
your use case you can use a simple AjaxLink targeting just the dynamic
fields panel, not the whole form.

On Thu, Jun 2, 2011 at 8:22 PM, Nelson Segura nsegu...@gmail.com wrote:
 On the AjaxSubmitLink, correct?
 When I do that, the input of the other fields is lost (which has not been
 previously submitted).
 How does wicket exactly decides whether to show the model value or the user
 raw input?
 My Ajax links is refreshing the whole panel.
 -Nelson


 On Thu, Jun 2, 2011 at 4:14 PM, Igor Vaynberg igor.vaynb...@gmail.comwrote:

 you want setDefaultFormProcessing(false)

 -igor

 On Thu, Jun 2, 2011 at 3:41 PM, Nelson Segura nsegu...@gmail.com wrote:
  I have a form to which I need to add dynamic fields using ajax, whenever
 the
  user clicks on the add new input link.
  I need to preserve the current user input, without actually updating the
  backing models (or at least preserve input that is not completely valid,
 or
  do not show errors if the user as not entered a required field)
 
  I am using an AjaxSubmitLink to submit the current user input, but
 
  (a) I am not able to preserve the input (if I use
  setDefaultFormProcessing(true))
  (b) I get validation errors, or lose invalid input if I try to mock with
 the
  onError() method of the AjaxSubmitLink
 
  What is the correct way to do this?
 
  -Nelson
 

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






-- 
Pedro Henrique Oliveira dos Santos

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



Re: Preserving user input on ajax changes

2011-06-02 Thread Igor Vaynberg
default processing = false means do not validate, etc. but, inputs are
preserved. make sure your ajaxsubmitlink is inside the correct form.
you can specify one in its constructor.

-igor

On Thu, Jun 2, 2011 at 4:22 PM, Nelson Segura nsegu...@gmail.com wrote:
 On the AjaxSubmitLink, correct?
 When I do that, the input of the other fields is lost (which has not been
 previously submitted).
 How does wicket exactly decides whether to show the model value or the user
 raw input?
 My Ajax links is refreshing the whole panel.
 -Nelson


 On Thu, Jun 2, 2011 at 4:14 PM, Igor Vaynberg igor.vaynb...@gmail.comwrote:

 you want setDefaultFormProcessing(false)

 -igor

 On Thu, Jun 2, 2011 at 3:41 PM, Nelson Segura nsegu...@gmail.com wrote:
  I have a form to which I need to add dynamic fields using ajax, whenever
 the
  user clicks on the add new input link.
  I need to preserve the current user input, without actually updating the
  backing models (or at least preserve input that is not completely valid,
 or
  do not show errors if the user as not entered a required field)
 
  I am using an AjaxSubmitLink to submit the current user input, but
 
  (a) I am not able to preserve the input (if I use
  setDefaultFormProcessing(true))
  (b) I get validation errors, or lose invalid input if I try to mock with
 the
  onError() method of the AjaxSubmitLink
 
  What is the correct way to do this?
 
  -Nelson
 

 -
 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: FormComponent convertInput for children FormComponets

2011-06-02 Thread Igor Vaynberg
create a quickstart and we can see if there is an easy fix. at first
glance it seems rather strange to have a form inside a
formcomponentpanel

-igor

On Wed, Jun 1, 2011 at 6:56 PM, Clint Checketts checke...@gmail.com wrote:
 I finally had a chance to create a quickstart and play with it. The issue
 happens when my FormComponentPanel has its own form. So it appears that the
 inner form delays the processing of those inner elements.

 Once I removed the inner form so the child FormComponents were added
 directly to my FormComponentPanel the getConvertedInput worked as expected.

 wicket:panel
 form wicket:id=form   This inner form in
 the panel was the culprit!
 div wicket:id=namesList
    label wicket:id=label/label
    input wicket:id=name /

 /div
 /form
 /wicket:panel

 So this leads into another question: Is the a better solution to making it
 work if I can't remove the inner form?


 -Clint

 On Thu, May 19, 2011 at 11:16 AM, Clint Checketts checke...@gmail.comwrote:

 I'll validate my code again. It is running on Wicket 1.4.1 so maybe it was
 linked to the older version.

 Thanks everyone for the help, its good to know that it is working correctly
 for others.

 -Clint

 On Thu, May 19, 2011 at 7:51 AM, Bertrand Guay-Paquet 
 ber...@step.polymtl.ca wrote:

 Hi,

 I am doing the same kind of processing and it works fine. I have a
 FormComponentPanel with children FormComponentPanels. Here is what the
 convertInput() method looks like for the root FormComponentPanel:
 protected void convertInput() {
    // Retrieve all children
    final ListFoo fooList = new ArrayListFoo();
    foosRepeater.visitChildren(FooFormFields.class,
            new IVisitorFooFormFields, Void() {
                @Override
                public void component(FooFormFields a_object, IVisitVoid
 a_visit) {
                    Foo foo = a_object.getConvertedInput();
                    if (foo != null) {
                        fooList.add(foo);
                    }
                }
            });
    setConvertedInput(fooList);
 }

 All the children validators are called and their convertedInput is
 properly set.

 Bertrand



 On 16/05/2011 5:35 PM, Clint Checketts wrote:

   I have a FormComponentPanel that contains multiple child formcomponent.
 The purpose of this panel is to be able to add in several cihldren
 dynamically. The end model is supposed to be the list from all the
 children
 component. I get the value in my convertInput() method by iterating over
 all
 the children components, calling each one's getConvertedInput()

 Here's the problem, the child component's values haven't convertedTheir
 input at that point, so i call 'validate()' on each one to trigger that
 coversion.  Is that the right way to approach this? Am i causing
 unneeded/duplicate processing?
 .

 protected void convertInput() {
   final ArrayListT  convertedInputList = new ArrayListT();
   inForm.visitFormComponents(new IVisitor() {
    public Object formComponent(IFormVisitorParticipant formComponent) {
     if (formComponent instanceof FormComponent?) {
      FormComponentT  fc = (FormComponentT) formComponent;
      *fc.validate();
 *     T convertedInput =  *fc.getConvertedInput();
 *     if(null != convertedInput){
       convertedInputList.add(convertedInput);
      }
     }
     return Component.IVisitor.CONTINUE_TRAVERSAL;
    }
   });
   setConvertedInput(convertedInputList);
  }

  Thanks,

 -Clint


  -
 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



setReuseItems(true) + transactions = ERROR

2011-06-02 Thread Gonzalo Aguilar Delgado
Hello, 

I used to refresh all the components in the listview for each http
transaction.

But now I tried to use the:

setReuseItems(true); 

When using a ListView. Documentation says that is a must (but I made it
to work without it).

The problem is that now the objects are serialized and deserialized and
not loaded from database in each http transaction. Result is that I
always get the following error:

Row was updated or deleted by another transaction (or unsaved-value
mapping was incorrect)


How can I avoid this error and use the setReuseItems(true)?

Thank you in advance.


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



Re: FormComponent convertInput for children FormComponets

2011-06-02 Thread Clint Checketts
I created https://issues.apache.org/jira/browse/WICKET-3765 and attached a
quickstart.

I commented out the Form in the quickstart. Just uncomment those lines to
see the bug.

Regarding the strangeness of the Form in the FormComponent: I may be able to
remove the Form. This is an older component that I created over a year ago
and finally figured out how to do it correctly when reading the Wicket
Cookbook, which exposed this behavior.

I may be able to refactor the inner Form out of the FormComponent, but the
nature of my component is that the repeating element (as in a TextField) is
configurable so it could be a TextField, or  some other custom field (which
could in turn have a possible inner form) so I want to make it as resilient
as possible.

Thanks!

-Clint

On Thu, Jun 2, 2011 at 9:42 PM, Igor Vaynberg igor.vaynb...@gmail.comwrote:

 create a quickstart and we can see if there is an easy fix. at first
 glance it seems rather strange to have a form inside a
 formcomponentpanel

 -igor

 On Wed, Jun 1, 2011 at 6:56 PM, Clint Checketts checke...@gmail.com
 wrote:
  I finally had a chance to create a quickstart and play with it. The issue
  happens when my FormComponentPanel has its own form. So it appears that
 the
  inner form delays the processing of those inner elements.
 
  Once I removed the inner form so the child FormComponents were added
  directly to my FormComponentPanel the getConvertedInput worked as
 expected.
 
  wicket:panel
  form wicket:id=form   This inner form in
  the panel was the culprit!
  div wicket:id=namesList
 label wicket:id=label/label
 input wicket:id=name /
 
  /div
  /form
  /wicket:panel
 
  So this leads into another question: Is the a better solution to making
 it
  work if I can't remove the inner form?
 
 
  -Clint
 
  On Thu, May 19, 2011 at 11:16 AM, Clint Checketts checke...@gmail.com
 wrote:
 
  I'll validate my code again. It is running on Wicket 1.4.1 so maybe it
 was
  linked to the older version.
 
  Thanks everyone for the help, its good to know that it is working
 correctly
  for others.
 
  -Clint
 
  On Thu, May 19, 2011 at 7:51 AM, Bertrand Guay-Paquet 
  ber...@step.polymtl.ca wrote:
 
  Hi,
 
  I am doing the same kind of processing and it works fine. I have a
  FormComponentPanel with children FormComponentPanels. Here is what the
  convertInput() method looks like for the root FormComponentPanel:
  protected void convertInput() {
 // Retrieve all children
 final ListFoo fooList = new ArrayListFoo();
 foosRepeater.visitChildren(FooFormFields.class,
 new IVisitorFooFormFields, Void() {
 @Override
 public void component(FooFormFields a_object,
 IVisitVoid
  a_visit) {
 Foo foo = a_object.getConvertedInput();
 if (foo != null) {
 fooList.add(foo);
 }
 }
 });
 setConvertedInput(fooList);
  }
 
  All the children validators are called and their convertedInput is
  properly set.
 
  Bertrand
 
 
 
  On 16/05/2011 5:35 PM, Clint Checketts wrote:
 
I have a FormComponentPanel that contains multiple child
 formcomponent.
  The purpose of this panel is to be able to add in several cihldren
  dynamically. The end model is supposed to be the list from all the
  children
  component. I get the value in my convertInput() method by iterating
 over
  all
  the children components, calling each one's getConvertedInput()
 
  Here's the problem, the child component's values haven't
 convertedTheir
  input at that point, so i call 'validate()' on each one to trigger
 that
  coversion.  Is that the right way to approach this? Am i causing
  unneeded/duplicate processing?
  .
 
  protected void convertInput() {
final ArrayListT  convertedInputList = new ArrayListT();
inForm.visitFormComponents(new IVisitor() {
 public Object formComponent(IFormVisitorParticipant formComponent)
 {
  if (formComponent instanceof FormComponent?) {
   FormComponentT  fc = (FormComponentT) formComponent;
   *fc.validate();
  * T convertedInput =  *fc.getConvertedInput();
  * if(null != convertedInput){
convertedInputList.add(convertedInput);
   }
  }
  return Component.IVisitor.CONTINUE_TRAVERSAL;
 }
});
setConvertedInput(convertedInputList);
   }
 
   Thanks,
 
  -Clint
 
 
   -
  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




[OT] Google, Microsoft, and Yahoo Team Up to Improve Search

2011-06-02 Thread Attila Király
Hi,

Maybe not everyone heard about it but there is a new way to enhance the
markup and make it more search crawler friendly: http://schema.org . It
seems interesting.

Attila