This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal



Jun 7, 2013, 8:34 PM
586 Posts

Forum problem... and Betsy Answer

  • Category: Other
  • Platform: All
  • Release: 9.0
  • Role:
  • Tags: Whoops!
  • Replies: 7

Betsy - I'm guessing that both you're threads died because I tried pasting the solution into it.  I think it's the xpage code.  why it died on my stuff and not yours I do not know.

 

I've pasted my post into Pastebin.  Check it out here:  http://pastebin.com/9NKZVuj7

Here's the TEXT part of the pastbin to make it easier for people to follow:

 

 

Betsy,

Nothing is simple... until you do it the first time... or maybe even the first 100 times.  XPages is new.  It's different.  So you can't get caught up thinking that it's simple to do in the client so it should be simple to do here.  It is simple to do in XPages but it's just different.

I looked at your code.  

In this case I made the assumption that if you didn't want the radio button you wouldn't want the label.  So we're talking about the whole table row really.

It's not in the "Pretty Pane" but I think every "xp" tag does have a rendered property in all properties.  I've used this to control rendering based on the value of the component.

Even though we all hate the core tab control this does seem to work fine if I go to the other tab and back again.  Though you might run into additional issues with validation and stuff.  Remember you're pretty much working with a single tab at a time and the others don't exist.  If you have the update pack or ext. library you can use the dojo tab control which is better.  If you don't have those you still can use the dojo tab control but that's a little more manual of a process. Not something I'd recommend.

Tab controls are good.  But just because we've always used them in the client does not mean they translate well to the web.  Certainly categorized views don't translate to the web and there are much better ways of getting the same data across.  Just my 2 cents.

My suggestion for now is to work with what you can do and after it's working that really look at the UI.

 

Hope this helps!

Dave

 

Jun 7, 2013, 8:57 PM
25 Posts
Thanks Dave

It worked for me..

 

though, this part:

<xp:eventHandler
event="onchange"
submit="true"
refreshMode="partial" refreshId="myTable">

</xp:eventHandler>

how come when you look at the design - not the source, I don't see that in the all properties>on change area..

Jun 7, 2013, 8:58 PM
586 Posts
missing code

I had the exact same people when I pasted your code in.  I ended up deleting it and redoing.

I don't know why it's not showing.  Possibly it's because it's being pasted from the internet without going through a pure text editor like notepad first.  That's all I can think of.

 

 

Jun 7, 2013, 10:23 PM
25 Posts
I found this.. I guess I wasn't looking in the right place.

I was thinking it would be in the onchange event formula area of the control.

Jun 7, 2013, 10:48 PM
586 Posts
hmm

The graphics appeared when I viewed the post from the notes client.  Not from Xpages.  Not sure what the deal is there.  I sent a note to IBM.

I've not really looked at the events inside all properties for something like that.  My first thought was it was for client side vs server side but I didn't see anything there.  I would ignore those I think. The only time I've ever really gone into all properties to manipuate an event is for "onComplete" type stuff I think.  You can get into trouble in there if you use the wrong editor.  Sometimes you need to type ssjs code not into the editor but into a pure text editor.  I forget what's going on there...

Anyway I do use all properties a lot... just not really for any events...

Jun 8, 2013, 2:32 PM
54 Posts
tab table with dojo

this code is a sample for a tabbed Table using dojo. It will eliminate the disadvantage of a Notes tabbed table.

 

<?xml version="1.0" encoding="UTF-8"?>
<xp:view xmlns:xp="http://www.ibm.com/xsp/core" dojoParseOnLoad="true">
    <xp:this.resources>
        <xp:dojoModule name="dijit.layout.ContentPane"></xp:dojoModule>
        <xp:dojoModule name="dijit.layout.SplitContainer"></xp:dojoModule>
        <xp:dojoModule name="dijit.layout.TabContainer"></xp:dojoModule>
    </xp:this.resources>

    <div id="mainTabContainer" dojoType="dijit.layout.TabContainer"
        style="padding-top:20px;padding-left:20px;width:400px;height:150px">
        <div id="tab1" dojoType="dijit.layout.ContentPane" title="Main"
            selected="true" closable="false">
            <xp:table style="width:100.0%" id="myTable">
                <xp:tr>
                    <xp:td style="width:150px">
                        <xp:label value="Leave Type:" id="leavetype_Label" for="leaveType"></xp:label>
                    </xp:td>

                    <xp:td>
                        <xp:comboBox id="leaveType">

                            <xp:selectItem itemLabel="Bereavement" itemValue="Bereavement">
                            </xp:selectItem>
                            <xp:selectItem itemLabel="Family Medical Leave Act"
                                itemValue="FMLA">
                            </xp:selectItem>
                            <xp:selectItem itemLabel="Floater Day" itemValue="Floater Day">
                            </xp:selectItem>
                            <xp:selectItem itemLabel="Jury Duty" itemValue="Jury Duty"></xp:selectItem>
                            <xp:selectItem itemLabel="Leave of Absence"
                                itemValue="Leave of Absence">
                            </xp:selectItem>
                            <xp:selectItem itemLabel="Flextime" itemValue="Flextime"></xp:selectItem>
                            <xp:selectItem itemLabel="Reserve Duty" itemValue="Reserve Duty">
                            </xp:selectItem>
                            <xp:selectItem itemLabel="Scheduled Sick Leave"
                                itemValue="Scheduled Sick Leave">
                            </xp:selectItem>
                            <xp:selectItem itemLabel="Short Term Disability"
                                itemValue="Short Term Disability">
                            </xp:selectItem>
                            <xp:selectItem itemLabel="Unscheduled Sick Leave"
                                itemValue="Unscheduled Sick Leave">
                            </xp:selectItem>
                            <xp:selectItem itemLabel="Vacation" itemValue="Vacation"></xp:selectItem>
                            <xp:eventHandler event="onchange" submit="true"
                                refreshMode="partial" refreshId="myTable">
                            </xp:eventHandler>
                        </xp:comboBox>
                    </xp:td>
                </xp:tr>
                <xp:tr>
                    <xp:this.rendered><![CDATA[#{javascript:getComponent('leaveType').getValue() == 'Short Term Disability'

}]]></xp:this.rendered>
                    <xp:td>
                        <xp:label value="Received Physician's Authorization Note?"
                            id="drNoteLabel">

                        </xp:label>
                    </xp:td>
                    <xp:td>

                        <xp:radioGroup id="note" defaultValue="No">

                            <xp:this.rendered><![CDATA[#{javascript:rendered="#{javascript:getComponent( 'leaveType').getValue() == 'Short Term Disability'}"}]]></xp:this.rendered>
                            <xp:selectItem itemLabel="Yes" itemValue="Yes">
                            </xp:selectItem>
                            <xp:selectItem itemLabel="No" itemValue="No">
                            </xp:selectItem>
                        </xp:radioGroup>
                    </xp:td>

                </xp:tr>
                <xp:tr>
                    <xp:td></xp:td>
                    <xp:td></xp:td>
                </xp:tr>


            </xp:table>
        </div>
        <div id="tab2" dojoType="dijit.layout.ContentPane" title="Approvals"
            closable="false">
            Approval stuff
        </div>

    </div>
</xp:view>
 

Jun 10, 2013, 2:49 PM
19 Posts
Images corrected above

The pasted images should now be appearing correctly in the thread above.


This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal