Topic
4 replies Latest Post - ‏2012-11-15T15:02:03Z by Codeoline
Codeoline
Codeoline
141 Posts
ACCEPTED ANSWER

Pinned topic Clear Fields

‏2012-11-14T20:58:05Z |
I am using this portlet to allow its users to search for specific requests. I am not adding, updating or deleting requests just viewing them. The data being collected into the table i am accessing is from 2 different depts. Most of the columns are the same for both departments yet each dept has a couple of columns that are department specific. My problem is:
If a user were to select the Tooling dept and do a search in a tooling specific field then switch to the Maintenance dept with out hitting the clear button the information that was used for the tooling search will remain in the tooling specific fields it will just he hidden. What i need to do when the SELECT dds changes from Tooling to Maintenance and vice versa is clear all of the fields. Is there a way to do this?
Thank You
Updated on 2012-11-15T15:02:03Z at 2012-11-15T15:02:03Z by Codeoline
  • mburati
    mburati
    2538 Posts
    ACCEPTED ANSWER

    Re: Clear Fields

    ‏2012-11-14T21:28:59Z  in response to Codeoline
    I only had a min or so to look at your sample, but it appears that you're using inline JS in the base page to handle showing/hiding those fields (eg, as opposed to an HTML Event builder). Since you're already getting those input fields to hide them via hand coded JS you should be able to just as easily clear those elements' values in that same JS block as you set the style to display:none.

    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.
    • Codeoline
      Codeoline
      141 Posts
      ACCEPTED ANSWER

      Re: Clear Fields

      ‏2012-11-15T13:10:59Z  in response to mburati
      If there is a better way to handle the showing and hiding of the cells other than hand coding it, i would love to learn about it. Is there an example i could look at.
      • mburati
        mburati
        2538 Posts
        ACCEPTED ANSWER

        Re: Clear Fields

        ‏2012-11-15T14:52:45Z  in response to Codeoline
        The first thing that comes to mind for that question is the client side visibility setter, but when I searched for a sample in this forum, I came across the thread we discussed a few months ago and it sounds like you were having some problems using that builder for your particular use case: https://www.ibm.com/developerworks/forums/thread.jspa?messageID=14849496

        In general, if a builder provides a solution for your use case, it's better to use it and leverage it's automation than to have to hand code a similar solution. In this case though, since you already have the JS hand coded for this use case and it's working for you, and you need to add additional logic when the visibility changes, adding that to your existing JS that you currently understand and have working better than your trial uses of the visibility setter, may get you where you want to go more quickly.

        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.
        • Codeoline
          Codeoline
          141 Posts
          ACCEPTED ANSWER

          Re: Clear Fields

          ‏2012-11-15T15:02:03Z  in response to mburati
          I still have not figured out the thread you mentioned. There is something weird about showing and hiding the dojo date time pickers. Anyway I have this one working great right now and am clearing values, validating dates and have required fields thanks to you and dinger so I'm gonna take your advice and stick with what i understand for right now.
          Thank you very much