Force PORTLET LINK to not RELOAD ENTIRE PAGE?

Here’s the scene…

Two portlets on same page.

One portlet has links which change views of other portlet.

When the links are clicked the whole page is refreshed.

Is this avoidable?

Thanks for any ideas!!

Lucas.

You can check out this article: https://advantage.webmethods.com/article?id=1613946716

It is about remotely refreshing a portlet without doing a full page refresh.
–mark

Thanks Mark…

I’m comfortable with the concepts in the suggested reading, so maybe it’s my approach.

The only way I know to get a portlet t to change its view is to create a control outline as below:

Portlet Link->
Extended Portlet URL->
Extended Portlet URL

Whether I click on the Link or do a raise/go in JS it has the same effect – it refreshes the page.

Is there another way to change a portlets view?

Thanks!!

Lucas.

Tricky. Typically the answer is for 7.x that you can’t change portlet views with async requests. However, it may be possible under certain controller circumstances.

Let say that you have a portlet view with a panel to be refreshed (id = ‘refreshPanel’) and you issue an async command to an Action Handler. The action handler returns a value of the new view to render (view = ‘secondView.view’). If the ‘secondView.view’ has a panel with the same id (id = ‘refreshPanel’) then your panel from the second view should be returned.

I’m not sure this will fit your use case though.
–mark

Mark,

In your reply from a couple years back you hint that ascync view changes may be possible in future MWS releases, has this come true?

Currently my client is on 8.0.2.

Lucas.

Sorry, no changes in this area.
Regards,
–mark

Thanks Mark. Work-arounds make this job worth doing. :slight_smile:

Lucas, if you get the chance… Could you please send an example, or a doc to help me understand this scenario better? Maybe we can find a different approach that won’t require those workarounds.

Thanks,
–mark

Thanks Mark. I think I can decribe it rather quickly:

Portlet A has a toggle tab and several hidable panels. Each hideable panel has a portlet include, one of which is Prtlet B.

Portlet B has a tab control which changes its views (view 1, 2, 3, etc) using a PSL and EPU.

When changing (linking) to the other views in PB the page is refreshed, obviously, and the Toggle tab in PA looses it’s place.

What I’ve done is bind the Toggle tab to a session variable, then I refresh a hidden text control “on click” of the tab, and then run some JS on every load that checks if the variable is null. If it is, I sent the Tab to index 1, if not, I set it to the value.

The work around works great, but I’d love to hear your thoughts!

Lucas.

Got it. Thanks.

How about in Portlet B having a default view that uses the Import Template View? In theory, it could dynamically switch view it includes?
Please let me know if you have a chance to experiment with this and whether or not it helps.

Thanks,
–mark

That worked, thanks Mark.

My only concers is it seems like you can’t have controls of the same ID in the main portlent and the included portlet. is that true or just my imagination?

Lucas.

PS, what happened to the “Include View” control?

com.webMethods.caf.faces.logic.Import

The Import View control was deprecated. The control IDs should be scoped to their parent control so it shouldn’t matter. I believe the Designer online docs refer to the best practice for Control Scoped identifiers. Have a look at the section titled: “Control ID Reference”

Regards,
–mark