Topic
  • 6 replies
  • Latest Post - ‏2013-03-01T16:03:18Z by mburati
SystemAdmin
SystemAdmin
9029 Posts

Pinned topic Creating the Popup page for a selected row data in the Datapage

‏2013-02-27T12:47:38Z |
Hi,

I have a datapage with details like EmpId,EmpName,EmpAge.In each row of this data page i will have one radio button.

I will have one button like ChangeEmpName.

Now my requirement is Once i select one row using the radio button, then click on the button ChangeEmpName , i need to get the popup page, with a text box to change that selected EmpName.

Please suggest me how to implement it.

Thanks in Advance.
Anil
Updated on 2013-03-01T16:03:18Z at 2013-03-01T16:03:18Z by mburati
  • mburati
    mburati
    2568 Posts

    Re: Creating the Popup page for a selected row data in the Datapage

    ‏2013-02-27T16:15:41Z  
    The easiest and most straightforward way to do something like this (and most typical use case patterns with WEF) is to use the highest level (of automation) builder available to generate as much of the use case for you, so you won't have to rebuild with lower level builders (like Data Page) what the higher level builders already automate (including flow between list, details, edit etc).

    Check out the following forum thread for a description of how to alter the out of the box Orders sample to use a Dojo Form Dialog for editing a record:
    http://www.ibm.com/developerworks/forums/thread.jspa?messageID=14794057

    For using Dojo Form Dialog for popups, I recommend being on 8.0.0.1 (or 8.0.0.2) or at least 7.0.1.4 if you're on the 7.0.1.x release, due to some improvements made in those fixpacks.

    I hope that info helps,
    ..Mike Burati
    http://www-10.lotus.com/ldd/pfwiki.nsf/
    The postings on this site are my own and do not necessarily represent the positions, strategies, or opinions of IBM.
  • SystemAdmin
    SystemAdmin
    9029 Posts

    Re: Creating the Popup page for a selected row data in the Datapage

    ‏2013-02-28T12:31:38Z  
    • mburati
    • ‏2013-02-27T16:15:41Z
    The easiest and most straightforward way to do something like this (and most typical use case patterns with WEF) is to use the highest level (of automation) builder available to generate as much of the use case for you, so you won't have to rebuild with lower level builders (like Data Page) what the higher level builders already automate (including flow between list, details, edit etc).

    Check out the following forum thread for a description of how to alter the out of the box Orders sample to use a Dojo Form Dialog for editing a record:
    http://www.ibm.com/developerworks/forums/thread.jspa?messageID=14794057

    For using Dojo Form Dialog for popups, I recommend being on 8.0.0.1 (or 8.0.0.2) or at least 7.0.1.4 if you're on the 7.0.1.x release, due to some improvements made in those fixpacks.

    I hope that info helps,
    ..Mike Burati
    http://www-10.lotus.com/ldd/pfwiki.nsf/
    The postings on this site are my own and do not necessarily represent the positions, strategies, or opinions of IBM.
    Hi mburati,

    Thanks for your suggestion.
    Now i am using the Dojo Form Dialog builder to show the popup. I am able to get textbox also in it.

    But i have major problem.

    I am not able to submit the popup .
    I am getting two buttons like OK , Cancel. For Popup dialog submit we use the OK button.

    I am giving the following the inputs for Submit Action Information Section of this builder.
    ActionType:Submit Form and invoke
    Action: Here mentioning the action to call when we press on Ok button.

    When we click on Cancel , it closes the popup .
    But when we click on OK button nothing is happening. I am not seeing any javascript errors also.

    We are using Portlet Factory Version:7.0.1.

    Can you tell me what could be the problem?Can you suggest me any other solution for displaying popups?

    Thanks,
    Anil
  • SystemAdmin
    SystemAdmin
    9029 Posts

    Re: Creating the Popup page for a selected row data in the Datapage

    ‏2013-02-28T14:53:09Z  
    • mburati
    • ‏2013-02-27T16:15:41Z
    The easiest and most straightforward way to do something like this (and most typical use case patterns with WEF) is to use the highest level (of automation) builder available to generate as much of the use case for you, so you won't have to rebuild with lower level builders (like Data Page) what the higher level builders already automate (including flow between list, details, edit etc).

    Check out the following forum thread for a description of how to alter the out of the box Orders sample to use a Dojo Form Dialog for editing a record:
    http://www.ibm.com/developerworks/forums/thread.jspa?messageID=14794057

    For using Dojo Form Dialog for popups, I recommend being on 8.0.0.1 (or 8.0.0.2) or at least 7.0.1.4 if you're on the 7.0.1.x release, due to some improvements made in those fixpacks.

    I hope that info helps,
    ..Mike Burati
    http://www-10.lotus.com/ldd/pfwiki.nsf/
    The postings on this site are my own and do not necessarily represent the positions, strategies, or opinions of IBM.
    Hi mburati,

    Now am able to submit the dialog screen.
    But am not getting the values entered in the textbox of the popupscreen.
    I am using SubmitFormandInvoke action only.

    But still am not able to get those entered value in textbox.

    Any suggestion for this to achieve?

    Thanks
    Anil
  • mburati
    mburati
    2568 Posts

    Re: Creating the Popup page for a selected row data in the Datapage

    ‏2013-02-28T14:57:26Z  
    Hi mburati,

    Now am able to submit the dialog screen.
    But am not getting the values entered in the textbox of the popupscreen.
    I am using SubmitFormandInvoke action only.

    But still am not able to get those entered value in textbox.

    Any suggestion for this to achieve?

    Thanks
    Anil
    Without knowing how you're doing that, it's hard to guess what's going on.

    If you post a sample (with no confidential info or intellectual property) showing what you're having trouble with, it might make it easier for someone to quickly spot what's wrong with it.

    As mentioned in other threads here (wrt Dojo Form Dialog and non-DFD) the best practice is to use the highest level builders available (eg, View and Form) and not try to build the same with lower level builders (like Text Input). View and Form does the work of getting the inputs to the right place for you, so you don't have to do so yourself.

    I hope that info helps,
    ..Mike Burati
    http://www-10.lotus.com/ldd/pfwiki.nsf/
    The postings on this site are my own and do not necessarily represent the positions, strategies, or opinions of IBM.
  • SystemAdmin
    SystemAdmin
    9029 Posts

    Re: Creating the Popup page for a selected row data in the Datapage

    ‏2013-03-01T05:56:18Z  
    • mburati
    • ‏2013-02-28T14:57:26Z
    Without knowing how you're doing that, it's hard to guess what's going on.

    If you post a sample (with no confidential info or intellectual property) showing what you're having trouble with, it might make it easier for someone to quickly spot what's wrong with it.

    As mentioned in other threads here (wrt Dojo Form Dialog and non-DFD) the best practice is to use the highest level builders available (eg, View and Form) and not try to build the same with lower level builders (like Text Input). View and Form does the work of getting the inputs to the right place for you, so you don't have to do so yourself.

    I hope that info helps,
    ..Mike Burati
    http://www-10.lotus.com/ldd/pfwiki.nsf/
    The postings on this site are my own and do not necessarily represent the positions, strategies, or opinions of IBM.
    Hi,

    I am attaching the sample model with this.

    In the popupscreen, we will get OK button, on click of this button, i am calling one actionlist,in that i am printing the entered value in the textbox of popupscreen.(Inputs/textbox)

    But i am not able to retrieve this entered value.

    Based on the entered value in that text box i need to do further processing.
    Can you see the model and guide me ?

    Thanks
  • mburati
    mburati
    2568 Posts

    Re: Creating the Popup page for a selected row data in the Datapage

    ‏2013-03-01T16:03:18Z  
    Hi,

    I am attaching the sample model with this.

    In the popupscreen, we will get OK button, on click of this button, i am calling one actionlist,in that i am printing the entered value in the textbox of popupscreen.(Inputs/textbox)

    But i am not able to retrieve this entered value.

    Based on the entered value in that text box i need to do further processing.
    Can you see the model and guide me ?

    Thanks
    As the Dojo Form Dialog help states, it was designed to
    " use this builder to present in a dialog box an input form created by the page automation family of builders. "

    Page Automation builders (Data Page and the high level builders built on Data Page, that I suggested in the previous post like View and Form) keep track of form inputs and mapping them to the associated variable for you.

    Dojo Form Dialog leverages that feature of page automation to update the associated state on the server with the input form fields, before calling the action that you specify in the DFD builder to be called after the dialog is closed. The OK button in the DFD is actually in the outer main webapp/portlet page so that it can close the dialog that contains the iframe that has its own form. There are actually two form submits, if you leave the post action behavior as default, one that submits the dialog frame's form to a generated dialog frame action (so that Data Page / page automation can do its auto-field saving) and one in the form in the original outer page, to refresh that page. The action you specify in the DFD builder is the one associated with that second one, so not the form submit that contains your text box.

    The attached sample model requires the ootb WEF "Building Models" sample feature set, for the Orders sample that comes with WEF 7.0.1 and 8.0 (earlier versions of that sample differed slightly), and shows how with a lot less builders, you can automate this pattern of showing a list of rows, a column that says which one to edit, and a popup dialog for the edit form. It uses page automation (View and Form, which in turn uses Data Page) so the form fields are auto-saved on the submit of the form that they're associated with, and are thus available when the outer (original page) form is submitted to run the post-close action for the dialog. I believe this sample was intended for the WEF Wiki in a recent release but missed getting posted with the other samples there, so I'll look into getting it up there along with more information about how DFD is intended to be used (eg, with page automation, not just low level control builders)

    The usual disclaimers apply: with all samples, this is just a sample of how to wire a couple of WEF builders together so that you'll know how to do so for your own applications, and this sample model is not indented to be a tested application for deployment as is or copied into an application as is. See the copyright builder call in the sample for more info. As I personally recommend with all attachments from a public or semi-public forum, please open the model and look at everything it does as opposed to just downloading and running it. Not only will you learn more about what's really going on in the sample, but it's a good habit for everyone to get into so you don't download and run something that has unintended consequences on your system when you're not 100% sure where a sample came from.

    I hope that info helps,
    ..Mike Burati
    http://www-10.lotus.com/ldd/pfwiki.nsf/
    The postings on this site are my own and do not necessarily represent the positions, strategies, or opinions of IBM.