Hi,

I have a small demo application that use to work correctly with
version 5.0.6 but know when I switch to  5.0.10 it's stop working.

I'm getting an exception:

An unexpected application exception has occurred.
Component tickets/SearchTicket does not contain an embedded component
with id 'search'.

Any help will be appreciate.

Simon

My SearchTicket class looks like this:

public class SearchTicket {

    @Persist
    private long ticketId;

    @Persist
    private Ticket ticket;

    @Inject
    @Service("ticketingService")
    private RtService service;

    @Component(id="search")
    private Form form;

    @Validate("required")
    public long getTicketId(){
        return ticketId;
    }

    public void setTicketId(long id){
        ticketId = id;
    }

    public String getStatus() {
        return ticket.getStatus().name();
    }

    public String getQueue() {
        return ticket.getQueue().getName();
    }

    public Date getCreated() {
        return ticket.getCreated();
    }

    public Form getForm(){
        return form;
    }

    Object onSuccess(){
        long id = getTicketId();
        if(id == 0){
            form.recordError("Please specify Ticket Id");
            return "SearchTicket";
        }

        try {
            ticket = service.load(getTicketId());
        } catch (TicketNotFoundException e) {
            form.recordError(e.getMessage());
        }

        return "SearchTicket";
    }
}

and the page template is:

<html t:type="layout"
xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd";>
    <h4>Search Ticket</h4>
        <br/><br/>
        <div class="containerBox">
            <form t:id="search">
                <t:errors/>
                    <span class="roundtop">
                        <span class="roundTop1"/>
                        <span class="roundTop2"/>
                        <span class="roundTop3"/>
                        <span class="roundTop4"/>
                    </span>
                    <div class="boxContent">
                        <table width="65%" border="0" cellspacing="5"
cellpadding="5" class="edit">
                            <tr>
                                <td width="29%" valign="top"
class="label green"><t:label t:for="ticketId"/></td>
                                <td width="71%" align="right"
valign="top"><input t:type="textfield" t:id="ticketId"
t:value="ticketId" class="field"/> </td>
                            </tr>
                            <tr>
                                <td/>
                                <td align="right"><input
t:type="submit" class="button" value="Proceed >"/></td>
                            </tr>
                        </table>
                    </div>
                    <span class="roundbottom">
                        <span class="round4"/>
                        <span class="round2"/>
                        <span class="round1"/>
                    </span>
                </form>
            </div>
            <br/>
            <t:if t:test="prop:ticketId">
                <h4>Ticket Information</h4>
                <br/><br/>
                <div class="containerBox">
                    <span class="roundtop">
                        <span class="roundTop1"/>
                        <span class="roundTop2"/>
                        <span class="roundTop3"/>
                        <span class="roundTop4"/>
                    </span>
                    <div class="boxContent">
                        <table width="65%" border="0" cellspacing="5"
cellpadding="5" class="edit">
                            <tr>
                                <td width="29%" valign="top"
class="label green">Ticket Id</td>
                                <td width="71%" align="left"
valign="top">${ticketId}</td>
                            </tr>
                            <tr>
                                <td width="29%" valign="top"
class="label green">Status</td>
                                <td width="71%" align="left"
valign="top">${status}</td>
                            </tr>
                            <tr>
                                <td width="29%" valign="top"
class="label green">Queue</td>
                                <td width="71%" align="left"
valign="top">${queue}</td>
                            </tr>
                            <tr>
                                <td width="29%" valign="top"
class="label green">Created</td>
                                <td width="71%" align="left"
valign="top">${created}</td>
                            </tr>
                          </table>
                    </div>
                   <span class="roundbottom">
                        <span class="round4"/>
                        <span class="round2"/>
                        <span class="round1"/>
                    </span>
                </div>
            </t:if>
</html>

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

Reply via email to