How to read client side parameters (e.g. cookie or object in session storage) from Microflow

1
I want to read some values from client side (browser) like cookies, objects in session storage. But I can not call nanoflow from microflow and javascript action can be called only from nanoflow. What approach will you suggest ?
asked
1 answers
-1

Try the following in a Java Action

    public ja_getHeader(IContext context, java.lang.String str_hdrK)
    {
        super(context);
        this.str_hdrK = str_hdrK;
    }

    @Override
    public java.lang.String executeAction() throws Exception
    {
        // BEGIN USER CODE
        com.mendix.systemwideinterfaces.core.IContext ctx=getContext();
        java.util.Optional<com.mendix.m2ee.api.IMxRuntimeRequest> orrq=ctx.getRuntimeRequest();
        com.mendix.m2ee.api.IMxRuntimeRequest rrq=orrq.orElse(null);
        if(rrq!=null){
            java.lang.String str_hdrV=rrq.getHeader(str_hdrK);
            return str_hdrV;
        }else{
            return null;
        }
        // END USER CODE
    }


You can also build a list of KV rows and return that for processing in your MF

answered