This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal



Jun 17, 2012, 9:58 AM
68 Posts

After check disabling / making invisible repeat sequence.

  • Category: Dojo and Client Side JavaScript
  • Platform: All
  • Release: 8.5.3
  • Role: Developer,Administrator
  • Tags:
  • Replies: 3
Hi all.
 
I'm trying to make something like in example:
 
 
 
I have problem cause I don't know hot to get in Client Side ID's of controls of (like in example) repeat no3. I want make simply script. After pressing for example Checbox no 3 in repeat 1 all checkbox in repeat 3 will get disasble = true, or siple invisible = hidden. 
Jun 17, 2012, 10:58 AM
586 Posts
Re: After check disabling / making invisible repeat sequence.
 I'm not a big client side person, but if you put the repeat inside a panel, you can use SSJS to control the rendering based on a session scope variable.  I've done this for my nested repeats in this example:
Jun 17, 2012, 11:52 AM
68 Posts
Re: After check disabling / making invisible repeat sequence.
I need to do this in Client Side cause I have something like maximum checkbox checks and when i update page this don't work :)
Jun 18, 2012, 8:44 AM
126 Posts
Re: After check disabling / making invisible repeat sequence.
This is in no way an ideal solution but should unblock you, will also depend a little on your use case. I took the code you posted the last time to test this so i'm assuming your still using a repeat inside a repeat. 
 
what you could do is get the client id of the top level repeat add a number to the string and the id you have given the second repeat. Because a repeat row's id will be:
 
     the repeatID + ":" + the index
 
so each row will be something like:
 
    view_1:panel1_ ... repeat1:0
    view_1:panel1_ ... repeat1:1
    view_1:panel1_ ... repeat1:2
 
and so on... 
 
so you have a repeat inside this called repeat 2  so    
 
view_1:panel1_ ... repeat1:2:repeat2    will get you the third row
view_1:panel1_ ... repeat1:0:repeat2    will get you the first row   and so on....
 
 
so something like this will work but it assumes you know which row you need to hide:
 
                    var repeat1ID = "#{id:repeat1}";
                    repeat1ID += ":2:repeat2";
                    
                    var repeatRow = dojo.byId(repeat1ID);
                    repeatRow.style.display = 'none'; 

This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal