[
https://issues.apache.org/jira/browse/TAPESTRY-2690?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12632688#action_12632688
]
Geoff Callender commented on TAPESTRY-2690:
-------------------------------------------
Here is example code. It's a User Search that requires a Form around the Grid
so that a checkbox can be shown in each row. The _searchLoginId in this example
is ignored to keep it simple.
<html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd">
<h1>Search Users</h1>
<form t:type="form" t:id="form">
LoginId: <input t:id="loginId" t:type="TextField"
t:value="searchLoginId"/><br/>
<input type="submit" value="Search"/><br/>
<t:grid t:source="users" t:row="user" t:volatile="true"
t:include="loginId,active">
<t:parameter name="activeCell">
<input t:type="checkbox" value="user.active"
t:disabled="true"/>
</t:parameter>
</t:grid>
</form>
</html>
package jumpstart.web.pages.theapp.security;
import java.util.List;
import jumpstart.business.domain.security.User;
import jumpstart.business.domain.security.iface.ISecurityFinderSvcLocal;
import jumpstart.web.annotation.ProtectedPage;
import jumpstart.web.services.IBusinessServicesLocator;
import org.apache.tapestry5.annotations.Property;
import org.apache.tapestry5.ioc.annotations.Inject;
@ProtectedPage
public class UserSearch {
@SuppressWarnings("unused")
@Property
private String _searchLoginId;
@SuppressWarnings("unused")
@Property
private List<User> _users;
@SuppressWarnings("unused")
@Property
private User _user;
@Inject
private IBusinessServicesLocator _businessServicesLocator;
void setupRender() {
_users = getSecurityFinderService().findUsersShallowish();
}
private ISecurityFinderSvcLocal getSecurityFinderService() {
return _businessServicesLocator.getSecurityFinderSvcLocal();
}
}
> Cannot submit when Form is around Grid
> --------------------------------------
>
> Key: TAPESTRY-2690
> URL: https://issues.apache.org/jira/browse/TAPESTRY-2690
> Project: Tapestry
> Issue Type: Bug
> Components: tapestry-core
> Affects Versions: 5.0.15
> Reporter: Geoff Callender
>
> When Form is around a Grid a submit results in:
> Failure reading parameter 'source' of component
> theapp/security/UserSearch:grid.columns.loop:
> org.apache.tapestry5.ioc.internal.util.TapestryException
> ...snipped...
> Caused by: java.lang.NullPointerException
> at
> org.apache.tapestry5.corelib.components.GridColumns.getColumnNames(GridColumns.java:226)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]