You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@shale.apache.org by Jonathan Smith <sm...@hotmail.com> on 2006/11/13 18:19:44 UTC

form rendering problem

ok using this code

<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">


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



	<t:div styleClass="portletheader">
		<h:outputText value="Add Contact"></h:outputText>
	</t:div>

	<h:form>
		<table>
			<tr>
				<td width="50%"><h:outputText value="First Name: " /></td>
				<td width="50%"><h:inputText id="fName" value="" /></td>
			</tr>
			<tr>
				<td><h:outputText value=" Last Name: " /></td>
				<td><h:inputText id="lName" value="" /></td>
			</tr>
			<tr>
				<td><h:outputText value=" Office: " /></td>
				<td><h:inputText id="office" value="" /></td>
			</tr>
			<tr>
				<td><h:outputText value=" Extension: " /></td>
				<td><h:inputText id="extension" value="" /></td>
			</tr>
			<tr>
				<td><h:outputText value=" Email: " /></td>
				<td><h:inputText id="email" value="" /></td>
			</tr>
			<tr>
				<td><h:outputText value=" IM Username: " /></td>
				<td><h:inputText id="imUsername" value="" /></td>
			</tr>
			<tr>
				<td><h:outputText value=" IM Service:" /></td>
				<td><h:inputText id="imService" value="" /></td>
			</tr>
		</table>
		<h:commandButton styleClass="managerboxbutton" style="margin-top:5%;"
			value="Add Contact" action="addcontact"></h:commandButton>
	</h:form>

the form gets rendered wrong. please see attachment for a picture.

_________________________________________________________________
Stay in touch with old friends and meet new ones with Windows Live Spaces 
http://clk.atdmt.com/MSN/go/msnnkwsp0070000001msn/direct/01/?href=http://spaces.live.com/spacesapi.aspx?wx_action=create&wx_url=/friends.aspx&mkt=en-us

Re: usecase example logon dialog

Posted by Jonathan Smith <sm...@hotmail.com>.
Sorry for what i think is a dumb question I just can get this to work. so i 
am tryng to use a dialog to navigate throught some webpages.

here is the dialog.

<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE dialogs PUBLIC
  "-//Apache Software Foundation//DTD Shale Dialog Configuration 1.0//EN"
  "http://shale.apache.org/dtds/dialog-config_1_0.dtd">
<dialogs>




  <dialog                name="ContactManager"
                        start="Manage">

    <action 			name="Manage"
    					method="manager.managecontacts">

      <transition 		outcome="managecontacts"
      					target="contactmanager">
      </transition>

    </action>




    <view  				name="contactmanager"
    					viewId="/jsp/manager/contacts/manageContacts.jsp">

    	<transition 	outcome="add"
    					 target="addContact">
    	</transition>

    	<transition 	outcome="search"
    					 target="searchContact">
    	</transition>

    </view>

    <view 				name="addContact"
    				  viewId="/addContact.jsp" >

    	<transition 	outcome="addcontact"
    					 target="MVPManager">
    	</transition>
    </view>

    <end                 name="Exit"
                       viewId="/manager.jsp"/>

  </dialog>



</dialogs>

here is the button that calls it.

<h:form>
		<h:commandButton  styleClass="managerboxbutton" style="margin-top:5%;"
		 	value="Contacts" action="dialog:ContactManager" >
		</h:commandButton>
		<h:commandButton  styleClass="managerboxbutton"  value="Contracts"  >
		</h:commandButton>
		<h:commandButton  styleClass="managerboxbutton"  value="Projects" 
action="managecontacts" >
		</h:commandButton>
	</h:form>

and all my managecontacts method does is return a string of managecontacts 
so what am i doing wrong? I am new to shale so this is probably something 
simple.

_________________________________________________________________
All-in-one security and maintenance for your PC.  Get a free 90-day trial! 
http://clk.atdmt.com/MSN/go/msnnkwlo0050000002msn/direct/01/?href=http://www.windowsonecare.com/?sc_cid=msn_hotmail


Re: usecase example logon dialog

Posted by Craig McClanahan <cr...@apache.org>.
On 11/14/06, Jonathan Smith <sm...@hotmail.com> wrote:
>
> in usecases.jsp where does the #{logon$dialog.enter} come from. Is that a
> managed bean method or is that something that lets you enter the dialog
> automatically. If if is declared in a managed bean please let me know
> which
> one and where in the faces-config that bean is declared.


How recent is the version of Shale you are looking at?  In the current
sources, there is a managed bean named "profile$logon".  IIRC, in the very
early days we used the Spring integration to create one of these beans, so
check in "WEB-INF/applicationContext.xml" as well.

thank you
> Jon Smith


Craig


_________________________________________________________________
> All-in-one security and maintenance for your PC.  Get a free 90-day trial!
>
> http://clk.atdmt.com/MSN/go/msnnkwlo0050000002msn/direct/01/?href=http://www.windowsonecare.com/?sc_cid=msn_hotmail
>
>

SV: usecase example logon dialog

Posted by Hermod Opstvedt <he...@opstvedt.com>.
Hi

If ypu look in faces-config.xml you will find tke declaration of
logon$dialog. Then you can look for the "enter" method in that bean.

Hermod

-----Opprinnelig melding-----
Fra: Jonathan Smith [mailto:smithtown33@hotmail.com] 
Sendt: 14. november 2006 18:00
Til: user@shale.apache.org
Emne: usecase example logon dialog

in usecases.jsp where does the #{logon$dialog.enter} come from. Is that a 
managed bean method or is that something that lets you enter the dialog 
automatically. If if is declared in a managed bean please let me know which 
one and where in the faces-config that bean is declared.

thank you
Jon Smith

_________________________________________________________________
All-in-one security and maintenance for your PC.  Get a free 90-day trial! 
http://clk.atdmt.com/MSN/go/msnnkwlo0050000002msn/direct/01/?href=http://www
.windowsonecare.com/?sc_cid=msn_hotmail


usecase example logon dialog

Posted by Jonathan Smith <sm...@hotmail.com>.
in usecases.jsp where does the #{logon$dialog.enter} come from. Is that a 
managed bean method or is that something that lets you enter the dialog 
automatically. If if is declared in a managed bean please let me know which 
one and where in the faces-config that bean is declared.

thank you
Jon Smith

_________________________________________________________________
All-in-one security and maintenance for your PC.  Get a free 90-day trial! 
http://clk.atdmt.com/MSN/go/msnnkwlo0050000002msn/direct/01/?href=http://www.windowsonecare.com/?sc_cid=msn_hotmail


Re: form rendering problem

Posted by David Geary <sa...@gmail.com>.
David D. gives some good advice, but the standard JSF way of doing this,
without having to drag Tomahawk into the mix is to use <h:panelGrid>. btw,
you don't need empty bodies in your JSF HTML tags.


david

2006/11/13, david.delbecq <da...@oma.be>:
>
> Hi Jonathan,
>
> Don't mix JSF component and html tags in your JSP. The whole JSF form
> tree is rendered at the position of the <h:form> and the html tags are
> rendered after the form tag. If you want to include html tags inside
> your jsf tree, use the <f:verbatim> component around html sections or
> use the t:tag of tomahawk. The later one is cleaner in terms of
> hierarchy in the jsp, but might be difficult to read if you go too deep.
>
> In your case (rendering a table) there is already a grid component in
> tomahawk that does it :)
>
>
> btw, attachements are stripped away from mailing list. If you want to
> provide screenshots use something like imageshak.
>
> Jonathan Smith a écrit :
> > ok using this code
> >
> > <%@ page language="java" contentType="text/html; charset=ISO-8859-1"
> >     pageEncoding="ISO-8859-1"%>
> > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
> >
> >
> > <%@ taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
> > <%@ taglib prefix="h" uri="http://java.sun.com/jsf/html"%>
> > <%@ taglib prefix="t" uri="http://myfaces.apache.org/tomahawk"%>
> >
> >
> >
> >     <t:div styleClass="portletheader">
> >         <h:outputText value="Add Contact"></h:outputText>
> >     </t:div>
> >
> >     <h:form>
> >         <table>
> >             <tr>
> >                 <td width="50%"><h:outputText value="First Name: "
> > /></td>
> >                 <td width="50%"><h:inputText id="fName" value="" /></td>
> >             </tr>
> >             <tr>
> >                 <td><h:outputText value=" Last Name: " /></td>
> >                 <td><h:inputText id="lName" value="" /></td>
> >             </tr>
> >             <tr>
> >                 <td><h:outputText value=" Office: " /></td>
> >                 <td><h:inputText id="office" value="" /></td>
> >             </tr>
> >             <tr>
> >                 <td><h:outputText value=" Extension: " /></td>
> >                 <td><h:inputText id="extension" value="" /></td>
> >             </tr>
> >             <tr>
> >                 <td><h:outputText value=" Email: " /></td>
> >                 <td><h:inputText id="email" value="" /></td>
> >             </tr>
> >             <tr>
> >                 <td><h:outputText value=" IM Username: " /></td>
> >                 <td><h:inputText id="imUsername" value="" /></td>
> >             </tr>
> >             <tr>
> >                 <td><h:outputText value=" IM Service:" /></td>
> >                 <td><h:inputText id="imService" value="" /></td>
> >             </tr>
> >         </table>
> >         <h:commandButton styleClass="managerboxbutton"
> > style="margin-top:5%;"
> >             value="Add Contact" action="addcontact"></h:commandButton>
> >     </h:form>
> >
> > the form gets rendered wrong. please see attachment for a picture.
> >
> > _________________________________________________________________
> > Stay in touch with old friends and meet new ones with Windows Live
> > Spaces
> >
> http://clk.atdmt.com/MSN/go/msnnkwsp0070000001msn/direct/01/?href=http://spaces.live.com/spacesapi.aspx?wx_action=create&wx_url=/friends.aspx&mkt=en-us
> >
>
>

Re: form rendering problem

Posted by "david.delbecq" <da...@oma.be>.
Hi Jonathan,

Don't mix JSF component and html tags in your JSP. The whole JSF form
tree is rendered at the position of the <h:form> and the html tags are
rendered after the form tag. If you want to include html tags inside
your jsf tree, use the <f:verbatim> component around html sections or
use the t:tag of tomahawk. The later one is cleaner in terms of
hierarchy in the jsp, but might be difficult to read if you go too deep.

In your case (rendering a table) there is already a grid component in
tomahawk that does it :)


btw, attachements are stripped away from mailing list. If you want to
provide screenshots use something like imageshak.

Jonathan Smith a écrit :
> ok using this code
>
> <%@ page language="java" contentType="text/html; charset=ISO-8859-1"
>     pageEncoding="ISO-8859-1"%>
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
>
>
> <%@ taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
> <%@ taglib prefix="h" uri="http://java.sun.com/jsf/html"%>
> <%@ taglib prefix="t" uri="http://myfaces.apache.org/tomahawk"%>
>
>
>
>     <t:div styleClass="portletheader">
>         <h:outputText value="Add Contact"></h:outputText>
>     </t:div>
>
>     <h:form>
>         <table>
>             <tr>
>                 <td width="50%"><h:outputText value="First Name: "
> /></td>
>                 <td width="50%"><h:inputText id="fName" value="" /></td>
>             </tr>
>             <tr>
>                 <td><h:outputText value=" Last Name: " /></td>
>                 <td><h:inputText id="lName" value="" /></td>
>             </tr>
>             <tr>
>                 <td><h:outputText value=" Office: " /></td>
>                 <td><h:inputText id="office" value="" /></td>
>             </tr>
>             <tr>
>                 <td><h:outputText value=" Extension: " /></td>
>                 <td><h:inputText id="extension" value="" /></td>
>             </tr>
>             <tr>
>                 <td><h:outputText value=" Email: " /></td>
>                 <td><h:inputText id="email" value="" /></td>
>             </tr>
>             <tr>
>                 <td><h:outputText value=" IM Username: " /></td>
>                 <td><h:inputText id="imUsername" value="" /></td>
>             </tr>
>             <tr>
>                 <td><h:outputText value=" IM Service:" /></td>
>                 <td><h:inputText id="imService" value="" /></td>
>             </tr>
>         </table>
>         <h:commandButton styleClass="managerboxbutton"
> style="margin-top:5%;"
>             value="Add Contact" action="addcontact"></h:commandButton>
>     </h:form>
>
> the form gets rendered wrong. please see attachment for a picture.
>
> _________________________________________________________________
> Stay in touch with old friends and meet new ones with Windows Live
> Spaces
> http://clk.atdmt.com/MSN/go/msnnkwsp0070000001msn/direct/01/?href=http://spaces.live.com/spacesapi.aspx?wx_action=create&wx_url=/friends.aspx&mkt=en-us
>