Xpages Menu using lotusSelected

Hi,

I’m converting an existing Lotus Notes application into an Lotus Notes application using Xpages.

I’ve created a custom control for my menu. I use class=“lotusSelected” on the default selected menu item. But when I click on the other menu item the first one stays green (selected). How can I change the selected menu item?

Any help is appreciated!

I’m using the following code:

<xp:view xmlns:xp=“http://www.ibm.com/xsp/core”>

<div class="lotusColLeft">

	<div class="lotusMenu" role ="menu">

		<div class="lotusBottomCorner">

			<div class="lotusInner">

				<ul>

					<li class="lotusSelected" role="menuitem">

						<xp:link escape="true" text="By Product" id="link7">

							<xp:eventHandler event="onclick"

								submit="true" refreshMode="complete">

								<xp:this.action>

									<xp:openPage

										name="/ViewAllBySegment.xsp">

									</xp:openPage>

								</xp:this.action>

							</xp:eventHandler>

						</xp:link>

					</li>



					<li role="menuitem">

						<xp:link escape="true" text="By Tool" id="link6">

							<xp:eventHandler event="onclick" submit="true"

								refreshMode="complete">

								<xp:this.action>

									<xp:openPage name="/ViewAllByCategory.xsp">

									</xp:openPage>

								</xp:this.action>

							</xp:eventHandler>

						</xp:link>

					</li>

					

				</ul>

			</div>

		</div>

	</div>

</div>

</xp:view>

Subject: You’re opening a new xpage

You are opening a new xpage when you click on the link - it’s not going to automatically remember that you clicked on that menu item in the new page.I’d suggest computing the lotusSelected attribute depending on what page is open.

Subject: Can you help me getting started

Hi,

Thanks for your reply.

Working with Xpages is a bit new for me. Can you help me getting started with this. How do I set this up? Or where can I find more info about writing such code.