Learning XPages Part 31 : Adding Actions To The Action Buttons

Now that we have a our OneUI styled Action
bar and a button/link on it we now need to give that button some purpose.
In this case we are going to put the document into Edit Mode so that our
end user can edit their own document or a person with the ‘PhonebookEditor’
role can edit the document.

Open your content_Person custom control
again and select the ‘Edit Document’ link that we created in the last part.
Change to the events tab for the link and in the onClick event we will
create a server side action using the ‘Simple Actions button. Set the action
category to ‘Document’ and set the action to ‘Change Document Mode’. We
need to tell the action what mode we want so we’ll select the ‘Edit Mode’

A picture named M2

OK the dialog box and then save the
custom control and switch to your XPage. If you have not logged in on the
XPage yet then make sure you do it now. Anonymous should only have reader
access to the application. Once you have logged in navigate to a person
details page and click the button, the page will refresh and all the fields
will become editable.

A picture named M3

In the next part we will add some validation
to some of the fields and also disable the ability to edit certain fields.

Tagged with: , ,
Posted in None
One comment on “Learning XPages Part 31 : Adding Actions To The Action Buttons
  1. Dave Harris says:

    Gah!!! Now I have to be able to login, and me out of the office and no server to handle the authentication (and it’s too late in the night to upgrade my local one).I hate having to rely on barNet sometimes Seriously, though, this is fantastic stuff, just wondering if the IBM three-dayer in a couple of weeks is going to be able to hold a candle to it


Comments are closed.

%d bloggers like this: