Let me Explain what exactly is happening in my application . This is a Gate pass Form Application
Where I have a Visitor Gate pass Form & a Material gate pass Form .(MGPF)
Our topic of concern is about the MGPF . This MGPF is a master detail form
the master region consists of various child regions such as the following
-Material Gate Pass Form
-Agent Details
-Reference Information
-Official Information
in this Material Gate Pass Form(child region) is the first region where the first Item is
Gate Pass Type : ( it is a select list Item and the select options are )
1. returnable gate pass
2.Non returnable gate pass
3. Other gate pass
, where in the detail / report region of the entire form is ITEM DETAILS and it consists of items like
Sl No Item Uom Quantity Line Status.
(line status is a SELECT LIST)
Now when I select GATE PASS TYPE -> as Non Returnable Gate Pass ( in master region i.e form )
I want a dynamic action to happen , such that (REPORT ATTRIBUTE i.e report item LINE STATUS should be greyed out !!!
so I have done that by a dynamic action - using jquery statement (.Disable) .
Defining the element attributes as Disable .
dynamic action in details
dynamic action to disable Line status (column ) in the detail region when we select (non returnable ) in the form
DYNAMIC ACTION
TO DISABLE_ITEM_DETAILS
EVENT - change
SELECTION TYPE - items
ITEM- Line Statu
CONDITION -equal to
VALUE- non returnable
TRUE ACTION
Sequence -10
Action -Disable
Fire On Page Load -Yes
Selection Type - jQuery Selector
Affected Elements - .Disable
FALSE ACTION
Sequence -10
Action -Enable
Fire On Page Load -Yes
Selection Type - jQuery Selector
Affected Elements - .Disable
EVENT SCOPE : Dynamic
------------------------------------------------------
REPORT REGION -> EDIT -> REPORT ATTRIBUTES ->COLUMN ATTRIBUTES -> ELEMENT ATTRIBUTES -> class="Disable"
these are what i have done !
.
So when I click or select the Non returnable gate pass the column Line status in the report region becomes greyed out .
the problem faced is that . as i start entering text into the form . First I will select the TYPE as Non returnable gate pass
Then fill in the remaining details and then finally come in to the report region . Initally there will not be any row created in the table in the report region .
Delete Row ADD ROW
when I click the ADD ROW .
a row is inserted but HERE COMES THE PROB !! LINE STATUS REMAINS OPEN / accessible TO SELECT OPTION instead of being a greyed field .
But when i go back to the GATE PASS TYPE n change the option as returnable and then select non returnable option .. this LINE STATUS becomes greyed out .
This procedure has to repeat every time I create a new row in the same page , I will have to go to the TYPE n toggle between the options in the select list and select the Non returnable option after adding a new row ,so that Line status becomes greyed out !!
. Please help me solve this !
FEW SUGGESTIONS SUCH AS THE FOLLOWING WHERE GIVEN .i TRIED BUT DID NOT WORK
1. find out name of tabular form column by using debug or pressing F12
its like input[name="f01"]
and use these value as a jQuery selector
Means
Affected Elements = input[name="f0X"] (here X is name of tabular form column)
like in your action
try this
2. try following one
Action: Execute javascript Code
code : $('input[name="f09"]').attr('disabled', 'disabled');
TRIED THE ABOVE 2 OPTION BUT DID NOT GIVE A POSITIVE RESULT .