Home Forums Presentation Screens Ruby version parameter in the sysContext newValue = ":null"

Viewing 2 reply threads
  • Author
    Posts
    • #9029
      Rafael ReisRafael Reis
      Participant

      I have a portlet that has a context variable, I add the sysContext event in the portlet, I notice that the parameter  variable is coming like this:
      (#t . #<{AttributeInContext={“newValue”=”:null”, “oldValue”=()}}>)

      I am just trying to understand why in Ruby it’s putting “:null” instead of (), and if this will be always the case for context variables.

       

      Rafael

      0
    • #9042
      Patrick TsangPatrick Tsang
      Participant

      Hi Rafael,

      The Portal Container uses “:null” as an explicit placeholder for null values in certain cases when marshalling values in transfer objects and other hashtables in preparation for conversion to other formats.  The NexJ portlet context adapter would convert this to null value on unmarshall as can be seen if you observe the parameter value in a sysContext UIEvent handler.

      As far as we are aware, this behaviour has existed for quite some time.  When you mention Ruby, are you observing other behaviour in another version?

      Regards,

      Patrick

      0
    • #9051
      Rafael ReisRafael Reis
      Participant

      Hi Patrick,

      Yea I just notice that behavior in Ruby, because before (opal) we were doing a “null?” check and it was working, now in ruby that fails, because the value is “:null” instead of “‘()” so that is why I was wondering. Thank you for the explanation.

      Rafael

      0
Viewing 2 reply threads
  • You must be logged in to reply to this topic.