You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ofbiz.apache.org by Santosh Malviya <sa...@hotwaxmedia.com> on 2009/01/19 13:01:51 UTC

Re: Apache OFBiz development

Hello Wicus,

<input type="text" size="30" maxlength="100" name="planet"
value="${(mechMap.postalAddress.planet)!"}">

In this line you have included extra double quote(") before } so remove it and give it a try... 



Wicus wrote:
> Hi,
>
> Working through the Apache OFBiz development : The Beginner's Tutorial, I'm
> experiencing the following error when trying to update the User-Interface
> (when creating a new enitity) as explained on pages 39 - 41.
>
> Error rendering included template at location
> [component://party/webapp/partymgr/party/editcontactmech.ftl]:
> freemarker.core.ParseException: Encountered ">" at line 185, column 127 in
> component://party/webapp/partymgr/party/editcontactmech.ftl. Was expecting
> one of: "}" ... "." ... "[" ... "(" ... "?" ... "!" ...  ... "??" ... "+"
> ... "-" ... "*" ... "/" ... "%" ... "!=" ... "=" ... "==" ... ">=" ...  ...
> ">" ...  ...  ...  ... ".." ...  ...  ... 
>
>
> Line 185 only goes to column count 116.... and is as follows:-
>
>
> <input type="text" size="30" maxlength="100" name="planet"
> value="${(mechMap.postalAddress.planet)!"}">
>
>
>
> Herewith a snippet from my editcontactmech.ftl 
>
>     <tr>
>       <td class="label">${uiLabelMap.PartyIsUsps}</td>
>       <td><#if
> isUsps>${uiLabelMap.CommonY}<#else>${uiLabelMap.CommonN}</#if>
>       </td>
>     </tr>
>     <tr>
> 		<td class="label">Planet</td>
> 		<td>
> 			<input type="text" size="30" maxlength="100" name="planet"
> value="${(mechMap.postalAddress.planet)!"}">
> 		</td>
> 	</tr>
>   <#elseif "TELECOM_NUMBER" = mechMap.contactMechTypeId?if_exists>
>     <tr>
>       <td class="label">${uiLabelMap.PartyPhoneNumber}</td>
>       <td>
>         <input type="text" size="4" maxlength="10" name="countryCode"
> value="${(mechMap.telecomNumber.countryCode)?default(request.getParameter('countryCode')?if_exists)}">
>         -&nbsp;<input type="text" size="4" maxlength="10" name="areaCode"
> value="${(mechMap.telecomNumber.areaCode)?default(request.getParameter('areaCode')?if_exists)}">
>         -&nbsp;<input type="text" size="15" maxlength="15"
> name="contactNumber"
> value="${(mechMap.telecomNumber.contactNumber)?default(request.getParameter('contactNumber')?if_exists)}">
>         &nbsp;${uiLabelMap.PartyContactExt}&nbsp;<input type="text" size="6"
> maxlength="10" name="extension"
> value="${(mechMap.partyContactMech.extension)?default(request.getParameter('extension')?if_exists)}">
>       </td>
>
>
> Thanks to anyone that can pointing out this issue.
>
>
>
> Warning : Noob in training :working:
>   

-- 
Thanks and Regards
Santosh Malviya
Enterprise Software Developer
Hotwax Media Inc.
Indore(M.P.) India
Mobile : +91 9977650914 


Re: Apache OFBiz development

Posted by Wicus <wi...@webmail.co.za>.
Thanks for the reply guys.

Though it does display now, the specific text box already has
"(mechMap.postalAddress.planet)!" within it... where it should actually wait
for user input before writing to / reading from the database...

http://www.nabble.com/file/p21542741/Planet%2BEntity.jpeg 



The entity definition was created within
\applications\party\entitydef\entitymodel.xml as

<field name="planet" type="name"></field>

within the <entity entity-name="PostalAddress" 
                  package-name="org.ofbiz.party.contact"
                  title="Postal Address Entity">

and above the </entity> line

thereby adding a new field named planet to the data entity PostalAddress

If I'm correct in the abovementioned, why is my text box reflecting the
(mechMap.postalAddress.planet)!  ???

Thanks for any advice once again.

Wicus

-- 
View this message in context: http://www.nabble.com/Apache-OFBiz-development-tp21541727p21542741.html
Sent from the OFBiz - User mailing list archive at Nabble.com.


Re: Apache OFBiz development

Posted by Wicus <wi...@webmail.co.za>.
Thanks once again to all whom replied to my query.

It is really appreciated.

The errata has been already submitted to
http://www.packtpub.com/support/book/apache-ofbiz-development-beginners-tutorial

and is as follows:-

page 41 	Code 	19 Nov 08

Under the heading 'Editing the User-Interface', in the code line:
value="${mechMap.postalAddress.planet)!"}"> 
the second double-quote and the exclamation mark should not be present. 
This code should read: 
value="${(mechMap.postalAddress.planet)}"> 

-- 
View this message in context: http://www.nabble.com/Apache-OFBiz-development-tp21541727p21558423.html
Sent from the OFBiz - User mailing list archive at Nabble.com.