2 Replies Latest reply: May 23, 2012 9:35 AM by pradeep challa RSS

    To set Insert Allowed property dynamically

    pradeep challa
      I am trying to set the Insert allowed to true on child region: submarkets based on if blocked flag on parent region:market is set to ‘Y’ i.e Blocked flag on the parent is checked.

      Here is the isert allowed property that used on the child region:
      #{jhsUserRoles['ADMIN, BR'] && bindings.BlockingRuleBlockingRuleStatus.inputValue =='In Process' && bindings.BlockingRuleMarketBlockedFlag.inputValue =='Y'}
      But it is behaving reversely. When the blocked flag is not checked (I can see the corresponding View attribute has a value 'N'), I could see the plus symbol on the SubMarket region. When blocked flag of Market is checked ((I can see the corresponding View attribute has a value 'Y'), then I could not see the plus symbol on the Submarket. This is happening wheather I use BlockingRuleMarketBlockedFlag.inputValue =='Y' or BlockingRuleMarketBlockedFlag.inputValue =='N'. Can anyone suggest?

      Thanks, Pradeep
        • 1. Re: To set Insert Allowed property dynamically
          Steven Davelaar-Oracle
          Pradeep,

          Can you create a dummy output text on your page with this expression to see how it evaluates?

          Also, create dummy output text for the expression parts: #{bindings.BlockingRuleBlockingRuleStatus.inputValue} and #{bindings.BlockingRuleMarketBlockedFlag.inputValue}.

          Note that you might have to use .attributeValue instead of .inputValue if your are using a list binding with these attributes.

          Steven Davelaar,
          JHeadstart team.
          • 2. Re: To set Insert Allowed property dynamically
            pradeep challa
            Steve,

            Using of #{bindings.BlockingRuleMarketBlockedFlag.attributeValue} solves the problem instead of #{bindings.BlockingRuleMarketBlockedFlag.inputValue}

            The dummy output item #{bindings.BlockingRuleMarketBlockedFlag.attributeValue} shows as Y/N depending on the current row BlcokedFlag is checked or not. where as #{bindings.BlockingRuleMarketBlockedFlag.inputValue} shows as true/false. So the expression #{bindings.BlockingRuleMarketContainChilds.attributeValue == 'Y'} returning the correct results where as the expression #{bindings.BlockingRuleMarketContainChilds.inputValue == 'Y'} always returning true.(I am surprised that it is not returning false)

            Thanks, Pradeep