1 Reply Latest reply on Apr 29, 2008 3:19 PM by sadhasivam jayabalaganesan

    Modal Panel issue

    sugi s Newbie

      I just tried the following snippet , when i hit submit , i'm getting script error.
      Can anyone help me out to access value from modal panel?

      <%@ page language="java" contentType="text/html;charset=UTF-8"%>
      <%@ taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
      <%@ taglib prefix="h" uri="http://java.sun.com/jsf/html"%>
      <%@ taglib uri="http://richfaces.org/a4j" prefix="a4j"%>
      <%@ taglib uri="http://richfaces.org/rich" prefix="rich"%>





      <f:view>
      <a4j:commandButton value="Invite New User"
      onclick="javascript:Richfaces.showModalPanel('showInviteUser',{width:250,height:300,top:200,left:200})" immediate="true">
      </a4j:commandButton>

      <rich:modalPanel id="showInviteUser">

      <h:inputText id="inviteUserFirstName" maxlength="250" size="10" value="#{userInfo.userBean.userInviteFirstName}"/>
      <h:inputText id="inviteUserLastName" maxlength="250" size="10"/>
      <a4j:commandButton id="inviteBtn" action="#{userInfo.inviteUser}" value="invite" immediate="true">
      </a4j:commandButton>

      </rich:modalPanel>
      </f:view>

        • 1. Re: Modal Panel issue
          sadhasivam jayabalaganesan Newbie

          if ur using richfaces 3.2

          try this

          <%@ page language="java" contentType="text/html;charset=UTF-8"%>
          <%@ taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
          <%@ taglib prefix="h" uri="http://java.sun.com/jsf/html"%>
          <%@ taglib uri="http://richfaces.org/a4j" prefix="a4j"%>
          <%@ taglib uri="http://richfaces.org/rich" prefix="rich"%>





          <f:view>

          <!-- you don't need a server side component just for javascript window -->
          <input type ="button" onclick="javascript:Richfaces.showModalPanel('showInviteUser',{width:250,height:300,top:200,left:200})" immediate="true">



          <rich:modalPanel id="showInviteUser">
          <h:inputText id="inviteUserFirstName" maxlength="250" size="10" value="#{userInfo.userBean.userInviteFirstName}"/>
          <h:inputText id="inviteUserLastName" maxlength="250" size="10"/>
          <a4j:commandButton id="inviteBtn" action="#{userInfo.inviteUser}" value="invite" immediate="true">
          </a4j:commandButton>

          </rich:modalPanel>
          </f:view>