You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Paul van Rossem <pa...@timeware.nl> on 2008/02/06 09:08:54 UTC

[Trinidad] commandButton action method not called

I tried the following simple jsf:

<?xml version="1.0" encoding="UTF-8" ?>
<jsp:root version="2.0"
  xmlns:jsp="http://java.sun.com/JSP/Page"
  xmlns:c="http://java.sun.com/jsp/jstl/core"
  xmlns:f="http://java.sun.com/jsf/core"
  xmlns:h="http://java.sun.com/jsf/html"
  xmlns:tr="http://myfaces.apache.org/trinidad">
<jsp:directive.page contentType="text/html; charset=utf-8"/>
  <f:view>
    <tr:document title="My Title">
      <h:form>
        <h:commandButton value="h: Click me" action="#{locale.clicked}"/>
        <tr:commandButton text="tr: Click me" action="#{locale.clicked}"/>
      </h:form>
    </tr:document>
  </f:view>
</jsp:root>

In the faces-config.xml I have:
<application>
  
<default-render-kit-id>org.apache.myfaces.trinidad.core</default-render-kit-id>
</application>

Then the action procedures of both buttons are never called. But: when I 
just remove the <default-render-kit-id> the action procedure of the 
<h:commandButton> is called as I would expect
(the <tr:commandButton> is then of course not rendered). I can't imagine 
that <h:commandButton> and <tr:commandButton> don't work at all, so 
probably I am doing something very wrong?? (I just started moving from 
JSF to Trinidad, so I'm relatively new here, any help would be greatly 
appreciated).
I am using jsf-1.2_07-b03-FCS with trinidad-1.2.5.

Paul.


Re: [Trinidad] commandButton action method not called

Posted by Mahdy <me...@gmail.com>.
Hi Paul van Rossem
you can give me the exact problem in the web.xml because I have the same
problem as you, thank you

Paul van Rossem wrote:
> 
> Hi Matthias,
> 
> Your request to upload a demo to Jira was exactly the right one I 
> needed! In preparing a demo I dropped everything that wasn't essential 
> and so I ended up with a working version.
> The problem was in my web.xml. It works now, which makes me very happy 
> (I spent an awfull lot of time on this problem)!
> 
> Thanks for your time, you really helped me!
> 
> Regards, Paul.
> 
> Matthias Wessendorf wrote:
>> <h:form> should work
>> can you upload a demo project to jira?
>>
>> -M
>>
>> On Feb 6, 2008 5:12 PM, Andrew Robinson <an...@gmail.com>
>> wrote:
>>   
>>> Have you tried tr:form instead of h:form? Not sure if it will fix it,
>>> but
>>> worth trying.
>>>
>>>
>>>
>>> On Feb 6, 2008 1:08 AM, Paul van Rossem <pa...@timeware.nl> wrote:
>>>
>>>     
>>>> I tried the following simple jsf:
>>>>
>>>> <?xml version="1.0" encoding="UTF-8" ?>
>>>> <jsp:root version="2.0"
>>>>  xmlns:jsp="http://java.sun.com/JSP/Page"
>>>>  xmlns:c="http://java.sun.com/jsp/jstl/core"
>>>>  xmlns:f="http://java.sun.com/jsf/core"
>>>>  xmlns:h="http://java.sun.com/jsf/html"
>>>>  xmlns:tr="http://myfaces.apache.org/trinidad">
>>>> <jsp:directive.page contentType="text/html; charset=utf-8"/>
>>>>  <f:view>
>>>>    <tr:document title="My Title">
>>>>      <h:form>
>>>>        <h:commandButton value="h: Click me"
>>>> action="#{locale.clicked}"/>
>>>>        <tr:commandButton text="tr: Click me"
>>>> action="#{locale.clicked}"/>
>>>>      </h:form>
>>>>    </tr:document>
>>>>  </f:view>
>>>> </jsp:root>
>>>>
>>>> In the faces-config.xml I have:
>>>> <application>
>>>>
>>>>
>>>>       
>>> <default-render-kit-id>org.apache.myfaces.trinidad.core</default-render-kit-id>
>>>     
>>>> </application>
>>>>
>>>> Then the action procedures of both buttons are never called. But: when
>>>> I
>>>> just remove the <default-render-kit-id> the action procedure of the
>>>> <h:commandButton> is called as I would expect
>>>> (the <tr:commandButton> is then of course not rendered). I can't
>>>> imagine
>>>> that <h:commandButton> and <tr:commandButton> don't work at all, so
>>>> probably I am doing something very wrong?? (I just started moving from
>>>> JSF to Trinidad, so I'm relatively new here, any help would be greatly
>>>> appreciated).
>>>> I am using jsf-1.2_07-b03-FCS with trinidad-1.2.5.
>>>>
>>>> Paul.
>>>>
>>>>
>>>>       
>>>     
>>
>>
>>
>>   
> 
> -- 
> Paul van Rossem, Van Rossem Timeware
> Tempellaan  18,  3721  VH  Bilthoven
> tel: 030-220.4006, fax: 030-220.3445
> www.timeware.nl, mobiel 06-5468.3405
> 
> 
> 

-- 
View this message in context: http://old.nabble.com/-Trinidad--commandButton-action-method-not-called-tp15307515p27026653.html
Sent from the MyFaces - Users mailing list archive at Nabble.com.


Re: [Trinidad] commandButton action method not called

Posted by Paul van Rossem <pa...@timeware.nl>.
Hi Matthias,

Your request to upload a demo to Jira was exactly the right one I 
needed! In preparing a demo I dropped everything that wasn't essential 
and so I ended up with a working version.
The problem was in my web.xml. It works now, which makes me very happy 
(I spent an awfull lot of time on this problem)!

Thanks for your time, you really helped me!

Regards, Paul.

Matthias Wessendorf wrote:
> <h:form> should work
> can you upload a demo project to jira?
>
> -M
>
> On Feb 6, 2008 5:12 PM, Andrew Robinson <an...@gmail.com> wrote:
>   
>> Have you tried tr:form instead of h:form? Not sure if it will fix it, but
>> worth trying.
>>
>>
>>
>> On Feb 6, 2008 1:08 AM, Paul van Rossem <pa...@timeware.nl> wrote:
>>
>>     
>>> I tried the following simple jsf:
>>>
>>> <?xml version="1.0" encoding="UTF-8" ?>
>>> <jsp:root version="2.0"
>>>  xmlns:jsp="http://java.sun.com/JSP/Page"
>>>  xmlns:c="http://java.sun.com/jsp/jstl/core"
>>>  xmlns:f="http://java.sun.com/jsf/core"
>>>  xmlns:h="http://java.sun.com/jsf/html"
>>>  xmlns:tr="http://myfaces.apache.org/trinidad">
>>> <jsp:directive.page contentType="text/html; charset=utf-8"/>
>>>  <f:view>
>>>    <tr:document title="My Title">
>>>      <h:form>
>>>        <h:commandButton value="h: Click me" action="#{locale.clicked}"/>
>>>        <tr:commandButton text="tr: Click me" action="#{locale.clicked}"/>
>>>      </h:form>
>>>    </tr:document>
>>>  </f:view>
>>> </jsp:root>
>>>
>>> In the faces-config.xml I have:
>>> <application>
>>>
>>>
>>>       
>> <default-render-kit-id>org.apache.myfaces.trinidad.core</default-render-kit-id>
>>     
>>> </application>
>>>
>>> Then the action procedures of both buttons are never called. But: when I
>>> just remove the <default-render-kit-id> the action procedure of the
>>> <h:commandButton> is called as I would expect
>>> (the <tr:commandButton> is then of course not rendered). I can't imagine
>>> that <h:commandButton> and <tr:commandButton> don't work at all, so
>>> probably I am doing something very wrong?? (I just started moving from
>>> JSF to Trinidad, so I'm relatively new here, any help would be greatly
>>> appreciated).
>>> I am using jsf-1.2_07-b03-FCS with trinidad-1.2.5.
>>>
>>> Paul.
>>>
>>>
>>>       
>>     
>
>
>
>   

-- 
Paul van Rossem, Van Rossem Timeware
Tempellaan  18,  3721  VH  Bilthoven
tel: 030-220.4006, fax: 030-220.3445
www.timeware.nl, mobiel 06-5468.3405


Re: [Trinidad] commandButton action method not called

Posted by Matthias Wessendorf <ma...@apache.org>.
<h:form> should work
can you upload a demo project to jira?

-M

On Feb 6, 2008 5:12 PM, Andrew Robinson <an...@gmail.com> wrote:
> Have you tried tr:form instead of h:form? Not sure if it will fix it, but
> worth trying.
>
>
>
> On Feb 6, 2008 1:08 AM, Paul van Rossem <pa...@timeware.nl> wrote:
>
> > I tried the following simple jsf:
> >
> > <?xml version="1.0" encoding="UTF-8" ?>
> > <jsp:root version="2.0"
> >  xmlns:jsp="http://java.sun.com/JSP/Page"
> >  xmlns:c="http://java.sun.com/jsp/jstl/core"
> >  xmlns:f="http://java.sun.com/jsf/core"
> >  xmlns:h="http://java.sun.com/jsf/html"
> >  xmlns:tr="http://myfaces.apache.org/trinidad">
> > <jsp:directive.page contentType="text/html; charset=utf-8"/>
> >  <f:view>
> >    <tr:document title="My Title">
> >      <h:form>
> >        <h:commandButton value="h: Click me" action="#{locale.clicked}"/>
> >        <tr:commandButton text="tr: Click me" action="#{locale.clicked}"/>
> >      </h:form>
> >    </tr:document>
> >  </f:view>
> > </jsp:root>
> >
> > In the faces-config.xml I have:
> > <application>
> >
> >
> <default-render-kit-id>org.apache.myfaces.trinidad.core</default-render-kit-id>
> > </application>
> >
> > Then the action procedures of both buttons are never called. But: when I
> > just remove the <default-render-kit-id> the action procedure of the
> > <h:commandButton> is called as I would expect
> > (the <tr:commandButton> is then of course not rendered). I can't imagine
> > that <h:commandButton> and <tr:commandButton> don't work at all, so
> > probably I am doing something very wrong?? (I just started moving from
> > JSF to Trinidad, so I'm relatively new here, any help would be greatly
> > appreciated).
> > I am using jsf-1.2_07-b03-FCS with trinidad-1.2.5.
> >
> > Paul.
> >
> >
>
>



-- 
Matthias Wessendorf

further stuff:
blog: http://matthiaswessendorf.wordpress.com/
sessions: http://www.slideshare.net/mwessendorf
mail: matzew-at-apache-dot-org

Re: [Trinidad] commandButton action method not called

Posted by Andrew Robinson <an...@gmail.com>.
Have you tried tr:form instead of h:form? Not sure if it will fix it, but
worth trying.

On Feb 6, 2008 1:08 AM, Paul van Rossem <pa...@timeware.nl> wrote:

> I tried the following simple jsf:
>
> <?xml version="1.0" encoding="UTF-8" ?>
> <jsp:root version="2.0"
>  xmlns:jsp="http://java.sun.com/JSP/Page"
>  xmlns:c="http://java.sun.com/jsp/jstl/core"
>  xmlns:f="http://java.sun.com/jsf/core"
>  xmlns:h="http://java.sun.com/jsf/html"
>  xmlns:tr="http://myfaces.apache.org/trinidad">
> <jsp:directive.page contentType="text/html; charset=utf-8"/>
>  <f:view>
>    <tr:document title="My Title">
>      <h:form>
>        <h:commandButton value="h: Click me" action="#{locale.clicked}"/>
>        <tr:commandButton text="tr: Click me" action="#{locale.clicked}"/>
>      </h:form>
>    </tr:document>
>  </f:view>
> </jsp:root>
>
> In the faces-config.xml I have:
> <application>
>
> <default-render-kit-id>org.apache.myfaces.trinidad.core
> </default-render-kit-id>
> </application>
>
> Then the action procedures of both buttons are never called. But: when I
> just remove the <default-render-kit-id> the action procedure of the
> <h:commandButton> is called as I would expect
> (the <tr:commandButton> is then of course not rendered). I can't imagine
> that <h:commandButton> and <tr:commandButton> don't work at all, so
> probably I am doing something very wrong?? (I just started moving from
> JSF to Trinidad, so I'm relatively new here, any help would be greatly
> appreciated).
> I am using jsf-1.2_07-b03-FCS with trinidad-1.2.5.
>
> Paul.
>
>