0

我正在尝试从对话框中调用 bean 操作。这是html对话框。

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
      xmlns:f="http://java.sun.com/jsf/core"      
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      template = "/pages/templates/template.xhtml">

    <ui:define name="extrascripts">
        <h:outputStylesheet library="css" name="colorbox.css"  />
        <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
        <h:outputScript library="js" name="jquery.colorbox.js" />
        <script>
            $(document).ready(function()
            {   
                $(".ajax").colorbox({inline:true}); 
                                $("#click").click(function(){ 
                    $('#click').css({"background-color":"#f00", "color":"#fff", "cursor":"inherit"}).text("Open this window again and this message will still be here.");
                    return false;
                });
            });
        </script>
    </ui:define>

    <ui:define name="content">
    <h:body>
    <h3>User ISheets</h3>

    <h:form>   
       <p><a class='ajax' href="#createsheet">Create New Sheet</a></p>
       <div style='display:none'>
            <div id='createsheet' style='padding:10px; background:#fff;'>
                <p><strong>Create New Sheet</strong></p>
                <h:panelGrid columns="3">
                    <h:outputText value="Name " />
                    <h:inputText value="#{usersSheetsBean.sheetname}" required="true" ></h:inputText>
                    <h:commandButton action="#{usersSheetsBean.createSheet}" value="Submit" update="msgs"/>
               </h:panelGrid>
            </div>
        </div>
    </h:form>

    <table>
        <ui:repeat var="s" value="#{usersSheetsBean.sheets}">
            <tr>
                <td>
                    <h:link value="#{s.name}" outcome="exploresheet">
                        <f:param name="s_id" value="#{s.id}"/>
                    </h:link>
                </td>
            </tr>
        </ui:repeat>
    </table>

    </h:body>
    </ui:define>

</ui:composition>

盒子被打开。但是当我点击提交时没有任何反应。

4

0 回答 0