Nope, still the same issue

    public void onActivate(EventContext eventContext) {
        selectedScene = eventContext.getCount() > 0 ?
eventContext.get(Scene.class, 0) : null;
        selectedShot = eventContext.getCount() > 1 ?
eventContext.get(Shot.class, 1) : null;
        selectedComponent = eventContext.getCount() > 2 ?
eventContext.get(ShotComponent.class, 2) : null;
    }

    public void onPrepare() {
        if (!selectedScene.getProject().equals(user.getSelectedProject())) {
            user.setSelectedProject(selectedScene.getProject());
        }

        shotComponents = systemManager.getComponents(selectedShot, filter);
        CollectionUtils.sortComponents(shotComponents);
    }

    public Object[] onPassivate() {
        return new Object[]{selectedScene, selectedShot, selectedComponent};
    }


I suppose I could accept String in the context and then manually load the
object...but that just sounds wrong as tapestry should be able to handle
this, right?

On Thu, Sep 11, 2014 at 9:25 AM, Lance Java <lance.j...@googlemail.com>
wrote:

> Try again:
>
> public void onActivate(EventContext eventContext) {
>    selectedScene = eventContext.getCount() > 0 ?
> eventContext.get(Scene.class, 0) : null;
>    selectedShot = eventContext.getCount() > 1 ?
> eventContext.get(Shot.class, 1) : null;
>    selectedComponent = eventContext.getCount() > 2 ?
> eventContext.get(ShotComponent.class, 2) : null;
> }
>
> public void onPrepare() {
>    if (!scene.getProject().equals(user.getSelectedProject())) {
>       user.setSelectedProject(scene.getProject());
>    }
>
>    shotComponents = systemManager.getComponents(selectedShot, filter);
>    CollectionUtils.sortComponents(shotComponents);
> }
>



-- 
Sincerely
*Boris Horvat*

Reply via email to