193 Lotus blogs updated hourly. Who will post next? Home | Blogs | Search | About 
 
Latest 7 Posts
What good is the internet of things to people who don’t have internet?
Tue, Feb 21st 2017 10
An apparent theme: application agnosticism
Fri, Aug 19th 2016 6
Sessions for #MWLUG2016
Fri, Jul 1st 2016 11
Can you hear me now? Life without #HearingLoss
Tue, May 10th 2016 10
Austin, Texas hosts #MWLUG2016 in August
Wed, Apr 6th 2016 8
Orphan #Java class files in the Local folder in #XPages
Thu, Mar 31st 2016 4
An agent to change field values to help in #XPages
Tue, Mar 22nd 2016 11
Top 10
Exporting from #XPages to Excel without Excel, Part 2
Thu, Sep 26th 2013 12
An agent to change field values to help in #XPages
Tue, Mar 22nd 2016 11
Sessions for #MWLUG2016
Fri, Jul 1st 2016 11
Mastering #XPages: Buy the eBook
Tue, Oct 14th 2014 10
Can you hear me now? Life without #HearingLoss
Tue, May 10th 2016 10
What good is the internet of things to people who don’t have internet?
Tue, Feb 21st 2017 10
Simple view without links in #xpages
Fri, May 2nd 2014 9
Java still not refreshing correctly in #XPages 8.5.3 UP 1
Mon, Nov 4th 2013 8
Austin, Texas hosts #MWLUG2016 in August
Wed, Apr 6th 2016 8
Finding user roles in #XPages
Mon, Jan 6th 2014 7


Simple view without links in #xpages
Twitter Google+ Facebook LinkedIn Addthis Email Gmail Flipboard Reddit Tumblr WhatsApp StumbleUpon Yammer Evernote Delicious
David Navarre    

One of my co-workers, Neil Enet, asked me the other day if it was possible to set up a view but prohibit the users from opening the documents. I tossed out the idea of using an HTML table with all the HTML for the rows and cells being computed in one column of a view.

"<tr><td>" + approverName + "</td><td>" + approvalType +"</td><td>" + description"</td></tr>"

Unfortunately, that’s pretty clunky and not very satisfying. So, as we talked, I said, “Hey, how about you create an XPage with a view and just don’t make any of the columns clickable?” So, he did.

I asked Neil to comment on it, and he had some great thoughts:

My first XPage. I’ve never competed on a race before, but I imagine the feeling of winning one as being pretty similar to seeing this XPage for the first time. And OK, let’s be honest, it’s a pretty simple XPage. “Simple” might be too much of a word, actually. It’s just a view. ONE view.

The process was extremely easy. I just dragged the View Control, linked it to the view in Notes that I wanted, and voilà. I changed the font size and color of each column, and that felt like an even more awesome achievement.

The funny thing is I’m sure that if I never had the need to create a view like this, where users weren’t able to open documents, this wouldn’t have been so fulfilling. I can see myself saying: “Great, I just created a view, and you can’t open any docs. What’s the big deal about THAT?” But it turns out that that’s exactly what I needed. So simple! And to think that Old Notes didn’t allow me to do this, and that I had to go down the “terrifying” XPages way. Ha!

I can’t think of a better way to start playing with XPages. I now know I can do one, and I know I’m being very naive if I say “XPages is a piece of cake”, but there it is on my system, and I’m sure it will not be the only one.

I’m looking forward to creating more complex XPages, and it’s very very exciting. I might just take a picture of my XPage and put it next to my wife’s here on my desk. And when people walk by and ask me what that is, I’ll answer: “That’s the most simple XPage in the world. But you know what? It’s MY simple XPage.”

<?xml version="1.0" encoding="UTF-8"?>
<xp:view xmlns:xp="http://www.ibm.com/xsp/core">

<xp:viewPanel rows="30" id="viewPanel1">
	<xp:this.facets>
		<xp:pager partialRefresh="true" layout="Previous Group Next" xp:key="headerPager" id="pager1">
		</xp:pager>
	</xp:this.facets>
	<xp:this data>
		<xp:dominoView var="view1" viewName="COPApprovals"></xp:dominoView>
	</xp:this.data>
	<xp:viewColumn columnName="$11" id="viewColumn1" style="font-weight:bold;color:rgb(0,0,160)">
	</xp:viewColumn>
	<xp:viewColumn columnName="$10" id="viewColumn2" style="font-weight:bold;color:rgb(0,64,0)">
	</xp:viewColumn>
	<xp:viewcolumn columnName="$12" id="viewColumn3">
	</xp:viewColumn>
</xp:viewPanel>

</xp:view>

Then, to get users to access it from their Old Notes, using an Outline Entry to open the URL….

targetXpage := "internalApprovals.xsp";

server := @Subset ( @DbName; 1 );
path := @Subset ( @DbName; -1 );

fserver := @Name([CN]; server);
fpath := @ReplaceSubstring(path; "\"; "/");

url := "notes://" + fserver + "/" + fpath + "/" + targetXpage;

url

And now, Neil has developed his first XPage, users will be able to see status on their documents and everyone will be happy. (Well, I’ll be happier once he goes back in and names the columns in the old view, gives better IDs to the XPage viewColumns, puts it all onto an application layout control and makes everything pretty, but, it works!)

So, if you’re still in fear of XPages, you needn’t be. Go forth and be LOST IN XPAGES with the rest of us!

 




---------------------
http://lostinxpages.com/2014/05/02/simple-view-without-links-in-xpages/
May 02, 2014
10 hits



Recent Blog Posts
10
What good is the internet of things to people who don’t have internet?
Tue, Feb 21st 2017 8:36p   David Navarre
A
6
An apparent theme: application agnosticism
Fri, Aug 19th 2016 9:55a   David Navarre
A
11
Sessions for #MWLUG2016
Fri, Jul 1st 2016 11:54a   David Navarre
A
10
Can you hear me now? Life without #HearingLoss
Tue, May 10th 2016 11:50p   David Navarre
A
8
Austin, Texas hosts #MWLUG2016 in August
Wed, Apr 6th 2016 4:46p   David Navarre
A
4
Orphan #Java class files in the Local folder in #XPages
Thu, Mar 31st 2016 3:56p   David Navarre
A




Created and Maintained by Yancy Lent - About - Planet Lotus Blog - Advertising - Mobile Edition