Hi All,

I am getting an error called 'target is null for setProperty(null, "targetUrl",
thomas)'.
This is being generated when Iam Editing a record.
 - I have a List page where iam displaying lots of records with Edit link in
each record.
 - When i click edit link I get another page where the record details are 
displayed.
 - After editing a few details or editing nothing when I click submit I get this
paticular Error.

Following is my Class file:

package com.palm.fnur.page;

import java.text.Format;
import java.text.NumberFormat;
import java.util.Date;

import org.apache.log4j.Logger;
import org.apache.tapestry.IPage;
import org.apache.tapestry.IRequestCycle;




import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;


import com.palm.fnur.model.entities.BusinessUsers;
import com.palm.fnur.model.entities.FnuRedirect;


public abstract class EditFnuPage extends SearchResultsPage {
        private String sourceUrl, targetUrl, businessUserName, deptName, 
emailAddress,
autoGeneratedFlag;
        
        static Logger logger = Logger.getLogger(EditFnuPage.class);
        public abstract FnuRedirect getFnuRedirect();
        public abstract void setFnuRedirect(FnuRedirect fnuRedirect);
        
        public abstract String getTargetUrl();
        public void setTargetUrl(String Value){
                targetUrl = Value;
        }
        public void beginEdit(IRequestCycle cycle,long index)
        {
                logger.info("Value of Index"+index);
                ApplicationContext context = new
ClassPathXmlApplicationContext("applicationContext.xml");
                com.palm.fnur.dao.IFnuDAO iFnuDAO =
(com.palm.fnur.dao.IFnuDAO)context.getBean("fnuDAO");
                logger.info("Called getEditFnuLIJU"+index);
                FnuRedirect fnuRedirect = (FnuRedirect)iFnuDAO.getFnu(index);
                logger.info("ValLIJU CALLEDdex"+index);
                logger.info("Value of 
Index"+fnuRedirect.getAutoGeneratedFlag());
                if(fnuRedirect.getAutoGeneratedFlag().equals("Y"))
                {
                        fnuRedirect.setAutoGeneratedFlag("true");       
                }else
                {
                        fnuRedirect.setAutoGeneratedFlag("false");
                }
                
                setFnuRedirect(fnuRedirect);
                cycle.activate(this);   
        }
        public IPage onOk(IRequestCycle cycle)
        {
                
                logger.info("EditFNU onOk Called.");
                
                
                boolean inserted = false;
                logger.info("EditFNU CAlled ...1.");
                try
                {
                        logger.info("AddFNU CAlled ...2.");
            inserted = fnuDao.editFnu(fnuRedirect);
        }
                catch(Exception e)
                {
                        inserted = false;
                }
                ConfirmationPage resultPage = (ConfirmationPage)
cycle.getPage("AdminConfirmAddFnu");
                if (inserted == true)
                {
                        cycle.activate("Home");
                }
                else
                {
                        cycle.activate("FnuManual");
                }
        return resultPage;
        }
}


And following is my page file


<?xml version="1.0" encoding ="UTF-8"?>
<!DOCTYPE page-specification PUBLIC
        "-//Apache Software Foundation//Tapestry Specification 4.0//EN"
        "http://jakarta.apache.org/tapestry/dtd/Tapestry_4_0.dtd";>
<page-specification class="com.palm.fnur.page.EditFnuPage">

<component id="edit" type="Form">
                <binding name="listener" value="listener:onOk"/>
</component>

        <inject property="resultPage" type="page" object="Result"/>
        <component id="leftnav" type="AdminLeftNav"/>
        <component id="head" type="AdminHead"/>
        <component id="footer" type="AdminFooter"/>

<component id="fnuId" type="Insert">
                <binding name="value" value="fnuRedirect.fnuId"/>
</component>

<component id="sourceUrl" type="Insert">
                <binding name="value" value="fnuRedirect.sourceUrl"/>
</component>
<component id="httpStatus" type="PropertySelection" >
        <binding name="value" value="fnuRedirect.httpStatusId" />
        <binding name="model" value="httpStatusSelection"/>
</component>
<component id="status" type="PropertySelection" >
        <binding name="value" value="fnuRedirect.fnuStatusId" />
        <binding name="model" value="statusSelection"/>
</component>
<component id="targetUrl" type="TextField">
                <binding name="value" value="fnuRedirect.targetUrl"/>
</component>

<component id="businessUserName" type="TextField">
                <binding name="value" value="fnuRedirect.businessUserName"/>
</component>

<component id="emailAddress" type="TextField">
                <binding name="value" value="fnuRedirect.emailAddress"/>
</component>

<component id="deptName" type="TextField">
                <binding name="value" value="fnuRedirect.deptName"/>
</component>
<component id="pubDate" type="DatePicker">
<binding name="value" value="fnuRedirect.modifiedDate"/>
</component>

<component id="autoGeneratedFlag" type="Checkbox">
                <binding name="value" value="fnuRedirect.autoGeneratedFlag"/>
        </component>
</page-specification>




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

Reply via email to