2
Why would an Edit button not change the fields in a Tab Container into Edit Mode? Fields outside the Container change mode as expected, but anything inside the Container remains in Read Mode. Is there a setting I need to change in the Dojo Container?

    <xp:button value="Edit" id="editButton"
    rendered="#{javascript:!doc1.isEditable();}" style="text-align:left">
    <xp:eventHandler event="onclick" submit="true" refreshMode="complete">
    <xp:this.action>
    <xp:changeDocumentMode mode="edit" var="doc1"></xp:changeDocumentMode>
    </xp:this.action>
    </xp:eventHandler>
    </xp:button>

Update as requested by Jeremy

The TabContainer holds the TabPanes which are made of of individual custom controls. When I switch to edit mode using the button above, only the fields outside the Container are editable. (SO required me to add more text to explain the code)

 <?xml version="1.0" encoding="UTF-8"?>
    <xp:view xmlns:xp="http://www.ibm.com/xsp/core"
        xmlns:xc="http://www.ibm.com/xsp/custom" dojoTheme="true"
        dojoParseOnLoad="true" xmlns:xe="http://www.ibm.com/xsp/coreex">        
       <script type="text/javascript">
            dojo.require("dijit.layout.ContentPane");
            dojo.require("dijit.layout.TabContainer");
        </script>        
        <xc:header></xc:header>         
        <xe:djTabContainer id="djTabContainer1"
            style="height:975px;width:1000px;margin">        
            <xe:djTabPane id="djTabPane1" title="Prospect / Broker">
                <xc:panel1></xc:panel1>
            </xe:djTabPane>
            <xe:djTabPane id="djTabPane2" title="History">
                <xc:panel2></xc:panel2>
            </xe:djTabPane>
            <xe:djTabPane id="djTabPane3" title="Vendor / Quote">
                <xc:panel3></xc:panel3>
            </xe:djTabPane>
            <xe:djTabPane id="djTabPane4" title="Supporting Attachments">
                <xc:panel4></xc:panel4>
            </xe:djTabPane>
            <xe:djTabPane id="djTabPane5" title="Sign and Submit">
                <xc:panel5></xc:panel5>
            </xe:djTabPane>        
        </xe:djTabContainer>        
    </xp:view>

This is an except of one of the Custom Controls

<?xml version="1.0" encoding="UTF-8"?>
<xp:view xmlns:xp="http://www.ibm.com/xsp/core" dojoParseOnLoad="true" dojoTheme="true">
<xp:panel>
<fieldset class="fieldGroup">
<legend>&#160;PROSPECT INFORMATION&#160;</legend>
<xp:table style="width:90%">
<xp:tr>
<xp:td style="width:20%">
<xp:label value="Employer Name:"
id="pREmpName_Label1" for="pREmpName1">
</xp:label>
<xp:label id="label35" style="color:rgb(255,0,0);font-weight:bold font-size:14pt" value="*" rendered="# {javascript:doc1.isEditable();}">
</xp:label>
</xp:td>
<xp:td style="width:35%">
<xp:inputText value="#{doc1.PREmpName}"
id="pREmpName1" style="width:250px">
<xp:this.validators>
<xp:validateRequired
message="Employer Name is required (PROSPECT INFORMATION)">
</xp:validateRequired>
</xp:this.validators>
<xp:this.required><![CDATA[#{javascript:if( @IsDocBeingSaved()==1){return true} else {return false}
}]]></xp:this.required>
</xp:inputText></xp:td>
4

0 回答 0