[ 
https://issues.apache.org/jira/browse/WICKET-2267?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Martin Makundi updated WICKET-2267:
-----------------------------------

    Attachment: Wicket-Quickstart.zip

The attached quickstart does not compile (by default) without the new features. 

However, it can be run by commenting in and out the "TODO New feature request" 
lines):

switch the comments of:
{
formTester.setValue(bookItems.get(1).getAuthorField(), "Hemingway"); // TODO 
New feature request
// 
tester.getServletRequest().setParameter(bookItems.get(1).getAuthorField().getInputName(),
 "Hemingway");
}
and
{
 formTester.submit(bookForm.getSubmitButton()); // TODO New feature request
// formTester.submit();
}


> Type safe component path support for listviews, improve coding efficiency by 
> 60%
> --------------------------------------------------------------------------------
>
>                 Key: WICKET-2267
>                 URL: https://issues.apache.org/jira/browse/WICKET-2267
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket
>    Affects Versions: 1.4-RC2
>            Reporter: Martin Makundi
>         Attachments: Wicket-Quickstart.zip
>
>   Original Estimate: 5h
>  Remaining Estimate: 5h
>
> I suggest that the following methods be added into formTester:
> 1. formTester.setValue(Component component, String value); // Instead of just 
> the String path version
> 2. formTester.submit(IFormSubmittingComponent button (or suitable 
> superclass)); // Instead of just the String path version
> Furthermore, I suggest incorporating the following abstract ListView 
> implementation:
> public abstract class TestableListView<ListItemType extends 
> ListItem<ItemType>, ItemType> extends ListView<ItemType> {
>       public TestableListView(String id, IModel<List<ItemType>> model) {
>               super(id, model);
>       }
>       public TestableListView(String id, List<ItemType> list) {
>               super(id, list);
>       }
>       public TestableListView(String id) {
>               super(id);
>       }
>       @Override
>       protected final void populateItem(ListItem<ItemType> item) {
>               // do nothing here
>       }
>       @Override
>     protected abstract ListItemType newItem(int index);
>       
>       @Override
>       public Iterator<ListItemType> iterator() {
>               return (Iterator<ListItemType>) super.iterator();
>       }
> }
> For more details, see attached quickstart.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to