I'm looking for some idea to be able to fill a form (flow+CForms) in Portal, submit it and see the result, and then be able to see the form again when the portal user goes elsewhere and comes back to that TAB/page. I was thinking of copet cache invalidation but maybe this is not the way.
Phil
Philippe Guillard wrote:
Hi all,
This is my need:
Portal Engine. CForm with flow (for instance) in a cachingURI coplet. After sendPageAndWait for the From comes the sendPage() for the result. This result contains a cl:link to get back to the orginal display, say the from again. This works fine.
Now i see that if the user doesn't click on the cl:link, but goes to another portal Tab, and comes back to the former tab, i'd like to see the form again.
I need help on the direction to go there:
- Solution [1] invalidate the cachingURI coplet cache
- Solution [2] create an event that sets temporary:application-uri, publish it and invalidate cache for that coplet
- Solution [3] totally invalidate caching for that coplet
I tried (2) below , with no errors but the coplet is not refreshed. Any help welcomed!
Phil ________________________________________
function resetCopletTempUri(instanceName) {
var service = null;
try {
// get portal service
service = cocoon.getComponent(org.apache.cocoon.portal.PortalService.ROLE);
service.setPortalName("portal");
// get profile manager
var componentManager = service.getComponentManager();
var profileManager = componentManager.getProfileManager();
var cid = profileManager.getCopletInstanceData(instanceName);
// invalidate cache
var cachingURICopletAdapter = new Packages.org.apache.cocoon.portal.coplet.adapter.impl.CachingURICopletAdapter();
cachingURICopletAdapter.setCacheInvalid(cid);
var event = null;
var path = "temporaryAttributes/application-uri";
var value = "cocoon://portal/coplets/profiler/profile";
if ( cid != null ) {
// create event
event = new Packages.org.apache.cocoon.portal.event.impl.CopletJXPathEvent(cid, path, value);
// subscribe it
service.getComponentManager().getEventManager().getPublisher().publish(event);
} } catch ( e ) {
cocoon.log.error("Error", e);
}
finally {
cocoon.releaseComponent( service );
}
}
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
