You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by jvnk <na...@philips.com> on 2008/08/14 21:58:14 UTC

h:commandLink in form not working

Hello Friends,

I have problems using commandLink. 

Below is the code!! I tried all the possible ways but none works, expect
when I changed commandLink to commandButton

In the below code h:commandLink did not work, so I tried t:commandLink. But
that did not work.

I am using IE 6.x & Firefox 3 .x for testing. I am using JSF1.1 (MyFaces).
Any help will be appreciated.

<%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="t" %>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>

<f:view>
<h:form id="srchrsltsForm">
<h:commandButton id="cl1" value="Test Param1"
action="#{subSearchBean.keySubDetails}">
<f:param name="subscriptionID" value="12345B" />
</h:commandButton>
<br><br>
<t:commandLink id="cl2" action="#{subSearchBean.keySubDetails}">
<h:outputText value="Tom Link"/>
</t:commandLink>
<br><br>
<h:commandLink id="cl21" action="#{subSearchBean.keySubDetails}">
<h:outputText value="My Link"/>
</h:commandLink>
<br><bR>
<h:commandLink id="c21" value="My Link 2"
action="#{subSearchBean.keySubDetails}"/>
<br><bR>
<h:commandLink id="c22" value="My Link 2"
action="#{subSearchBean.keySubDetails}">My Link 3</h:commandLink>

</h:form>
</f:view>

Thanks,
Nag
-- 
View this message in context: http://www.nabble.com/h%3AcommandLink-in-form-not-working-tp18988600p18988600.html
Sent from the MyFaces - Users mailing list archive at Nabble.com.


RE: h:commandLink in form not working

Posted by "Jalapati, Nagendra" <na...@philips.com>.
Hi,

 

I am using myfaces 1.1.5 on weblogic platform 10.2

 

<faces-config>

 

    <application>

        <locale-config>

              <default-locale>en</default-locale>

        </locale-config>

      </application>

 

    <factory>

         <application-factory>

 
org.apache.beehive.netui.pageflow.faces.PageFlowApplicationFactory

        </application-factory>

    </factory>

 

          <managed-bean>

                   <managed-bean-name>subSearchBean</managed-bean-name>

 
<managed-bean-class>com.cust.portal.jsfbean.SubSearch</managed-bean-clas
s>

                   <managed-bean-scope>session</managed-bean-scope>

          </managed-bean>

 

          <navigation-rule>

                   <from-view-id>

                             /portlets/search/searchResults.jsp

                   </from-view-id>

                   <navigation-case>

                             <from-outcome>SearchResults</from-outcome>

                             <to-view-id>

                                      /portlets/search/quickSearch.jsp

                             </to-view-id>

                   </navigation-case>

          </navigation-rule>

 

</faces-config>

 

 

 

 

Action method in Managed Bean

 

          public String keySubDetails() {

                   System.out.println("##@## called keySubDetails action
method");

                   return "SearchResults";

          }

 

Thanks,

Nag

 

________________________________

From: Leonardo Uribe [mailto:lu4242@gmail.com] 
Sent: Thursday, August 14, 2008 4:13 PM
To: MyFaces Discussion
Subject: Re: h:commandLink in form not working

 

 

On Thu, Aug 14, 2008 at 2:58 PM, jvnk <na...@philips.com>
wrote:


Hello Friends,

I have problems using commandLink.

Below is the code!! I tried all the possible ways but none works, expect
when I changed commandLink to commandButton

In the below code h:commandLink did not work, so I tried t:commandLink.
But
that did not work.

I am using IE 6.x & Firefox 3 .x for testing. I am using JSF1.1
(MyFaces).
Any help will be appreciated.

<%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="t" %>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>

<f:view>
<h:form id="srchrsltsForm">
<h:commandButton id="cl1" value="Test Param1"
action="#{subSearchBean.keySubDetails}">
<f:param name="subscriptionID" value="12345B" />
</h:commandButton>
<br><br>
<t:commandLink id="cl2" action="#{subSearchBean.keySubDetails}">
<h:outputText value="Tom Link"/>
</t:commandLink>
<br><br>
<h:commandLink id="cl21" action="#{subSearchBean.keySubDetails}">
<h:outputText value="My Link"/>
</h:commandLink>
<br><bR>
<h:commandLink id="c21" value="My Link 2"
action="#{subSearchBean.keySubDetails}"/>
<br><bR>
<h:commandLink id="c22" value="My Link 2"
action="#{subSearchBean.keySubDetails}">My Link 3</h:commandLink>

</h:form>
</f:view>


It seems something missing on configuration (the examples works well so
I don't see a reason why this simple page is failing). Which version of
myfaces core and tomahawk are you using? (for example 1.1.5 and 1.1.6)
 

	
	Thanks,
	Nag
	--
	View this message in context:
http://www.nabble.com/h%3AcommandLink-in-form-not-working-tp18988600p189
88600.html
	Sent from the MyFaces - Users mailing list archive at
Nabble.com.

 


Re: h:commandLink in form not working

Posted by Leonardo Uribe <lu...@gmail.com>.
On Thu, Aug 14, 2008 at 2:58 PM, jvnk <na...@philips.com> wrote:

>
> Hello Friends,
>
> I have problems using commandLink.
>
> Below is the code!! I tried all the possible ways but none works, expect
> when I changed commandLink to commandButton
>
> In the below code h:commandLink did not work, so I tried t:commandLink. But
> that did not work.
>
> I am using IE 6.x & Firefox 3 .x for testing. I am using JSF1.1 (MyFaces).
> Any help will be appreciated.
>
> <%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="t" %>
> <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
> <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
>
> <f:view>
> <h:form id="srchrsltsForm">
> <h:commandButton id="cl1" value="Test Param1"
> action="#{subSearchBean.keySubDetails}">
> <f:param name="subscriptionID" value="12345B" />
> </h:commandButton>
> <br><br>
> <t:commandLink id="cl2" action="#{subSearchBean.keySubDetails}">
> <h:outputText value="Tom Link"/>
> </t:commandLink>
> <br><br>
> <h:commandLink id="cl21" action="#{subSearchBean.keySubDetails}">
> <h:outputText value="My Link"/>
> </h:commandLink>
> <br><bR>
> <h:commandLink id="c21" value="My Link 2"
> action="#{subSearchBean.keySubDetails}"/>
> <br><bR>
> <h:commandLink id="c22" value="My Link 2"
> action="#{subSearchBean.keySubDetails}">My Link 3</h:commandLink>
>
> </h:form>
> </f:view>
>

It seems something missing on configuration (the examples works well so I
don't see a reason why this simple page is failing). Which version of
myfaces core and tomahawk are you using? (for example 1.1.5 and 1.1.6)


>
> Thanks,
> Nag
> --
> View this message in context:
> http://www.nabble.com/h%3AcommandLink-in-form-not-working-tp18988600p18988600.html
> Sent from the MyFaces - Users mailing list archive at Nabble.com.
>
>

Re: h:commandLink in form not working

Posted by jvnk <na...@philips.com>.
I am using myfaces 1.1.5 on weblogic platform 10.2

<faces-config>

    <application>
        <locale-config>
              <default-locale>en</default-locale>
        </locale-config>
      </application>

    <factory>
         <application-factory>
           
org.apache.beehive.netui.pageflow.faces.PageFlowApplicationFactory
        </application-factory>
    </factory>

	<managed-bean>
		<managed-bean-name>subSearchBean</managed-bean-name>
		<managed-bean-class>com.cust.portal.jsfbean.SubSearch</managed-bean-class>
		<managed-bean-scope>session</managed-bean-scope>
	</managed-bean>

	<navigation-rule>
		<from-view-id>
			/portlets/search/searchResults.jsp
		</from-view-id>
		<navigation-case>
			<from-outcome>SearchResults</from-outcome>
			<to-view-id>
				/portlets/search/quickSearch.jsp
			</to-view-id>
		</navigation-case>
	</navigation-rule>

</faces-config>



Action method in Managed Bean

	public String keySubDetails() {
		System.out.println("##@## called keySubDetails action method");
		return "SearchResults";
	}



Below is the generated html code

<tr><td>
<input id="srchrsltsForm:srchrslts:0:quickSearch_2_idJsp3"
name="srchrsltsForm:srchrslts:0:quickSearch_2_idJsp3" type="submit" value="
Go "
onclick="clear_srchrsltsForm();document.forms['srchrsltsForm'].elements['autoScroll'].value=getScrolling();"
/> # Franklin,Benjamin </td><td>1414 some st   &lt;br&gt;Manchester,NH
07054</td><td>Pending Deactivation</td><td>(813) 621-6501</td><td>9000767324
</td></tr>

Thanks



jvnk wrote:
> 
> Hello Friends,
> 
> I have problems using commandLink. 
> 
> Below is the code!! I tried all the possible ways but none works, expect
> when I changed commandLink to commandButton
> 
> In the below code h:commandLink did not work, so I tried t:commandLink.
> But that did not work.
> 
> I am using IE 6.x & Firefox 3 .x for testing. I am using JSF1.1 (MyFaces).
> Any help will be appreciated.
> 
> <%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="t" %>
> <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
> <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
> 
> <f:view>
> <h:form id="srchrsltsForm">
> <h:commandButton id="cl1" value="Test Param1"
> action="#{subSearchBean.keySubDetails}">
> <f:param name="subscriptionID" value="12345B" />
> </h:commandButton>
> <br><br>
> <t:commandLink id="cl2" action="#{subSearchBean.keySubDetails}">
> <h:outputText value="Tom Link"/>
> </t:commandLink>
> <br><br>
> <h:commandLink id="cl21" action="#{subSearchBean.keySubDetails}">
> <h:outputText value="My Link"/>
> </h:commandLink>
> <br><bR>
> <h:commandLink id="c21" value="My Link 2"
> action="#{subSearchBean.keySubDetails}"/>
> <br><bR>
> <h:commandLink id="c22" value="My Link 2"
> action="#{subSearchBean.keySubDetails}">My Link 3</h:commandLink>
> 
> </h:form>
> </f:view>
> 
> Thanks,
> Nag
> 

-- 
View this message in context: http://www.nabble.com/h%3AcommandLink-in-form-not-working-tp18988600p18989292.html
Sent from the MyFaces - Users mailing list archive at Nabble.com.