You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-user@portals.apache.org by Niek Bunskoek <Ni...@OVSoftware.com> on 2001/05/15 16:21:54 UTC

change portlet content by href's

Hello everybody,

Let's say I have a startpage with one portlet and two href's:

<a href=".....">title1</a>
<a href=".....">title2</a>

With these links I want to change the content of that portlet. I want to
change the title of that portlet by accessing one of the link.
What do I have to place on the "....."? Is it actually possible? Assume that
I made my portlet correctly, that's not the issue.

I hope you understand my problem.

Regards and many thanx,

Niek


**********************************************************************
As you are aware, e-mails sent via Internet can easily be prepared or
manipulated by third persons, For this reason we trust you will understand
that, for your own and our protection, we rule out the legal validity of the
foregoing statements and comments. The applicable regulations of OVSoftware
on the legal validity of declarations of intent of a binding nature remain
unaffected.
This message is confidential. It may also be privileged or otherwise
protected by legal rules. It may be unlawful for you to read, copy or use it
in anyway. If you have received it by mistake please let us know by reply
and then delete it from your system.



---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-user-help@jakarta.apache.org


Re: change portlet content by href's

Posted by Yohanes Santoso <ys...@bigfoot.com>.
One way is to make your portlet sensitive to the parameter in the URL.
So, for example, if the parametre contains 'A', your portlet outputs
'123', and if the parametre contains 'B', output other things, etc.

YS.




-- 
A morgue is a morgue is a morgue.  They can paint the walls with aggressively
cheerful primary colors and splashy bold graphics, but it's still a holding
place for the dead until they can be parted out to organ banks.  Not that I
would have cared normally but my viewpoint was skewed.  The relentless
pleasance of the room I sat in seemed only grotesque.
                -- Pat Cadigan, "Mindplayers"

---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-user-help@jakarta.apache.org


general question on portlet refresh

Posted by Klaus Hildner <kl...@hildner.de>.
Hello,

I have got a general + basic question. I might violate the philosophy of
a portlet which could be considered to be an interface into a mostly
"read-only" web application. Please correct me.

My problem is: There are situations when the portal page is reloaded, i.
e.

- explicit browser refresh, or
- posting a form in a portlet towards the portal.

During this process, the service() methods of *all* the contained
portlets are reinvoked (be it necessary or not):

- So if I have a portlet with a service() method + a counter
  inside, this counter becomes incremented (state change).
- If this portlet invokes methods on other objects (e. g.
  methods not considered to be "redone"), those *are* in fact
  redone.
- PortletRequest.getParameterNames() are only available to
  the previously-posted-to-portlet on subsequent refreshes;
  all the other portlets cannot re-retrieve their parameters.

(Am I right?)

This causes problems with portlets that rely

- on always receiving some "useful" request parameters
  (well, this can be made robust) and
- on being able to redisplay the previous output
  without changing the internal state.



In my special case, I have a portlet which forwards all requests to a
servlet instance. It does so by simply instantiating the servlet +
providing special "faked" implementations of ServletConfig,
HttpServletRequest, HttpServletResponse, RequestDispatcher, and other
interfaces that do the mapping from servlet methods to portlet methods,
and then invoking:

myServlet.init(fakedConfig);                    [once]
[...]
myServlet.service(fakedRequest, fakedResponse); [upon every request]

This works fine so far.



My problem now is caching output:

- If I did not invoke the servlet's service() method,
  nothing would be displayed.
- If I kept a reference to the previous PortletResponse object,
  that would not help me, as it would not allow me to "replay"
  (like a tape being rewound + playing the same music stream again)
  the output to the PrintWriter.

Is there anybody out there with a large trout who can knock it on my
head to push me in the right direction? I would not want to implement a
"buffering" PrintWriter to solve the problem though I already have
overridden some of the code in javax.servlet.ServletResponse.getWriter()
that returns it during the task of mapping from a ServletResponse to a
PortletResponse. "Buffering" means that PrintWriter would record the
history of all the method invocations + data passed to it (i. e.
print(int), print(String), println(int), println(String), write(int),
write(String), etc.) + be able to "replay" it upon explicit request.

Are there other solutions someone can think of here?

Kind regards

Klaus
--
klaus@hildner.de
mobile: +49-173-310-6491
accept-language: en-us, de


---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-user-help@jakarta.apache.org