IEngine replacement 4.0

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

IEngine replacement 4.0

seloha .
I am trying to write a Tapestry 4.0 application with reference to the
workbench.

Workbench uses:

Visit visit = (Visit) cycle.getEngine().getVisit();

where cycle is an instance of IRequestCycle.

IEngine has been deprecated in 4.0 and will be removed in 4.1.

What I am wondering is how should the use of visit be handled properly in
4.0?

Paul



---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: IEngine replacement 4.0

pferraro
Check out the section on application state objects:
http://jakarta.apache.org/tapestry/current/UsersGuide/state.html#state.aso

Paul

seloha . wrote:

> I am trying to write a Tapestry 4.0 application with reference to the
> workbench.
>
> Workbench uses:
>
> Visit visit = (Visit) cycle.getEngine().getVisit();
>
> where cycle is an instance of IRequestCycle.
>
> IEngine has been deprecated in 4.0 and will be removed in 4.1.
>
> What I am wondering is how should the use of visit be handled properly
> in 4.0?
>
> Paul
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: IEngine replacement 4.0

seloha .
Thanks Paul,

I read the section and I am able to create an application state object and
inject it into a page.

The problem I have is referencing the object in the WorkbenchHomeService
class which extends HomeService.

In hivemind.xml I have tried using:

<set-object property="tabSelected" value="app-property:tab-selected"/>

inside:

<service-point id="Home"
interface="org.apache.tapestry.engine.IEngineService">

where tab-selected is:

  <contribution configuration-id="tapestry.state.ApplicationObjects">
    <state-object name="tab-selected" scope="session">
      <create-instance class="org.tapestry.workbench.TabSelected"/>
    </state-object>
  </contribution>

but when I reference this in WorkbenchHomeService class it is always null
although the

<inject-state property="tabSelected" object="tab-selected"/>

referenced in  a <component-specification> maintains its value.

I admit not to understanding hivemind.xml although I am trying.

This all stems from not wanting to reference the visit with Visit visit =
(Visit) cycle.getEngine().getVisit(); since it has been deprecated.

Any insight into how I can reference the sessions application objects in
WorkbenchHomeService class would be very helpful.

Paul



---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]