I am new to xPages and am working on a proof of concept app. We have hundreds of Notes Db's built from a template and the xPage app needs to access view and document data from any one of these databases. Currently in an xPage that contains a viewPanel I can connect to any of the databases and the view that contains the data to display using the static option. I can also go to the source and change the databaseName property and see the data from that database also.
xp:dominoView var="view1"
"viewName="site-lookup" databaseName="Studies\LUME\LUME2939.nsf
But when I try to access any of the databases using computed SSJS, not a static method I am not getting the data or I get errors and no page display.
The users would select a project from a listBox on a landing page and I then create session variables for the projectID and database path to the project database. I have confirmed this works just as expected.
I have tried some example code from xPagesCheatSheet.com (see below ) but nothing is working as I expect. I have spent several hours scouring the boards and other sites looking for an answer and have not found one yet. I am hoping someone here might be able to shed some light on my dim mind and point me in the right direction. Thanks for any assistance you might provide.
Code to change the databaseName for a view panel.
Related
I am testing the XPages runtime on Bluemix but have some questions regarding defining the datasources.
So I took the teamroom application as example. In custom control addMember.xsp as Data Source is set a Domino Document. For the application is have selected 'Other' and computed the value as followed:
bluemixContext.getDataService().findDataBaseName()
Unfortunately when I test this code (members.xsp, Add Member button) after submitting no document is created in the database.
What am I doing wrong?
there is a mixture in the form aliases
I am new to Liferay. Now I need to create the flow chart which has the Liferay table work flow in following scenarios,
1) What are the list of table will reflect/update if we create the site admin?
2) What are the list of table will reflect/update if we create the site?
I tried by opening database tables and noticed that USER_, CONTACT_ will reflect, But I need list of all the related tables which will reflect when we create the site and siteadmin? I am using Liferay 6.2 version.
Thanks in advance.
When you want to know the internals of any system it is always best to check the relevant source-code. So in this case you can check the source-code for those classes which are used for CRUD operations on User and Site.
1) What are the list of table will reflect/update if we create the site admin?
Site-administrator is a Role, which can be applied to a User created in Liferay.
So if you want all the tables that are created from User-creation till User is assigned the Site-administrator role for a particular site, there here are some which I can recollect:
User_ (Obvious)
Contact_ (not so obvious :-) )
Group_ (Users are also created as a record in this table since Users have public and private pages)
Address (if you add an address)
Phone (if you add a Phone)
Users_Roles (Power user role is assigned by default)
UserGroupRole (user and site-role relationship, Site-administrator is a Site-role)
Users_Groups (user and site relationship)
For others you should refer the source-code for UserLocalServiceImpl, RoleLocalServiceImpl and GroupLocalServiceImpl, check the relevant methods prefixed add, update etc.
The corresponding service.xml for these module would reveal the database tables being used.
2) What are the list of table will reflect/update if we create the site?
Sites are nothing but Groups in Liferay. So its obvious Group_ table is playing a big role.
Other tables also depend upon what configuration you are doing while creating a Site.
Then there would be other tables like Layout when you start creating pages for a Site.
I would strongly encourage to go ahead and explore the source code for the classes and you would understand the flow - when and what tables are affected.
Here is some convention which might help you traverse the source-code, almost every *LocalServiceImpl is associated with a *Model like UserLocalServiceImpl with UserModel and almost every *Model has a corresponding database table with the same name.
Also the name of the functionality would in most cases hints at what service classes are being used to connect to database, like adding a User would hint at using UserLocalServiceImpl.
Hope I have understood your question and have been able to give some proper direction.
If you want to know this because you also want to write to these tables: Don't go there! You should purely use the API to change the data that Liferay stores. Otherwise you will run into disasters some time in the future - promised.
For just getting the SQL commands that Liferay actually uses, configure portal-ext.properties and change this default value:
hibernate.show_sql=false
Then go to "Server Administration/Log Levels" and add a new category "org.hibernate.SQL", configure it to the level DEBUG. Then the results show up in the logs. Note that this log configuration is transient and will be reverted on next server start. If you want the setting to be persistent, you'll need to go into Liferay's log4j configuration files.
Remember: You don't want to write to the tables ever. Promise!
I want to rewrite the lotus notes workspace using xpages.
So far i am successful but one feature is giving me quit a headache.
How can i access the database icon of a lotus notes application.
I tried to access: http://notespath.mydomain.com/$icon. That problem with that is that
it is not using the login from the current session to access the database and
retrieve the icon. Instead it tries to get it using the anonymous id. If the
anonymous id has no access to the database i get a popup to login.
My question is: Is possible to do this with the user that is logged in to the xpage
or is there is a way to export the database icon into a notes document.
Try following instructions here:
How to extract Lotus Notes database icon?
This should give you a method to get to the DXLExporter, and it looks like the icon is in the IconBitmap object. You're still going to get .ico files out though, which aren't ideal, but could be a good starting point for what you're trying to do here.
As Aaron Brake commented, XPages engine cannot access old Domino URL format for icon. Also see this: Image URL when previewed in Notes and in Web Browser
In our applications we use dedicated 32x32 PNG image resource (img_DBIcon) which is used in XPages. Developers need to maintain this image resource.
What´s about if you change your URL to a database icon??
Don´t use http://notespath.mydomain.com/$icon
Try http://notespath.mydomain.com/DB.nsf/$icon
I have to display user profiles along with their properties in a gridview in a Sharepoint application. Post that it should display results based on the search criteria being made.
I have tried using foreach loop using UserProfileeManager, but it seems very slow when a search is made for 3000 user profiles.
Is there any way to store all the user profile information somewhere in SQL database, or If any webservice can be used.
Kindly help!
Instead of going for seperate SQL DB.
Get the user profile details and store it in SharePoint list on your site.
Perform the search on that list so that it will increase the performance.
To display in gridview you can do it in lot of ways if the data in SharePoint List.
Hope it helps.
don't understand your platform clearly,since you already known store the info in DB,just store it,such as MySQL of windows,*nix and SQLite for android and iOS.Good luck. u wanna do some search,then if it is simple find ,the use sql 'select xxx,yyy from table where ....';that's ok.Good Luck.
I have a NSF , in that "new request" one action button is there, when am clicking that one, first it is throwing an error like "Master database cannot found please contact "NSF name" administrator" and it will opening the corresponding page.
Here my question is
Is that database is linkup with another( may be that's why it is throwing the error), if so then how can i link up the master database with the actual database to avoid that error
please help..thank you very much
There is apparently a missing configuration document that identifies to the master database. The person who wrote the code actually wrote a good error trapping routine because it tells you what happened. However, without seeing the code, we can't tell you how to fix the problem.
There is no specific "linkage" between Notes databases. The developer wrote custom code to interact with that other database and there's no way to know how without seeing that code.
Action buttons that access other Notes databases typically use the filepath and server name or sometimes the target database replicaID, if these are hardcoded in the new request action button (very bad programming, but not uncommon in old applications) and the target database has been moved, or renamed or more likely a copy has been made with a new replicaID then the button will fail.
The path to the target database may also be stored in a configuration document which hasn't been updated when one of the above happened. These will usually only be accessible to database administrators and hidden unless you have manager or manager level access to the database. You will need to get the Lotus Notes adminis involved but look at the code so you can tell them what they are looking for.