Package nextapp.echo2.webrender

Examples of nextapp.echo2.webrender.UserInstance


        groupEditor = new GroupEditor();
        cbbMainGroup = new GroupCombo();
        companyEditor = new CompanyEditor();

        btnAddGroup = new JbsButton("+");
        btnAddGroup.addActionListener(new ActionListener() {

            private static final long serialVersionUID = 1L;

            public void actionPerformed(ActionEvent arg0) {
                FmJbsBaseObjectList fmSelectGroup = new FmJbsBaseObjectList(JbsL10N.getString("JbsUserGroup.selectGroup"));
                PnUserGroupList pnUserGroupList = new PnUserGroupList();
                pnUserGroupList.setToolPaneVisible(ClientGlobals.getUser().isRoot());
                fmSelectGroup.setPnList(pnUserGroupList);
                fmSelectGroup.showForm();
                fmSelectGroup.addActionListener(new ActionListener() {

                    private static final long serialVersionUID = 1L;

                    public void actionPerformed(ActionEvent arg0) {
                        System.out.println(arg0.getActionCommand());
View Full Code Here


        this.txEmail = new JbsTextField();
        this.txWebsite = new JbsTextField();

        this.usCompanyLogo = new JbsUploadSelect();
        try {
            this.usCompanyLogo.addUploadListener(new UploadListener() {

                public void fileUpload(UploadEvent e) {
                    uploadImage(e);
                }
View Full Code Here

        this.addControl(groupName, groupName, control);
    }

    public void addSeparator(String groupName) {
        Row row = new Row();
        ColumnLayoutData layout = new ColumnLayoutData();
        layout.setHeight(new JbsExtent(15, JbsExtent.PX));
        row.setLayoutData(layout);
        this.addControl(groupName, row);
    }
View Full Code Here

        colMain.add(label);
    }
   
    public void addBlankLine() {
        Row row = new Row();
        ColumnLayoutData layout = new ColumnLayoutData();
        layout.setHeight(new JbsExtent(15,JbsExtent.PX));
        row.setLayoutData(layout);
        colMain.add(row);
    }
View Full Code Here

                    break;
                default :
                    align = Alignment.LEFT;
            }
           
            TableLayoutData layoutData = (TableLayoutData)((Label)component).getLayoutData();
            layoutData.setAlignment(new Alignment(align, Alignment.CENTER));
            ((Label)component).setLayoutData(layoutData);
        }
        return component;
    }
View Full Code Here

        //If nor group is found then create a new one:
        if (newColumn == null) {
            newColumn = new Column();
            newColumn.setId(groupName);
            newColumn.setStyleName("Default");
            AccordionPaneLayoutData layoutData = new AccordionPaneLayoutData();
            layoutData.setTitle(groupTitle);
            newColumn.setLayoutData(layoutData);
            this.add(newColumn);
        }
        return newColumn;
    }
View Full Code Here

     * @param conn the relevant <code>Connection</code>
     * @param clientMessageDocument the ClientMessage XML document to process
     * @see ClientMessagePartProcessor
     */
    protected void processClientMessage(Connection conn, Document clientMessageDocument) {
        UserInstance userInstance = conn.getUserInstance();
        Element[] messageParts = DomUtil.getChildElementsByTagName(clientMessageDocument.getDocumentElement(),
                "message-part");
        for (int i = 0; i < messageParts.length; ++i) {
            ClientMessagePartProcessor processor =
                    (ClientMessagePartProcessor) clientMessagePartProcessorMap.get(messageParts[i].getAttribute("processor"));
View Full Code Here

    /**
     * @see nextapp.echo2.webrender.Service#service(nextapp.echo2.webrender.Connection)
     */
    public void service(Connection conn)
    throws IOException {
        UserInstance userInstance = conn.getUserInstance();
        synchronized(userInstance) {
            Document clientMessageDocument = parseRequestDocument(conn);
            String messageType = clientMessageDocument.getDocumentElement().getAttribute("type");
            ServerMessage serverMessage;
           
            if ("initialize".equals(messageType)) {
                serverMessage = renderInit(conn, clientMessageDocument);
                ClientPropertiesStore.renderStoreDirective(serverMessage, userInstance.getClientProperties());
                ClientConfigurationUpdate.renderUpdateDirective(serverMessage, userInstance.getClientConfiguration());
                ServerDelayMessageUpdate.renderUpdateDirective(serverMessage, userInstance.getServerDelayMessage());
               
                // Add "test attribute" used by ClientEngine to determine if browser is correctly (un)escaping
                // attribute values.  Safari does not do this correctly and a workaround is thus employed if such
                // bugs are detected.
                serverMessage.getDocument().getDocumentElement().setAttribute("xml-attr-test", "x&y");
            } else {
                serverMessage = renderUpdate(conn, clientMessageDocument);
                processUserInstanceUpdates(userInstance, serverMessage);
            }
            serverMessage.setTransactionId(userInstance.getNextTransactionId());
            conn.setContentType(ContentType.TEXT_XML);
            serverMessage.render(conn.getWriter());
        }
    }
View Full Code Here

        try {
            String fileName = "session.data";
            FileInputStream fis = new FileInputStream(fileName);
            ObjectInputStream ois = new ObjectInputStream(fis);
            String sessionKey = (String) ois.readObject();
            UserInstance userInstance = (UserInstance) ois.readObject();
            getSession().setAttribute(sessionKey, userInstance);
            ois.close();
            fis.close();
            showDialog(false, sessionKey + " loaded successfully.");
        } catch (ClassNotFoundException ex) {
View Full Code Here

        }
    }

    private void doStore() {
        String sessionKey = (String) listBox.getSelectedValue();
        UserInstance userInstance = (UserInstance) getSession().getAttribute(sessionKey);
        if (userInstance == null) {
            showDialog(true, "No instance selected.");
            return;
        }
        try {
View Full Code Here

TOP

Related Classes of nextapp.echo2.webrender.UserInstance

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.