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 Pierre BESNARD <pb...@odaxys.fr> on 2002/03/21 09:57:44 UTC

RE: strange behavior when refreshing velocity portlet.

Hi,
First of all, thanks for all your answers about "other mean to post changes in velocity portlet".
Secondly, it will be kind of you to excuse my poor English.
And finally, I found the solution of the problem described below.
In fact, I know how to make work my portlet, but I don't know why it wasn't working.
I have observed that when an action method ( doSomething() ) behave 2 upper-case letters (i.e.: doSomeThing() ), the action is not called as it should be!
If I have a method doNewPost(r,c) called in a template (<..name="eventSubmit_doNewPost"..>), it doesn't work.
but, a method doNewp(r,c) called with <..name="eventSubmit_doNewp"..> works very well.

If someone could explain that to me, thank you in advance.

For the moment,  I succeeded in transform the "forumDemo" of velocity into a portlet! (not bad for a first work with velocity and jetspeed).

have a good day,( or night, I don't know! :) )
--
Pierre

-----Message d'origine-----
De : Pierre BESNARD 
Envoyé : mercredi 20 mars 2002 14:54
À : Jetspeed Users List
Objet : strange behaviour when refreshing velocity portlet.


hi,

when I try to change a template in velocity portlet, i saw strange results:

my registry file :
    <portlet-entry name="jtiti" hidden="false" type="instance" application="false">
        <classname>org.apache.jetspeed.portal.portlets.CustomizerVelocityPortlet</classname>
        <meta-info>
            <title>TestTiti</title>
            <description>titi test</description>
        </meta-info>
        <parameter name="template" value="titi" hidden="false"/>
        <parameter name="action" value="portlets.TitiAction" hidden="false"/>
        <media-type ref="html"/>
    </portlet-entry>

template titi.vm :
	<form action"$jlink" method="POST">
	   <input type="Submit" name="eventSubmit_doToto" value="toto"> 
	</form>

and finaly method of TitiAction.java :
    public void doToto(RunData rundata, Context ctx){
        setTemplate(rundata, "toto");
    }

When I run that portlet, i can see 3 diferent results when i click on the "toto" button:

1) Sometime it works good and the "toto.vm" template is used.

2) Sometime the "titi.vm" is steel used.

3) Or a message, like the following, is displayed in full screen :
	$jetspeed.getCustomizer($data.Customized).getContent($data)  

can someone help me before i fall crazy!

thank you.

--
pierre

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: strange behavior when refreshing velocity portlet.

Posted by ra...@networks.groupvu.com.
Chris Kimpton wrote:

> Hi,
> 
> --- Pierre BESNARD <pb...@odaxys.fr> wrote:
> 
>>Secondly, it will be kind of you to excuse my poor English.
>>
> 
> Don't worry - it is definitely better than my pathetic french  :-(
> 
> 
>>I have observed that when an action method ( doSomething() ) behave
>>2 upper-case letters (i.e.: doSomeThing() ), the action is not
>>called as it should be!
>>
> 
> This is due to the way the ActionEvent class in Turbine finds your
> method - it (or the http processing) seems to lose the upper and
> lower case information, so all it gets to process is dosomething - it
> then guesses that you may want doSomething - but it does not do any
> further guessing - It could do more - have a look at the turbine code
> - there maybe comments/reasons as to why it doesn't.
> 


I guess that basically it's because the event is actually coded in an HTML
page, and you can't expect HTML designer to actually care about something
as trivial as case in field values, so to make the event work whatever the
case mix used as the HTML input field, the event is forced to lowercase except
the first letter which is forced to uppercase.

Matching

-- 
Raphael Luta - raphael.luta@networks.groupvu.com
Professional Services Manager
Vivendi Universal Networks - Paris


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: strange behavior when refreshing velocity portlet.

Posted by Chris Kimpton <ki...@yahoo.com>.
Hi,

--- Pierre BESNARD <pb...@odaxys.fr> wrote:
> Secondly, it will be kind of you to excuse my poor English.

Don't worry - it is definitely better than my pathetic french  :-(

> I have observed that when an action method ( doSomething() ) behave
> 2 upper-case letters (i.e.: doSomeThing() ), the action is not
> called as it should be!

This is due to the way the ActionEvent class in Turbine finds your
method - it (or the http processing) seems to lose the upper and
lower case information, so all it gets to process is dosomething - it
then guesses that you may want doSomething - but it does not do any
further guessing - It could do more - have a look at the turbine code
- there maybe comments/reasons as to why it doesn't.

HTH,
Chris

=====
http://www.soccer2002.org.uk - join in and win CA$H!

__________________________________________________
Do You Yahoo!?
Yahoo! Movies - coverage of the 74th Academy Awards�
http://movies.yahoo.com/

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>