Hello,
 I am working my way through the "Handling File Downloads and Uploads" chapter 
in the "Enjoying Web Development" book however I am crashing into a brick wall.
 The setter for the LinkFactory is never being called thus resulting in a null 
pointer exception.

 hivemodule.xml snippet:
     <service-point id="BipService" 
interface="org.apache.tapestry.engine.IEngineService">
        <invoke-factory>
            <construct class="com.kodak.mis.web.engine.BipService">
                <set-object property="linkFactory" 
value="service:tapestry.url.LinkFactory"/>
            </construct>
        </invoke-factory>
    </service-point>

    <contribution configuration-id="tapestry.services.ApplicationServices">
        <service name="BipService" 
object="instance:com.kodak.mis.web.engine.BipService"/>
    </contribution>

 Code snippet:
public class BipService implements IEngineService {

    private static final Logger logger = Logger.getLogger(BipService.class);

    private LinkFactory _linkFactory;

    public void setLinkFactory(LinkFactory linkFactory) {
        if(logger.isDebugEnabled())logger.debug("Link factory called: " + 
linkFactory);
        _linkFactory = linkFactory;
    }

    public ILink getLink(boolean post, Object parameter) {
        Map parameters = new HashMap();
        if(logger.isDebugEnabled()) logger.debug("link factory is null " + 
(_linkFactory == null) );
        return _linkFactory.constructLink(this,post,parameters,false);
    }

 It is always null. For the 'set-object' line I can enter complete garbage for 
the value and it won't complain!

 Am I missing something??

 Thanks!
 Ryan

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to