src/main/java/org/efaps/ui/wicket/EFapsSession.java
public void openContext()
    {
        if (isLogedIn()) {
            try {
                if (!Context.isTMActive()) {
                    final ServletWebRequest request = (ServletWebRequest) RequestCycle.get().getRequest();
                    if (request instanceof EFapsRequest || request instanceof EFapsMultipartRequest) {
                        final Map<String, String[]> parameters = new HashMap<>();
                        final IRequestParameters reqPara = request.getRequestParameters();
                        for (final String name : reqPara.getParameterNames()) {
                            final List<StringValue> values = reqPara.getParameterValues(name);
                            final String[] valArray;
                            if (values == null) {
                                valArray = ArrayUtils.EMPTY_STRING_ARRAY;
                            } else {
                                valArray = new String[values.size()];
                                int i = 0;
                                for (final StringValue value : values) {
                                    valArray[i] = value.toString();
                                    i++;
                                }
                            }
                            parameters.put(name, valArray);
                        }

                        Context.begin(this.userName, super.getLocale(), this.sessionAttributes, parameters, null,
                                        Context.Inheritance.Inheritable);
                        // set the locale in the context and in the session
                        setLocale(Context.getThreadContext().getLocale());
                        setAttribute(UserAttributesSet.CONTEXTMAPKEY, Context.getThreadContext().getUserAttributes());
                        Context.getThreadContext().setPath(request.getContextPath());
                    }
                }
            } catch (final EFapsException e) {
                EFapsSession.LOG.error("could not initialise the context", e);
                throw new RestartResponseException(new ErrorPage(e));
            }
        }
    }
public void openContext()
    {
        if (isLogedIn()) {
            try {
                if (!Context.isTMActive()) {
                    final ServletWebRequest request = (ServletWebRequest) RequestCycle.get().getRequest();
                    if (request instanceof EFapsRequest || request instanceof EFapsMultipartRequest) {
                        final Map<String, String[]> parameters = new HashMap<>();
                        final IRequestParameters reqPara = request.getRequestParameters();
                        for (final String name : reqPara.getParameterNames()) {
                            final List<StringValue> values = reqPara.getParameterValues(name);
                            final String[] valArray;
                            if (values == null) {
                                valArray = ArrayUtils.EMPTY_STRING_ARRAY;
                            } else {
                                valArray = new String[values.size()];
                                int i = 0;
                                for (final StringValue value : values) {
                                    valArray[i] = value.toString();
                                    i++;
                                }
                            }
                            parameters.put(name, valArray);
                        }

                        Context.begin(this.userName, super.getLocale(), this.sessionAttributes, parameters, null,
                                        Context.Inheritance.Inheritable);
                        // set the locale in the context and in the session
                        setLocale(Context.getThreadContext().getLocale());
                        setAttribute(UserAttributesSet.CONTEXTMAPKEY, Context.getThreadContext().getUserAttributes());
                        Context.getThreadContext().setPath(request.getContextPath());
                    }
                }
            } catch (final EFapsException e) {
                EFapsSession.LOG.error("could not initialise the context", e);
                throw new RestartResponseException(new ErrorPage(e));
            }
        }
    }
public void openContext ( ) { if ( isLogedIn ( ) ) { try { if ( ! Context . isTMActive ( ) ) { final ServletWebRequest request = ( ServletWebRequest ) RequestCycle . get ( ) . getRequest ( ) ; if ( request instanceof EFapsRequest || request instanceof EFapsMultipartRequest ) { final Map < String , String [ ] > parameters = new HashMap <> ( ) ; final IRequestParameters reqPara = request . getRequestParameters ( ) ; for ( final String name : reqPara . getParameterNames ( ) ) { final List < StringValue > values = reqPara . getParameterValues ( name ) ; final String [ ] valArray ; if ( values == null ) { valArray = ArrayUtils . EMPTY_STRING_ARRAY ; } else { valArray = new String [ values . size ( ) ] ; int i = 0 ; for ( final StringValue value : values ) { valArray [ i ] = value . toString ( ) ; i ++ ; } } parameters . put ( name , valArray ) ; } Context . begin ( this . userName , super . getLocale ( ) , this . sessionAttributes , parameters , null , Context . Inheritance . Inheritable ) ; // set the locale in the context and in the session setLocale ( Context . getThreadContext ( ) . getLocale ( ) ) ; setAttribute ( UserAttributesSet . CONTEXTMAPKEY , Context . getThreadContext ( ) . getUserAttributes ( ) ) ; Context . getThreadContext ( ) . setPath ( request . getContextPath ( ) ) ; } } } catch ( final EFapsException e ) { EFapsSession . LOG . error ( "could not initialise the context" , e ) ; throw new RestartResponseException ( new ErrorPage ( e ) ) ; } } }
Method that opens a new Context in eFaps, setting the User, the Locale,
the Attributes of this Session {@link #sessionAttributes} and the
RequestParameters for the Context.

@see #attach()
Method that opens a new Context in eFaps setting the User the Locale the Attributes of this Session { @link #sessionAttributes } and the RequestParameters for the Context .