Xpages Dynamic View panel scrollbar - xpages-extlib

I have xpages with dynamic view panel which I need to have horizontal scrollbar. Can anyone tell be how to get the scroll bar,
Thanks
It appear to be something in the ExtLib application layout causing the scroll bar not to appear. When I create a XPage without the application layout the scroll bar appears.
The complete code is too long to post but here a simple version. ccLayout contains the Application Layout component.
<?xml version="1.0" encoding="UTF-8"?>
<xp:view
xmlns:xp="ibm.com/xsp/core"
xmlns:xc="ibm.com/xsp/custom"
xmlns:xe="ibm.com/xsp/coreex">
<xc:ccLayout
titleBarTabsRender="true"
placeBarRender="true">
<xp:panel>
<xp:panel>
<xp:label
value="Label"
id="label1">
</xp:label>
</xp:panel>
<xe:dynamicViewPanel
id="dynamicViewPanel1"
pageName="/xpTIRdoc.xsp">
<xe:this.data>
<xp:dominoView
var="view1"
databaseName="TIRv20Test.nsf"
viewName="vwXPTIRDetail">
</xp:dominoView>
</xe:this.data>
</xe:dynamicViewPanel>
</xp:panel>
</xc:ccLayout>
</xp:view>

In the .lotusContent class which is applied to a div in the application layout has css overflow hidden. When this is changed to overflow: auto the scroll bar appears.

Related

Notes/Domino : Submit button is not shown in the customized search form

I found steps to customize Notes Web search form but the submission button in the search form is not shown. In the below question, questioner also says the same thing. He seemed it was solved but did not write the cause.
http://www-10.lotus.com/ldd/nd6forum.nsf/0/cad751696e7486ef852571d300478a5c?OpenDocument
Perhaps I have a mistake something but I'm not idea how to solve this. Please advise me!
Old-style web forms are often very difficult to handle in Domino. Luckily there's something much better, really: XPages. If you have a fairly recent server, R9.0.x or better, try to make a simple XPage:
Create a new XPage
Add a Edit Box from the Core Controls (don't worry about the layout)
In the Properties, set the Data to Advanced/Use Scoped Variable, viewScope, and type a name, e.g. ftquery
Add a View from the list of Container controls
Select an existing view from the current database
In the View/Data Properties, set Search in view results to Computed, EL and viewScope.ftquery
Attach the Pager to the viewPanel...
Here's a sample, you can paste it in the Source tab of the new XPages and modify it to your liking.
<?xml version="1.0" encoding="UTF-8"?>
<xp:view xmlns:xp="http://www.ibm.com/xsp/core">
<xp:label value="FT Query" id="label1" for="inputText1"></xp:label>
<xp:inputText id="inputText1" value="#{viewScope.ftquery}">
</xp:inputText>
<xp:viewPanel rows="30" id="viewPanel1">
<xp:this.facets>
<xp:pager partialRefresh="true" layout="Previous Group Next" xp:key="headerPager" id="pager1" for="viewPanel1"></xp:pager>
</xp:this.facets>
<xp:this.data>
<xp:dominoView var="view1" viewName="Put-here-your-view" search="#{viewScope.ftquery}"></xp:dominoView>
</xp:this.data>
<xp:viewColumn columnName="$2" id="viewColumn1">
<xp:viewColumnHeader value="$2" id="viewColumnHeader1"></xp:viewColumnHeader>
</xp:viewColumn>
<xp:viewColumn columnName="Tournament" id="viewColumn2">
<xp:viewColumnHeader value="Name" id="viewColumnHeader2"></xp:viewColumnHeader>
</xp:viewColumn>
</xp:viewPanel>
</xp:view>
Don't forget to enable Full-Text search on your database!
The XPage can be opened from a browser using http;//yoursite/database.nsf/your-xpage.xsp

Scrolling up to page top when changing tabbedPanel as PartialRefresh on Domino 9 -XPages

When I test the code below on Domino 8.5.3 FP6, TabbedPanel can change the tab contents without moving back to page top as I expected.
However, when I test the same code on Domino 9.0.1FP3, my browser scrolls up to the page top regardless tab action run as partialRefresh.
<?xml version="1.0" encoding="UTF-8"?>
<xp:view xmlns:xp="http://www.ibm.com/xsp/core">
<xp:text tagName="h2" escape="false" style="padding-bottom:600px;"
value="TabbedPanel PartialRefresh Test on Domino9">
</xp:text>
<xp:tabbedPanel id="tabbedPanel1" partialRefresh="true"
selectedTab="tabPanel2" partialExecute="true">
<xp:tabPanel label="First Tab" id="tabPanel1">
first Tab
</xp:tabPanel>
<xp:tabPanel label="Second Tab" id="tabPanel2">
Second Tab
</xp:tabPanel>
</xp:tabbedPanel>
</xp:view>
How can I keep the browser scroll position when changing tabs on Domino 9?
Any advice would be really appreciated.
Hi I have done some test with your piece of code. You are right on Domino 8.5.3 all works perfect, but not on Domino 9.0.1.
A workaround would be, to set the attribute partialRefresh="false". With this setting on Domino 9.0.1 the focus moves up to top and immediatly back to your <xp:tabbedpanel>. From the perspective of usability it isn't the best solution but it works.
Adapted Code:
<?xml version="1.0" encoding="UTF-8"?>
<xp:view xmlns:xp="http://www.ibm.com/xsp/core">
<xp:text tagName="h2" escape="false" style="padding-bottom:600px;"
value="TabbedPanel PartialRefresh Test on Domino9">
</xp:text>
<xp:tabbedPanel id="tabbedPanel1" selectedTab="tabPanel2" partialRefresh="false" partialExecute="true">
<xp:tabPanel label="First Tab" id="tabPanel1">first Tab</xp:tabPanel>
<xp:tabPanel label="Second Tab" id="tabPanel2">Second Tab</xp:tabPanel>
</xp:tabbedPanel>
</xp:view>

Xpages - Conflict is created everytime a document is saved

I have a xpage, with multiple tabs. First tab contains a panel, whose content are editable only when isNewNote() is true. So I computed readonly attribute for the panel.
But everytime I save the document, it is creating a new conflict document.
At the sametime,if I uncheck read-only property, it is saving properly without any conflict.
Can anybody help me to solve this issue?
CODE - Xpage
<?xml version="1.0" encoding="UTF-8"?>
<xp:view xmlns:xp="http://www.ibm.com/xsp/core">
<xp:this.data>
<xp:dominoDocument var="document1"
formName="frmOnboardingRequest">
</xp:dominoDocument>
</xp:this.data>
<xp:panel>
<xp:this.readonly><![CDATA[#{javascript:if(document1.isNewNote()){
return false;
}else{
return true;
}}]]></xp:this.readonly>
<xp:table>
<xp:tr>
<xp:td>
<xp:label value="O n_ e d_ form completed by:"
id="oN_ED_FormCompletedBy_Label1" for="oN_ED_FormCompletedBy1">
</xp:label>
</xp:td>
<xp:td>
<xp:inputText
value="#{document1.ON_ED_EmployeeName}"
id="oN_ED_FormCompletedBy1">
</xp:inputText>
</xp:td>
</xp:tr>
</xp:table></xp:panel>
<xp:button value="Submit" id="button1"><xp:eventHandler event="onclick" submit="true" refreshMode="complete" immediate="false" save="true"></xp:eventHandler></xp:button></xp:view>
Check for multiple datasources pointing to the same document.
Some posts before with the same problem
xpage creates save conflict on save/submit
Multiple data sources in XPages
Lotus Notes: Replication conflict caused by agent and user running on the document at same time
=================================================
Edit
I had to change the button code to this to get the same problem
<xp:button value="Submit" id="button1"><xp:eventHandler event="onclick" refreshMode="complete" submit="true">
<xp:this.action>
<xp:saveDocument></xp:saveDocument>
</xp:this.action></xp:eventHandler></xp:button>
After some more testing, try this.
Add this field to the end of the xpage
<xp:inputText id="inputText1"
value="#{document1.temp}"
style="visibility:hidden;display:none">
</xp:inputText>
Then no conflicts are created.
Strange indeed - but also not. Your data source is bound to the page and not to the panel. So if you want to set read mode only for that panel, consider to calculate the panel's datasource from the page's datasource:
<xp:panel>
<xp:this.data>
<xp:dominoDocument var="document1" action="openDocument"></xp:dominoDocument>
</xp:this.data>
</xp:panel>
Of course you have to calculate the document mode and the docid instead of using the readonly property.
In addition to the other suggestions, when working with tabbed tables you will want to follow this blog post carefully. I have been through similar issues on a previous project and Tommy Valand's redirectToCurrentDocument() fixed them.
http://dontpanic82.blogspot.com/2010/06/xpages-avoid-saving-duplicate-documents.html

xe:dialog won't open in edit mode with view picklist OpenNTF control

I'm using the Extension Library and XPages to build a web based workflow application. One feature is to prompt a dialog and select the next approver before submitting it forward.
For new documents, the dialog appears, and it also appears when in read mode. It never opens for a saved document. I need it to work in SSJS, though the dialog does open in CSJS. Here is some of the code:
xpMain.xsp contains two custom controls: ccButtons and ccWFloDialogs.
ccButtons "Submit" button:
getComponent('dlgNextOwner').show();
ccWFloDialogs "dlgNextOwner" dialog:
<xe:dialog id="dlgNextOwner" title="Select Supervisor">
<xe:formTable id="ftDlgNextOwner" formTitle="Select Supervisor"
formDescription="You may select a different supervisor."
disableErrorSummary="true">
<xp:this.facets>
<xe:formRow id="formRow1" xp:key="footer" for="txtWFloNextOwner"
labelWidth="125px">
<xp:inputText id="txtWFloNextOwner" style="width:200px"
value="#{viewScope.nextOwner}">
</xp:inputText>
<xe:namePicker id="npNextOwner" dialogTitle="Select Supervisor"
for="txtWFloNextOwner">
<xe:this.dataProvider>
<xe:dominoNABNamePicker addressBookSel="all-public"></xe:dominoNABNamePicker>
</xe:this.dataProvider>
</xe:namePicker>
</xe:formRow>
</xp:this.facets>
</xe:formTable>
</xe:dialog>
In CSJS, I can use the following code and it successfully opens the dialog:
XSP.openDialog("#{id:dlgNextOwner}");
I'm also using Mark Hughes' picklist from the extension library, and if I remove the panel which contains the control and data source, the dialog shows up in SSJS! The code is in a custom control, although, if it's directly in the XPage, the problem is the same. Here is the code for the panel:
<xp:panel
id="vendorDiv">
<xp:this.data>
<xp:dominoView
var="nvVend"
viewName="V_Vend"
ignoreRequestParams="true"
databaseName="other/lookupdb.nsf"
startKeys="#{javascript:viewScope.srchVend}">
</xp:dominoView>
</xp:this.data>
<xe:formTable
id="ftGetVendor"
disableErrorSummary="true"
labelPosition="above">
<xe:formRow
id="frVendor"
for="cfVendorName"
label="Name of the Vendor:">
<xp:text
escape="true"
id="cfVendorName"
value="#{currentDocument.VendorName}"
style="width:200px">
</xp:text>
<xc:viewpicklist
rowsPerPage="15"
buttonImage="./add.png"
tableClass="tablecellgreen"
headerClass="headerclass"
rowClass="odd, even"
searchBar="false"
searchButtonText="Search"
searchButtonClass="button2"
searchBarClass="headerclass"
pagerStyleFirst="navbutton1"
pagerStylePrevious="navbutton2"
pagerStyleCurrent="navbutton4"
pagerStyleNext="navbutton2"
pagerStyleLast="navbutton3"
typeAheadBar="true"
select="Column"
onReturn="Set Scope Value"
bottomBarClass="bottomround headerclass"
cancelButtonText="Cancel"
cancelButtonClass="button2 floatthisright"
type="Single Value"
finishButtonText="Finish"
finishButtonClass="button2 floatthisright"
multiSelectButtonAddImg="./add.png"
multiSelectButtonRemoveImg="./delete.png"
picklistButtonClass="button"
openDialogWith="Link"
picklistLinkImg="./add.png"
multiSelectLinkAddImg="./add.png"
multiSelectLinkRemoveImg="./delete.png"
selectWith="Link"
clearSearchImg="./cross.png"
SelectCellWidth="30px"
dialogID="dlgVend"
dialogTitle="Select a Vendor"
dialogWidth="80%"
refreshID="vendorDiv"
ssjsSelectFunction="getVendorInfo"
varName="viewScope.vendorInfo"
datasrc="nvVend"
selectColumn="4"
linkImg="./add.png"
typeAheadVar="viewScope.srchVend">
<xc:this.viewColumn>
<xp:value>0</xp:value>
<xp:value>1</xp:value>
<xp:value>2</xp:value>
<xp:value>3</xp:value>
</xc:this.viewColumn>
</xc:viewpicklist>
</xe:formRow>
<xe:formRow
id="frVendorStatus"
for="cfVendorStatus"
label="Vendor Registration Status:">
<xp:text
escape="true"
id="cfVendorStatus"
value="#{currentDocument.VendorStatus}">
</xp:text>
</xe:formRow>
<xe:formRow
id="frVendorCountry"
for="cfVendorCountry"
label="Country Name:">
<xp:text
escape="true"
id="cfVendorCountry"
value="#{currentDocument.VendorCountry}">
</xp:text>
</xe:formRow>
</xe:formTable>
</xp:panel>
The requested vendor information populates the fields, without any problem or errors. However, something here seems to prevent dialogs from opening up using SSJS.
Can anyone see anything obvious I'm missing? The data source is in the panel, ignoreRequestParams is true (otherwise it doesn't work).
The main data source is in the entire XPage context. I tried to add the ccWFloDialog custom control outside the main panel, and change the data source to the panel, but that didn't work.
Any ideas?
Forget the dialog for now. This is probably data source related. Suggest you get it working just on the xpage first. With visible fields. then maybe use the rendered property to get it working on the xpage similar to how the dialog would appear. Once you have that working then you should be good to apply to dialog. This idea is to just take the dialog out of the equation first to make sure it works normally.
Instead, I decided to open the dialogs using CSJS, instead of SSJS. I've changed some of logic, and will have a bit more to do to finish this part of the project. Thanks to all!

Using xe:applicationLayout any way to do a partial update of of main content area and LeftColumn facet?

Short of placing my xe:applicationLayout inside a panel called panelAll or doing a Full Update, is there any way to do a partial update for my panelMainContent panel and my LeftColumn facet?
<?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"
xmlns:xe="http://www.ibm.com/xsp/coreex">
<xc:DL2_AppLayout>
<xp:panel id="panelMainContent">
<xc:xcCustByNameView></xc:xcCustByNameView>
</xp:panel>
<xp:this.facets>
<xp:panel xp:key="LeftColumn" id="panelLeftColumn">
<xc:DL2_LeftColumnNav></xc:DL2_LeftColumnNav>
</xp:panel>
</xp:this.facets>
</xc:DL2_AppLayout>
</xp:view>
You can refresh the second component in the onComplete of the event that refreshes the first component, as outlined here.

Resources