Your idea of using t:radio was the first thought I had as well.  Maybe
if you specify the for as a fully-qualified client-id it will work.

If you don't want to hardcode this, one possibility is to bind the
selectOneRadio to a backing bean and fetch the clientid for that
component as the value binding of the t:radio for attribute.

On 6/1/07, Beelen, Marco <[EMAIL PROTECTED]> wrote:



Hello all,

I'm building an application and I don't know how to solve a certain GUI
problem.

Use case: The employee enters an request for a certain seeker ( = a Customer
)

1) The employee searches for the seeker based upon it's name.
2) The employee select the appropreate seeker from the resultset using a
radio-button ( SelectOneRadio )
3) The employee starts to enter request information and continues…...

This all goes well.

Snippet from the page used in step 2:

<h:selectOneRadio
        layout="pageDirection"
        value="#{createRequestBean.selectedSeeker}">

        <t:selectItems
                value="#{seekerSearchBean.seekers}"
                var="seeker"
                itemLabel="#{seeker.displayName} / #{seeker.city}"
                itemValue="#{seeker}"
        />

</h:selectOneRadio>

Now what I want to add is the possibilty to start editing the
seeker-information for step to by allowing the employee to click on the
label of the SelectItem, which navigation to an EditSeeker-page on which the
selected seeker will displayed.

But I can't create a CommandLink or OutputLink as a part of the itemLabel of
the selectItems.

Does any body have any suggestions for this?

I was thinking about using the a combination of t:selectOneRadio with
layout="spread", a t:dataList and t:updateActionListener like this:

<t:selectOneRadio
        id="seekerSelection"
        layout="spread"
        value="#{createRequestBean.selectedSeeker}">

        <t:selectItems
                value="#{seekerSearchBean.seekers}"
                var="seeker"
                itemLabel=""
                itemValue="#{seeker}" />

</t:selectOneRadio>

<table>
    <t:dataList
        var="seeker"
        value="#{seekerSearchBean.seekers}"
        layout="simple"
        rowIndexVar="rowIndex">

        <tr>
                <td>
                        <t:radio for="seekerSelection" index="#{rowIndex}"
/>

                        <h:commandLink
value="#seekerEditBean.startEditProcess">

                                <h:outputText value="#{seeker.displayName} /
#{seeker.city}}" />

                                <t:updateActionListener
                                        property="#{seekerEditBean.seeker}"
                                        value="#{seeker}" />

                        </h:commandLink>
                </td>
        </tr>

    </t:dataList>

</table>


<h:commandButton
        action="#{createRequestBean.selectBeneficiary}"
        value="#{labels.btnNext}" />


But that doesn't work, because it throws an IllegalStateException: Could not
find component 'seekerSelection' (calling findComponent on component
'beneficiarySelectList:selectSeekerForm:_id104:0:_id106')

The component with id _id106 is the <t:radio for="seekerSelection" />

Any suggestions will be greatly appreciated!

With kind regards,
  Marco Beelen


------------------------------------------------------------------------------
Notice: This e-mail message, together with any attachments, contains
information of Merck & Co., Inc. (One Merck Drive, Whitehouse Station,
New Jersey, USA 08889), and/or its affiliates (which may be known
outside the United States as Merck Frosst, Merck Sharp & Dohme or MSD
and in Japan, as Banyu - direct contact information for affiliates is
available at http://www.merck.com/contact/contacts.html)
that may be
confidential, proprietary copyrighted and/or legally privileged. It is
intended solely for the use of the individual or entity named on this
message. If you are not the intended recipient, and have received this
message in error, please notify us immediately by reply e-mail and then
delete it from your system.

------------------------------------------------------------------------------



Reply via email to