See the taglibrary docs for h:commandLink [1] - first section states
that the purpose
of this tag is to render an anchor element that acts like a form submit
button when clicked.
Additionally, read the section on the encoding behavior.
[1]
http://java.sun.com/javaee/javaserverfaces/1.1/docs/tlddocs/index.html
Cheng Fang wrote:
> Could someone elaborate on this requirement? I was talking about
> commandLinks in JSF 1.2, which is the version implemented in Glassfish.
>
> Thanks.
> -- Cheng
>
> On Tue, 4 Apr 2006, Tom Baeyens wrote:
>
>
>> indeed i'm not aware that commandLinks should be put in h:form's. i
>> searched for commandLink in the spec, but didn't find any such
>> requirement.
>>
>> where do you find this requirement ?
>>
>> regards, tom.
>> tom.baeyens_at_jboss.com
>> +32 14 880 900
>>
>>
>> | -----Original Message-----
>> | From: cf126330_at_jsesun46.sun.com
>> | [mailto:cf126330_at_jsesun46.sun.com] On Behalf Of Cheng Fang
>> | Sent: maandag 3 april 2006 17:05
>> | To: Tom Baeyens
>> | Subject: Re: Comment: How to Run jbpm on SJSAS/Glassfish with
>> | Derby (fwd)
>> |
>> | Hi, Tom,
>> |
>> | FYI. I had trouble running jbpm in a jsf 1.2 environment.
>> | Ryan from Sun's jsf team thinks it could be a bug in some
>> | jbpm jsp pages. I did notice some commandLinks in home.jsp
>> | are not enclosed inside h:form.
>> |
>> | Thanks.
>> | -- Cheng
>> |
>> | ---------- Forwarded message ----------
>> | Date: Mon, 03 Apr 2006 07:26:27 -0700
>> | From: Ryan Lubke <Ryan.Lubke_at_Sun.COM>
>> | To: Cheng Fang <Cheng.Fang_at_Sun.COM>
>> | Subject: Re: Comment: How to Run jbpm on SJSAS/Glassfish with Derby
>> |
>> | Cheng Fang wrote:
>> | > It looks like it in home.jsp. I've attached home.jsp, header1.jsp,
>> | > header2.jsp, and footer.jsp. Can you confirm this?
>> | >
>> | > With myfaces in both SJSAS 8.2 and Glassfish b43, all pages are
>> | > displayed fine. Why are their pages not working with our jsf? Is
>> | > this new requirement? Is this a bug in jbpm?
>> | >
>> |
>> | A command link (h:commandLink) is used to cause a form
>> | submission. If they aren't in a form, then that seems like a
>> | bug in their page and the MyFaces implementation.
>> |
>> |
>> | > -- Cheng
>> | >
>> | > On Fri, 31 Mar 2006, Ryan Lubke wrote:
>> | >
>> | >
>> | >> Cheng Fang wrote:
>> | >>
>> | >>> When I removed this listener, it deployed fine. The login page
>> | >>> displayed ok, but after login, the two images were not displayed
>> | >>> (jboss logo, and swoosh). I couldn't create web sale
>> | either. It says:
>> | >>>
>> | >>> create new web sale order: This link is disabled as it is
>> | not nested
>> | >>> within a JSF form.
>> | >>>
>> | >>> In server.log, there is a lot of warnings like this:
>> | >>>
>> | [#|2006-03-31T14:04:18.568-0500|WARNING|sun-appserver-pe9.0|javax.en
>> | >>>
>> | terprise.resource.webcontainer.jsf.renderkit|_ThreadID=15;_ThreadNam
>> | >>>
>> | e=httpWorkerThread-8080-1;_RequestID=b4039281-1e32-49ca-b9df-e9e6efd
>> | >>> b08d1;|component
>> | >>> j_id_id28 must be enclosed inside a form |#]
>> | >>>
>> | >>>
>> | >> This implies that the JSP page has a commandLink outside
>> | of a h:form.
>> | >> Can you confirm?
>> | >>
>> | >>>
>> | [#|2006-03-31T14:04:19.278-0500|WARNING|sun-appserver-pe9.0|org.apac
>> | >>>
>> | he.coyote.tomcat5.CoyoteRequest|_ThreadID=15;_ThreadName=httpWorkerT
>> | >>>
>> | hread-8080-1;_RequestID=b4039281-1e32-49ca-b9df-e9e6efdb08d1;|Unable
>> | >>> to set character encoding ISO-8859-1 because request
>> | parameters have
>> | >>> already been read, or ServletRequest.getReader() has been
>> | called|#]
>> | >>>
>> | >>> Any ideas?
>> | >>>
>> | >>> So I decided to still use myfaces + glassfish build 42.
>> | After some
>> | >>> quite a few additional tweakings, I was able to get the
>> | same result
>> | >>> as in SJSAS 8.2
>> | >>>
>> | >>> -- Cheng
>> | >>>
>> | >>>
>> | >>>
>> | >>>> Cheng Fang wrote:
>> | >>>>
>> | >>>>
>> | >>>>> Ryan,
>> | >>>>>
>> | >>>>> Thanks for looking. jbpm has dependency on myfaces:
>> | >>>>>
>> | >>>>> a listener in web.xml:
>> | >>>>> ======================
>> | >>>>>
>> | >>>>> <!-- MyFaces JSF -->
>> | >>>>> <listener>
>> | >>>>>
>> | >>>>>
>> | <listener-class>org.apache.myfaces.webapp.StartupServletContex
>> | tListener</listener-class>
>> | >>>>> </listener>
>> | >>>>> <servlet>
>> | >>>>> <servlet-name>FacesServlet</servlet-name>
>> | >>>>>
>> | <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
>> | >>>>> <load-on-startup>1</load-on-startup>
>> | >>>>> </servlet>
>> | >>>>> <servlet-mapping>
>> | >>>>> <servlet-name>FacesServlet</servlet-name>
>> | >>>>> <url-pattern>/faces/*</url-pattern>
>> | >>>>> </servlet-mapping>
>> | >>>>>
>> | >>>>> a few my faces tags used in jbpm:
>> | >>>>> =================================
>> | >>>>> <%@ taglib uri="http://myfaces.apache.org/extensions"
>> | prefix="x"%>
>> | >>>>>
>> | >>>>> Can we do these (especially the listener) with our jsf?
>> | >>>>>
>> | >>>>>
>> | >>>>>
>> | >>>> It's unfortunate that it's explicitly declared. I'd be
>> | interested
>> | >>>> in knowing if it would work with the listener commented out.
>> | >>>>
>> | >>>> As far as the taglib URI, I don't think that TLD is
>> | included in the
>> | >>>> core MyFaces impl and api jars (at least in the new
>> | version). If
>> | >>>> they are components they should technically work with our
>> | >>>> implementation as well.
>> | >>>>
>> | >>>>
>> | >>>>
>> | >>>>
>> | >>>>
>> | >>>>> -- Cheng
>> | >>>>>
>> | >>>>> On Fri, 31 Mar 2006 myblogs.sun_at_sun.com wrote:
>> | >>>>>
>> | >>>>>
>> | >>>>>
>> | >>>>>
>> | >>>>>> Ryan Lubke wrote:
>> | >>>>>>
>> | >>>>>> Is MyFaces a required dependency or will this work
>> | with the JSF included with GlassFish?
>> | >>>>>>
>> | >>>>>>
>> | _________________________________________________________________
>> | >>>>>> ___________________________________
>> | >>>>>> Respond to this comment at:
>> | >>>>>>
>> | http://blogs.sun.com/roller/page/chengfang?entry=how_to_run_jbpm_
>> | >>>>>> on#comments
>> | >>>>>>
>> | >>>>>>
>> | _________________________________________________________________
>> | >>>>>> ___________________________________
>> | >>>>>> Link to comment management page:
>> | >>>>>>
>> | http://blogs.sun.com/roller/editor/commentManagement.do?method=qu
>> | >>>>>> ery&entryid=c885fd8d09f4b0fe010a231
>> | >>>>>> b4f3f7404
>> | >>>>>>
>> | >>>>>>
>> | >>>>>>
>> | >>>>>>
>> | >>
>> | >>
>> | ---------------------------------------------------------------------
>> | >> ---
>> | >>
>> | >> <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %> <%@
>> | >> taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
>> | >>
>> | >> <f:view>
>> | >>
>> | >> <jsp:include page="header1.jsp" />
>> | >> Home
>> | >> <jsp:include page="header2.jsp" />
>> | >>
>> | >> <b><h:messages /></b>
>> | >>
>> | >> <h4>Tasklist</h4>
>> | >> <h:dataTable value="#{homeBean.taskInstances}"
>> | var="taskInstance" headerClass="tableheader"
>> | columnClasses="tablecell">
>> | >> <h:column >
>> | >> <f:facet name="header">
>> | >> <h:outputText value="Task Form Link" />
>> | >> </f:facet>
>> | >> <h:commandLink action="#{homeBean.selectTaskInstance}">
>> | >> <f:param name="taskInstanceId" value="#{taskInstance.id}"/>
>> | >> <h:outputText value="#{taskInstance.name}" />
>> | >> </h:commandLink>
>> | >> </h:column>
>> | >> <h:column>
>> | >> <f:facet name="header">
>> | >> <h:outputText value="Process" />
>> | >> </f:facet>
>> | >> <h:outputText
>> | value="#{taskInstance.taskMgmtInstance.taskMgmtDefinition.proc
>> | essDefinition.name}" />
>> | >> </h:column>
>> | >> <h:column>
>> | >> <f:facet name="header">
>> | >> <h:outputText value="Version" />
>> | >> </f:facet>
>> | >> <h:outputText
>> | value="#{taskInstance.taskMgmtInstance.taskMgmtDefinition.proc
>> | essDefinition.version}" />
>> | >> </h:column>
>> | >> </h:dataTable>
>> | >>
>> | >> <h4>Start New Process Execution</h4>
>> | >> <h:dataTable value="#{homeBean.latestProcessDefinitions}"
>> | var="processDefinition" headerClass="tableheader"
>> | columnClasses="tablecell">
>> | >> <h:column>
>> | >> <f:facet name="header">
>> | >> <h:outputText value="Start Process Link" />
>> | >> </f:facet>
>> | >> <h:commandLink action="#{homeBean.startProcessInstance}">
>> | >> <f:param name="processDefinitionId"
>> | value="#{processDefinition.id}"/>
>> | >> <h:outputText
>> | value="#{processDefinition.taskMgmtDefinition.startTask.name}" />
>> | >> </h:commandLink>
>> | >> </h:column>
>> | >> <h:column>
>> | >> <f:facet name="header">
>> | >> <h:outputText value="Process" />
>> | >> </f:facet>
>> | >> <h:outputText value="#{processDefinition.name}" />
>> | >> </h:column>
>> | >> <h:column>
>> | >> <f:facet name="header">
>> | >> <h:outputText value="Version" />
>> | >> </f:facet>
>> | >> <h:outputText value="#{processDefinition.version}" />
>> | >> </h:column>
>> | >> </h:dataTable>
>> | >>
>> | >> <jsp:include page="footer.jsp" />
>> | >> </f:view>
>> | >>
>> | >>
>> | ---------------------------------------------------------------------
>> | >> ---
>> | >>
>> | >> <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %> <%@
>> | >> taglib uri="http://java.sun.com/jsf/core" prefix="f" %> <%@ page
>> | >> import="org.jbpm.webapp.bean.*" %>
>> | >>
>> | >> <!-- HEADER -->
>> | >> <html>
>> | >> <head><title>JBoss jBPM</title>
>> | >> <link rel="stylesheet" type="text/css" href="css/jbpm.css"
>> | /> </head>
>> | >>
>> | >> <body>
>> | >> <table border="0" cellpadding="0" cellspacing="0">
>> | >> <tr>
>> | >> <!-- next line must be put one (1!) line to overcome
>> | an IE-layouting bug -->
>> | >> <td><a href="http://www.jboss.com/"><img
>> | src="images/logo_green.gif" alt="JBoss Inc." border="0" /></a></td>
>> | >> <td width="100%" valign="top">
>> | >> <table width="100%" border="0" cellpadding="0"
>> | cellspacing="0">
>> | >> <tr>
>> | >> <td width="100%" height="22" bgcolor="#9BCD4B"
>> | >> align="center" nowrap="nowrap"> <% UserBean userBean = (UserBean)
>> | >> session.getAttribute("userBean"); if ( (userBean!=null)
>> | >> && (userBean.getUserName()!=null)
>> | >> ) {
>> | >> %>
>> | >> You are logged in as <%= userBean.getUserName() %> <% }
>> | else { %> You
>> | >> are not logged in.
>> | >> <%
>> | >> }
>> | >> %>
>> | >> | <b><a href="login.jsp">Login as another user</a></b>
>> | >> </td>
>> | >> </tr>
>> | >> <tr>
>> | >> <td width="100%" align="right" valign="middle"
>> | nowrap="nowrap">
>> | >> <a class="ref"
>> | href="http://jbpm.org/docs">Docs</a>
>> | >> <a class="ref"
>> | href="http://jbpm.org/forums">Forums</a>
>> | >> <a class="ref"
>> | href="http://jbpm.org/wiki">Wiki</a>
>> | >> <a class="ref"
>> | href="http://jbpm.org/downloads">Download</a>
>> | >> <a class="ref"
>> | href="http://jbpm.org/contact">Contact</a>
>> | >> </td>
>> | >> </tr>
>> | >> <tr>
>> | >> <td width="100%" valign="top" nowrap="nowrap">
>> | >> <hr style="margin:0px; padding;0px;" size="1"
>> | width="100%" />
>> | >> <h2 style="padding:0px; margin:0px; border:0px;" >
>> | >>
>> | >>
>> | ---------------------------------------------------------------------
>> | >> ---
>> | >>
>> | >> <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %> <%@
>> | >> taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
>> | >>
>> | >> </h2>
>> | >> </td>
>> | >> </tr>
>> | >> </table>
>> | >> </td>
>> | >> </tr>
>> | >> <tr>
>> | >> <td width="100%" height="100%" colspan="2" valign="top">
>> | >> <table width="100%" height="100%" border="0"
>> | cellpadding="0" cellspacing="0" >
>> | >> <tr>
>> | >> <td valign="top">
>> | >> <table width="100%" height="100%" border="0"
>> | cellpadding="0" cellspacing="0" >
>> | >> <tr>
>> | >> <td width="217" valign="top"><img
>> | src="images/hdr_green_side.gif" alt="green side" /></td>
>> | >> </tr>
>> | >> <tr>
>> | >> <!-- next line must be put one (1!) line
>> | to overcome an IE-layouting bug -->
>> | >> <td width="175"><a class="nav"
>> | onmouseover="this.style.backgroundColor='#cccccc';
>> | this.style.color='#000000';"
>> | onmouseout="this.style.backgroundColor='#5c5c4f';
>> | this.style.color='#ffffff';" href="home.jsp">Home</a><a
>> | class="nav"
>> | onmouseover="this.style.backgroundColor='#cccccc';
>> | this.style.color='#000000';"
>> | onmouseout="this.style.backgroundColor='#5c5c4f';
>> | this.style.color='#ffffff';"
>> | href="admin.jsp">Administration</a><a class="nav"
>> | onmouseover="this.style.backgroundColor='#cccccc';
>> | this.style.color='#000000';"
>> | onmouseout="this.style.backgroundColor='#5c5c4f';
>> | this.style.color='#ffffff';" href="monitor.jsp">Monitoring</a></td>
>> | >> </tr>
>> | >> <tr>
>> | >> <td width="217" valign="top"><img
>> | style="margin-top:1px;" src="images/side_nav_green_btm.gif"
>> | alt="green side" /></td>
>> | >> </tr>
>> | >> <tr>
>> | >> <td height="100%">
>> | >>
>> | >> </td>
>> | >> </tr>
>> | >> <tr>
>> | >> <td>
>> | >> <img src="images/swoosh_green.gif"
>> | alt="swoosh" />
>> | >> </td>
>> | >> </tr>
>> | >> </table>
>> | >> </td>
>> | >>
>> | >> <td height="100%" width="100%" valign="top">
>> | >>
>> | >> <!-- CONTENT -->
>> | >>
>> | >>
>> | ---------------------------------------------------------------------
>> | >> ---
>> | >>
>> | >>
>> | >> <!-- FOOTER -->
>> | >> </td>
>> | >>
>> | >> </tr>
>> | >> </table>
>> | >> </td>
>> | >> </tr>
>> | >> </table>
>> | >> </body>
>> | >>
>> | >> </html>
>> | >>
>> |
>> |
>>
>>