Created
December 19, 2011 11:44
-
-
Save hugithordarson/1496826 to your computer and use it in GitHub Desktop.
Tomcat problems
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package is.landsvirkjun.admin.components; | |
import is.landsvirkjun.admin.components.parents.DetailPage; | |
import is.landsvirkjun.admin.components.parents.LVComponent; | |
import is.landsvirkjun.admin.util.CRUDUtil; | |
import org.apache.cayenne.CayenneDataObject; | |
import org.apache.tapestry5.annotations.Parameter; | |
import org.apache.tapestry5.annotations.Property; | |
import org.apache.tapestry5.ioc.annotations.Inject; | |
import org.apache.tapestry5.services.ComponentSource; | |
public class ObjectLink extends LVComponent { | |
@Property | |
@Parameter( required = true ) | |
private CayenneDataObject object; | |
@Inject | |
private ComponentSource componentSource; | |
Object onActionFromSelect( CayenneDataObject context ) { | |
Class pageClass = CRUDUtil.detailPageClass( context.getClass() ); | |
DetailPage<CayenneDataObject> t = (DetailPage<CayenneDataObject>)componentSource.getPage( pageClass ); | |
t.setSelectedObject( context ); | |
return t; | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<t:container xmlns:t="http://tapestry.apache.org/schema/tapestry_5_3.xsd"> | |
<t:actionLink t:id="select" t:context="object"><t:body /></t:actionLink> | |
</t:container> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment