Hi to all ,
(Another lurker crawls out from the woodwork).
Two quick questions that I'm hoping someone can give me some pointers on.
Question 1
############
Log4j. Can someone please give me specific instructions on how
to get log4j working. I understand the configuration file ok, it's
just I never get any output. Do I need to anything in setupLogging()
method or should it just work!? I did get it to work once but
not again.. Arrrrggh..
BTW, I have a static class that I use to keep a handle to my logger:
ie:
public class Tigerangel {
public static String SUITFRONT = "SUIT_FRONT";
public static String SUITBACK = "SUIT_BACK";
public static Category Log = Category.getInstance("TigerLogging") ; // Log
handle to Logger.
}
and to log message, do this:
Tigerangel.Log.error(...);
Any pointers???
Question 2
############
I have created a new component as such.
=========================== Picture.jwc ========================
<specification allow-informal-parameters="yes"
class="com.psaunders.tigerangel.tapestry.Picture">
<description> Get the specification for a picture given a product ID and the
picture type.
Picture type could be SUIT_FRONT, SUIT_BACK.</description>
<parameter name="productTypeId" direction="in" java-type="java.lang.String"
required="no" />
<parameter name="pictureType" direction="in" java-type="java.lang.String"
required="no"/>
<parameter name="productSize" direction="in" java-type="java.lang.Long"
required="no"/>
<component id="insertName" type="Insert">
<binding name="value" property-path="pictureName"/>
</component>
<component id="e" type="Foreach">
<binding name="source" property-path="panels"/>
</component>
<component id="insertImage" type="Insert">
<binding name="value" property-path="components.e.value"/>
</component>
</specification>
==========================================
Though when I try to use it like this:
==========================
Home.jwc ==================
<specification class="net.sf.tapestry.html.BasePage">
<component id="mypicture" type="Picture">
<static-binding name="productTypeId">23</static-binding>
<static-binding name="productSize">10</static-binding>
<static-binding name="pictureType">SUIT_FRONT</static-binding>
</component>
</specification>
=================================================
I get this exception:
========================== error output =================
Can't find resource for bundle java.util.PropertyResourceBundle, key
ParameterManager.ParameterManager.static-initialization-failure
component:
net.sf.tapestry.html.BasePage@19e15c[Home]
java.util.MissingResourceException
Can't find resource for bundle java.util.PropertyResourceBundle, key
ParameterManager.ParameterManager.static-initialization-failure
className:
java.util.PropertyResourceBundle
key:
ParameterManager.ParameterManager.static-initialization-failure
Stack Trace:
java.util.ResourceBundle.getObject(ResourceBundle.java:314)
java.util.ResourceBundle.getString(ResourceBundle.java:274)
net.sf.tapestry.Tapestry.getString(Tapestry.java:471)
net.sf.tapestry.Tapestry.getString(Tapestry.java:522)
.
.
======================================
productSize is defined with getter and setter methods,
and it is of type Long.
I have noticed if I change it to be a String instead of Long it works
fine. Does this mean I have to use String or is this a bug??
I would very much appreciate help on these questions.
Thankyou, and thanks to Howard of course!
Patrick.
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Tapestry-developer mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/tapestry-developer