Re: AjaxModalDialogOpener in a WORepitition

From: Ramon Havermans (ramon.centri..mail.com)
Date: Wed Feb 25 2009 - 10:13:22 EST

  • Next message: Ramon Havermans: "Re: AjaxModalDialogOpener in a WORepitition"

    Hi,

    I use this as well but the other way around (Otherwise there is no use
    for the AjaxModalDialogOpener)! Be sure to get the latest wonder,
    because there were bugs in the past:

    Here is a snippet (you have to edit it to make it work, not all the
    code, but you get the idea I hope)

    First
                                 <wo:WORepetition list = "[allAssets]" item =
    "[assetItem]">
                                    <li>
                                        <wo:AjaxModalDialogOpener
    dialogId="video_modal_box" label="[assetItem.name]" action =
    "[selectAsset]" title = "[assetItem.name]"/>
                                    </li>
                                </wo:WORepetition>

    Then outside the repetition:
         <wo:AjaxModalDialog id="video_modal_box" showOpener= "false"
    action="[openPlayer]" width="660" height="440"/>

    Be sure dialogId on wo:AjaxModalDialogOpener is pointing to the id of
    AjaxModalDialog

    Ramon

    On Feb 25, 2009, at 3:32 PM, amiel montecillo wrote:

    > Thanks for the idea Paul. But correct me if I'm wrong, with this
    > code, for each item there is a corresponding modal dialog correct? I
    > only wanted to have one modal dialog but update its contents with
    > the selected item's attribute values since I don't want to flush
    > large amount of data to the client.
    >
    > I guess the way to go for me is to use AjaxModalContainer.
    >
    > Amiel
    >
    > On Wed, Feb 25, 2009 at 8:03 PM, Paul D Yu <py..e.com> wrote:
    > Amiel
    >
    > I am using AjaxModalDialogOpener in a Repetition. Here's what I
    > have to make it work.
    >
    > html
    > <wo:WORepetition list="$list" item="$item">
    > <wo:AjaxModalDialogOpener label = "Recommend..." dialogId =
    > "$amdDialogIDForItem" />
    > </wo:WORepetition>
    >
    > you also will need the AjaxModalDiaglog defined. The link is the
    > dialogId...
    > <wo:WORepetition list="$list" item="$Item">
    > <wo:AjaxModalDialog showOpener = "$false" id = "$amdDialogIDForItem"
    > title = "Title" closeUpdateContainerID = "detailPageContainer">
    > <wo:MyModalDialog parameter = "$myParameter" />
    > </wo:AjaxModalDialog>
    > </wo:WORepetition>
    >
    > in the Java file(s)
    >
    > public String amdDialogIDForItem() {
    > return myItem.hashCode() + "resource";
    > }
    >
    > Because I have the repetition in a child component, I had to have
    > the java method in both the parent and child class file.
    >
    > Hope this helps.
    >
    > Paul
    >
    > On Feb 25, 2009, at 3:06 AM, amiel montecillo wrote:
    >
    >> Hello,
    >>
    >> My problem is that I have a WORepitition of EmailEO, an
    >> AjaxModalDialogOpener is set to one of its attributes to view the
    >> full message body to be contained in an AjaxModalDialog. However,
    >> in order to show the email body, I need a reference to the selected
    >> EmailEO on the list.
    >>
    >> Looking at the javadoc of AjaxModalDialogOpener, there is no action
    >> binding that I can use to set a member instance on my java class.
    >>
    >> I was wondering if anyone has used an AjaxModelDialogOpener inside
    >> a WORepitition? The ajax example in a repetition from wonder seems
    >> to be broken in my build.
    >>
    >> Amiel
    >>
    >> --
    >> socket error: unable to connect to 127.0.0.1
    >
    >
    >
    >
    > --
    > socket error: unable to connect to 127.0.0.1



    This archive was generated by hypermail 2.0.0 : Wed Feb 25 2009 - 10:14:32 EST