I may have misunderstood you then.  I thought you meant the trick where EL 
passes a parameter to a Map, but the application developer has implemented Map 
such that the parameter is then passed to a method.

Dennis Byrne

>-----Original Message-----
>From: Grant Smith [mailto:[EMAIL PROTECTED]
>Sent: Thursday, March 9, 2006 03:25 AM
>To: 'MyFaces Discussion'
>Subject: Re: How to pass argument in a JSF action
>
>Yessir !!
>
>Here is a snippit of Real Code. We're using this featuire quite extensively.
>
>
>
><t:dataTable value="#{smtViewHistoryBean.viewHistory.details}" var="detail"
>                                 style="width:100%;" styleClass="formTable"
>rowClasses="columnHeader"
>                                 headerClass="columnHeader">
>                        <t:column style="vertical-align:top;"
>                                  headerstyleClass="columnHeader" >
>                            <f:facet name="header">
>                                <h:outputText value="Effective Date"
>style="vertical-align:top;"/>
>                            </f:facet>
>                            <h:outputText value="#{detail.updatedDt}"
>converter="#{converterBean.dateConvt}"/>
>                        </t:column>
>                        <t:column style="vertical-align:top;"
>                                  headerstyleClass="columnHeader" >
>                            <f:facet name="header">
>                                <h:outputText value="Type"/>
>                            </f:facet>
>                            <h:outputText value="#{smtDtlBean.smtTypeMap[
>detail.idMarkTypeCd]}"/>
>                        </t:column>
>                        <t:column style="vertical-align:top;"
>                                  headerstyleClass="columnHeader" >
>                            <f:facet name="header">
>                                <h:outputText value="Location"/>
>                            </f:facet>
>                            <h:outputText value="#{smtDtlBean.smtLocationMap
>[detail.locationCd]}"/>
>                        </t:column>
>                        <t:column style="vertical-align:top;"
>                                  headerstyleClass="columnHeader" >
>                            <f:facet name="header">
>                                <h:outputText value="Description"/>
>                            </f:facet>
>                            <h:outputText value="#{detail.description}"/>
>                        </t:column>
>                        <t:column style="vertical-align:top;"
>                                  headerstyleClass="columnHeader" >
>                            <f:facet name="header">
>                                <h:outputText value="Officer Name"/>
>                            </f:facet>
>                            <h:outputText value="Officer"/>
>                        </t:column>
>                        <t:column style="vertical-align:top;"
>                                  headerstyleClass="columnHeader" >
>                            <f:facet name="header">
>                                <h:outputText value="Branch Code"/>
>                            </f:facet>
>                            <h:outputText value="132"/>
>                        </t:column>
>                        <t:column style="vertical-align:top;"
>                                  headerstyleClass="columnHeader">
>                            <f:facet name="header">
>                                <h:outputText value="Action"/>
>                            </f:facet>
>                            <t:commandLink style="text-align:right;"
>value="Log" actionListener="#{smtViewHistoryBean.logDetail}"/>
>                            <f:verbatim>&amp;nbsp;&amp;nbsp;</f:verbatim>
>                            <t:commandLink style="text-align:right;"
>value="Modify" actionListener="#{smtViewHistoryBean.modifyDetail}"
>rendered="#{isActive[detail.updatedDt]}"/>
>                        </t:column>
></t:dataTable>
>
>
>
>On 3/9/06, Dennis Byrne <[EMAIL PROTECTED]> wrote:
>>
>> Have you done this?  Be honest Mr. Smith ;)
>>
>> Dennis Byrne
>>
>> >-----Original Message-----
>> >From: Grant Smith [mailto:[EMAIL PROTECTED]
>> >Sent: Thursday, March 9, 2006 03:00 AM
>> >To: 'MyFaces Discussion'
>> >Subject: Re: How to pass argument in a JSF action
>> >
>> >This is true, however, you can access Map entries via index, which is
>> almost
>> >a poor man's function.. of sorts :)
>> >
>> >#{someBean.someMap[index]}
>> >
>> >is allowed.
>> >
>> >should work perfectly.
>> >
>> >On 3/8/06, Dennis Byrne <[EMAIL PROTECTED]> wrote:
>> >>
>> >> Again, actions cannot take arguments.
>> >>
>> >> Dennis Byrne
>> >>
>> >> >-----Original Message-----
>> >> >From: Anthony Hong [mailto:[EMAIL PROTECTED]
>> >> >Sent: Thursday, March 9, 2006 02:05 AM
>> >> >To: 'MyFaces Discussion'
>> >> >Subject: Re: How to pass argument in a JSF action
>> >> >
>> >> >I saw  tomahawk example sort table
>> >> ><t:commandSortHeader columnName="color" arrow="true">
>> >> >                    <h:outputText
>> >> >value="#{example_messages['sort_carcolor']}" />
>> >> >                </t:commandSortHeader>
>> >> >
>> >> >It has a backend method, sort(String columnname), is this a action
>> >> >method or delegate method?
>> >> >
>> >> >
>> >> >On 3/9/06, Dennis Byrne <[EMAIL PROTECTED]> wrote:
>> >> >> Actions cannot take arguments.  Try creating a property called
>> "argu"
>> >> on the backing bean.  Inside your commandLink, you can then do this
>> >> >>
>> >> >> <t:updateActionListener property="#{DebtorController.argu}"
>> value="foo"
>> >> />
>> >> >>
>> >> >> This says "assign 'foo' to the argu property just before the action
>> is
>> >> called.  In the action, you will have access to the argu String
>> internally.
>> >> >>
>> >> >> Dennis Byrne
>> >> >>
>> >> >> >-----Original Message-----
>> >> >> >From: Anthony Hong [mailto:[EMAIL PROTECTED]
>> >> >> >Sent: Wednesday, March 8, 2006 10:04 PM
>> >> >> >To: 'MyFaces Discussion'
>> >> >> >Subject: How to pass argument in a JSF action
>> >> >> >
>> >> >> >I want to have following function
>> >> >> >In page a have command button
>> >> >> ><h:commandButton id="btCreate" value="#{tagVar.CREATE}"
>> >> >> >action="#{DebtorController.createDebtor}"/>
>> >> >> >Can I pass some argument to this backing bean functon?
>> >> >> >
>> >> >> >Say the orignial is
>> >> >> >public string createDebtor()
>> >> >> >
>> >> >> >I want it to be
>> >> >> >public string createDebtor(String argu)
>> >> >> >
>> >> >> >Can it be?
>> >> >> >
>> >> >> >
>> >> >> >--
>> >> >> >
>> >> >> >Anthony Hong
>> >> >> >
>> >> >>
>> >> >>
>> >> >>
>> >> >
>> >> >
>> >> >--
>> >> >
>> >> >Anthony Hong
>> >> >
>> >>
>> >>
>> >>
>> >
>> >
>> >--
>> >Grant Smith
>> >
>>
>>
>>
>
>
>--
>Grant Smith
>


Reply via email to