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 11, 2012, 10:21 AM
12 Posts

Add Mod Del Component

  • Category: Other
  • Platform: Other
  • Release: 8.5.3
  • Role:
  • Tags:
  • Replies: 12
Pls show the code for Add Mod Del component in xpages. I need to my project very urgent.
Jun 11, 2012, 10:58 AM
126 Posts
Re: Add Mod Del Component
Are you looking for code to add, edit and delete domino documents ?
 
If so you show take a look at the template applications. When creating a new application you can specify a template to base it off, this will then create one for you. Then looking at the code in it  you can learn how it does it or use some of the code. The discussion template is a fairly generic forum site that allows you to add, edit and delete forum threads.
 
The ExtLib available on openNTF.org / passport advantage offers a lot of additional controls / functionality to XPages, it also comes with new, remodelled templates "Discussion" and "Teamroom".
 
If you have a specific problem please add some more details. 
 
Simon 
Jun 12, 2012, 7:02 AM
12 Posts
Re: Add Mod Del Component
Hi Simon,
 
Initially thanks for your response.
 
Moreover My requirement is, there will be a Ok and Cancel button. Once the user enters the data in 2 edit boxes and click OK, the data must be saved and displayed in the form of table beneath it. Such kind of codes, I wrote in Normal Notes. But in xpages am stucking here and there. So please help me out, as a result I can show the add mod del functionality in xpages too.
 
Send the link if you have such functionality implemented in xpages that will be easier for me to refer.
 
 
Thanks,
Srividhya Radhakrishnan
Jun 12, 2012, 7:35 AM
126 Posts
Re: Add Mod Del Component
As I said in my previous post the ExtLib on openNTF.org has 2 remodelled templates   http://extlib.openntf.org/
 
and the basic install comes with older templates, go to designer, click create new application, in the pop up the bottom section allows you to create an app based from a template, the old discussion is there by default. 
 
 
if you have a domino document data source created based off a form you can use control binding to have fields saved when you execute a save simple action.
 
such as  
 
<xp:inputText value="#{dominoDoc.Topic}"></xp:inputText> 
 
the above will work for editing also. 
or you can use SSJS to modifiy document fields such as: 
 
dominoDoc.replaceitemValue("exampleField", "string value to enter"); 
Jun 12, 2012, 8:30 AM
12 Posts
Re: Add Mod Del Component
Thanks for the response. Let me try and revert back soon..
Jun 12, 2012, 8:52 AM
12 Posts
Re: Add Mod Del Component
I dont find anything as old discussion while creating new application.
 
Need Help
Jun 12, 2012, 9:40 AM
126 Posts
Re: Add Mod Del Component
? what is the issue your having
 
create new application, should look like this:
 
Specify new application name and location 
 
Server:  either select your server or local 
Title:       give the application a name 
 
Specify template for new application
 
Server:  either your server or local 
 
Template:   Discussion - Notes & Web (8.5.3)       or if you are using ExtLib     Discussion 8.5.3 XL
Jun 12, 2012, 12:14 PM
12 Posts
Re: Add Mod Del Component
Thanks,
 
In this we can edit and delete complete documents. What i need is, In a document a portion of which is add mod del. So we need to edit and delete only that portion and not the entire document from db.
 
 
Jun 12, 2012, 12:43 PM
126 Posts
Re: Add Mod Del Component
The template was not suppose to solve your issue it was suppose to show you how to interact with a domino document data source as a learning resource and enable you to figure out what you need to do. If you only want to allow someone to edit part of a document then only show them the fields for that part and the rest will remain the same.
 
for example the discussion allows you to add a document with subject, tags and body. lets say you want this functionality but only to edit the body and not the subject or tags, write your own edit XPage to interact with the data source where you only show a field to edit the body.
 
If I have missed something here with your question and haven't answered it please explain in a lot more detail what you mean by an "Add mod del component" and a sample use case of what you are trying to achieve with it, I have taken this to mean your looking to understand how to add, edit and delete domino documents, which the discussion database will show you very well as it is a fully functional application.
Jun 13, 2012, 6:23 AM
12 Posts
Re: Add Mod Del Component
Pls Look at this. This is my requirement.
 
 Here Holiday Date and Name of the Holiday will be filled by the user and at once they click Ok(Green tick image), It gets added beneath it. And if they want to edit that particular values, they click on the tick icon under edit column of the corresponding values and those values will be brought for editing in the above fields. Same as in case with delete. If they wish to delete any one row item added. They just need to click on the corresponding row item (X symbol) and that row will be deleted.
 
Like this I need to do in X pages. Hope this sounds clear.
Jun 19, 2012, 9:54 AM
12 Posts
Re: Add Mod Del Component
Hi Simon,
 
 
Please post any feedback after checking my comments. ASAP
Jun 19, 2012, 11:53 AM
126 Posts
Re: Add Mod Del Component
Hi,
 
Yes I understand the use case, but I have directed you to the Discussion template which shows you an example of everything you are trying to achieve. This is not a forum to ask people to develop applications for you, it is to ask questions about controls, bugs, best practises. I would highly recommend reading the "Mastering XPages" book, and or the course material on TLCC.com and david leedy has a post on free learning resources here:
 
 
 
Here is a rough idea of what you need to do but you will need to code it and investigate / practise it. 
 
1. Create a view for the list of documents.
2. Create a panel for the add / edit section with a document data source and text fields: (most of this is contained in the custom control "topicThread" in discussion)
 
<xp:panel id="detailsPanel">
    <xp:this.data>
        <xp:dominoDocument var="dominoDoc" action="openDocument"> 
        </xp:dominoDocument> 
 
        <xp:label value="holiday date"></xp:label> 
        <xp:inputText>.....
    </xp:this.data> 
</xp:panel> 
 
bind these fields to the underlying document 
 
 3. Either have a dataview (which won't look the same as the above picture) or a repeat and customize it to look as you need. - (dataview example is the "allDocumentsView" custom control, repeat in "topicThread" to display all the replies).
 
4. When an item in the list is clicked, refresh the panel and update the document its pointing to, this will change the details displayed in that panel. (examples of creating / modifying an entry in "mainTopic" custom control, )
 
5. When new item saved / edited refresh the dataview / repeat to show the new / updated entry.
 
 
It will be quite easy to do but will require you searching for examples and reading articles online. 
 
Simon 

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