Copying and Renaming xhtml file to new file in JSF causing data does not load - jsf

I received an assignment to have a look at Java Server Faces project and maintain the existing code if possible. My background is ASP.net , and never made a Java program previously. The problem is like this : there is existing file code named policy_list.xhtml (with also several beans attached to UI component in the file) and lets say it attach to menu Policy List. If user click the menu, the policy_list.xhtml will show the list of Policy. I copied the policy_list.xhtml file and renamed it to a new file renewal_list.xhtml. And I created a new menu Renewal List and attach the link to renewal_list.xhtml. I did not make any changes to renewal_list.xhtml. However , when I click the Renewal List menu, the page did not show any data like the Policy List menu. There is no error shown in the page What is wrong with the Renewal List page. Is it the behaviour of JSF ? On the IntelliJ IDEA debugger, I have not found any error. However the Search button in the renewal_list.xhtml working fine just as policy_list.xhtml. All the action link in the dataTable does not work in renewal_list.xhtml. I guess I am missing as particular setup on the menu or else ? Any ideas ?

My God, I have to registered it on pages.xml . Now, its working. Thanks to the powerful search of IntelliJ idea.

Related

Custom behaviour for selfAsserted content?

Following this disabled social account from logon sample. Here's what I see when the Local Account user exists and is disabled:
NB - I've changed the ContentDefinition so that it's using 2.1.7 instead of 1.1.0.
I'm assuming the "hide me" text box is to be hidden using css? Which would mean that I would have to implement my own Template?
Also, there's a Cancel and a Continue button. Because the dummy textbox doesn't actually do anything, clicking the Continue button does not work. So I assume I want to hide the Continue button, but only when the dummy text box is present? Does that mean I should be looking at Javascript?
Finally, the UserMessageIfClaimsTransformationBooleanValueIsNotEqual error message (defined in the AAD-DisabledUserPage Technical Profile) does not appear anywhere in the source of the page. It seems integral to the strategy in the sample. Am I missing something?
I've looked at Customise the UI, Customise the UI with HTML template and Enable JavaScript and page layouts. There doesn't seem to be anything on customising the generated content. Have I missed something in the documentation?
Very strange so I had a look at the sample.
This is an old sample. It still uses "socialIdpUserId".
<! - The claim socialIdpUserId has been renamed to issuerUserId →
I renamed this in the base file to "issuerUserId".
Essentially, they needed a "dead-end" page.
But the dead-end page needs an output claim so they made a dummy one but wanted in removed!
I would have used a paragraph element. Maybe it wasn't available then?
I wrote that up a while back.
My version is in this gist.
If disabled, the user sees:
You can hide Cancel and Continue by modifying the technical profile. See the Metadata section here.

Command Not Handled Exception

I'm new to Domino Designer. I'm trying to modify an existing application which is running on a remote server. I create a blank xPage and view in browser and it works. I add a label and view in browser and it works. I add a combo box and setup a data source for my xPage. The data source is in the current application and I'm using a view. I setup my combo to point to that data source and specify BindTo value. I view it in browser and I get Error 500 "HTTP Web Server: Command Not Handled Exception" I can open the view that I've used and see all the data in the view. I can even add, edit, and delete from the view.
Ideas... Thnxs in advance.
Additional Info. I've added a "View" from "Container Controls" and used the same data source and the same view and it also works in the browser.
The error being printed is:
javax.faces.el.PropertyNotFoundException: Error getting property 'CompanyName' from bean of type lotus.domino.local.View
com.sun.faces.el.PropertyResolverImpl.getValue(PropertyResolverImpl.java:119)
com.ibm.xsp.el.PropertyResolverImpl.getValue(PropertyResolverImpl.java:144)
com.sun.faces.el.impl.ArraySuffix.evaluate(ArraySuffix.java:182)
com.sun.faces.el.impl.ComplexValue.evaluate(ComplexValue.java:163)
com.sun.faces.el.impl.ExpressionEvaluatorImpl.evaluate(ExpressionEvaluatorImpl.j‌​ava:257)
com.sun.faces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:150) ....
This was already answered in the comments, but I want to write a better answer.
The problem in this case is that a view data source is being used for editing a document. Directly, this is not a possibility, though there are a few great ways to get around this. The first way, and my favorite, is to use an inline form. I think the Extension Library Demo database offers a few great examples of how to go about doing this. One way is to use a tooltip dialog. Another way is an inline form. A repeater is used and for every row in the view, a hidden panel can be made which contains the document data source and all field which are required to be changeable. By clicking on a button or link, the panel is made visible. This is my favorite variant because it is simple, quick, and generally looks great.
Another way to go about this is to have a view data source only, but use scripts to retrieve the document and set the values in the background and then save and release. It all depends on what you are trying to achieve.
My main recommendation is to look at the ExtLib demo and take a look at what they are doing there.

404 Item not found When Providing access to existing documents from an XPage View

I have been following the tutorial here for creating an XPage application. Unfortunately I am encountering an Error 404 HTTP Web Server: Item Not Found Exception when you try to follow a link to another document from the main view XPage. Everything else seems to function properly until that point.
It happens when you select "XPage associated with the documents form".
According to some googling I simply needed to rebuild my project but that didn't work. That was the only fix I was able to find.
The link for my xpage for my view is : http://localhost/ExpenseClaims.nsf/xclaimsview.xsp
The link to a xpage with the 404 error from my view is: http://localhost/ExpenseClaims.nsf/%24%24OpenDominoDocument.xsp?documentId=15DA9966C77908D385257C150070483D&action=openDocument
The problem has returned for my "claim" xpage that represents a form document named "claim". My response documents open as needed.
My associations are:
Views: Xpage:
Claims -> xclaimsView
Forms: Xpage:
claim -> claim
response -> response
Most likely the connection between your XPage and the form didn't work. Open the form, then in the properties pick the XPage you want to open. Save it and try again.
There's one special case when you have an XPage with the same name as the form, where that should happen automatically, but it is safer if you specify the property in the form (second tab on the property box)
The data connection from the xpage to the form seems to be breaking down that's a possible cause but not an acceptable answer. The reasons are everything from the project build being broken to the port that domino designer is using as default being occupied.
Cleaning then building the project may help (Project -> Clean) but in my case it didn't. Opening the Page by selecting it by name is helpful but not if you are opening two different pages from the same view(View Properties -> at run time open selected document). There was another suggestion that said to move the default domino test port(File -> Preferences -> Domino Designer) but that didn't work for me.
The final answer was to go to each form's properties box and link it to it's corresponding xpage (second tab form properties). (see answer marked as correct for a link to IBM with a better explanation)

#SetViewInfo - Issue when clearing filter

I have a problem that have me stumped.
I have been searching for a solution, but haven't found a working one yet. The solutions I seen introduces other issues.
Here is the scenario:
I have a frameset with two frames: 'Navigator' and 'Main'.
In the 'Navigator' frame I display a form called 'Navigator'. It contains an outline, to display a menu.
In the 'Main' frame I display the view selected by the user in the navigator.
So this is a very traditional Notes client application.
I now want to add a checkbox at the top of the view (in the action bar), allowing the user to filter the view by his/her own name. I use #SetViewInfo for this, and it all works perfect.
The issue is when the user switch views. The #SetViewInfo filter stays active when switching to a different view, so after some searching I found some solutions:
In http://www-01.ibm.com/support/docview.wss?uid=swg21204481 IBM suggests to put the following code in the QuerySave event:
#SetViewInfo([SetViewFilter]; temp ; 0 ;1)
When I am switching view or closing the view, I get the error message "Cannot execute the specified command".
In http://www-10.lotus.com/ldd/bpmpblog.nsf/dx/using-setviewinfo-in-a-notes-client-application-to-create-a-user-specific-view Andre Guirard suggests to put the following code in the QuerySave event:
#SetTargetFrame("frameName");
#UpdateFormulaContext;
#Command([OpenView]; #Subset(#ViewTitle; -1));
#SetViewInfo([SetViewFilter]; ""; "columnName"; 1)
I modify this to match my frame name and the programatic name of the first column in my view:
#SetTargetFrame("Main");
#UpdateFormulaContext;
#Command([OpenView]; #Subset(#ViewTitle; -1));
#SetViewInfo([SetViewFilter]; ""; "Adjuster"; 1)
This works perfectly when switching between view. But when I close the application while I am in this particular filtered view, the application is re-opened automatically. This happens no matter if the filter is enabled or not when closing the view.
However, when the view repopens, the frameset is not reloaded, it is just the view with the built-in view navigator to the left.
I finally got this to work by (in the built-in view navigator) selecting another view that the one where I filter data. This fixed the issue for a while, but then it starts again, and the filtered view is active in the navigator.
Obviously it is the OpenView command that is causing this, but if I remove just that line, I get the "Cannot execute the specified command" error again.
Any suggestions/pointers? I am using Notes 8.5.3 running on Windows 7 Professional.
This question can also be found in the IBM developerWorks forum for Notes 8.5:
http://www-10.lotus.com/ldd/nd85forum.nsf/DateAllThreadedWeb/08c73910571306c485257b2b0061ef91
First thing, I would suggest to make sure your view frame is always called "NotesView". You will have much less compatibility issues if you do this.
Secondly, I presume when you say you put it in the QuerySave event you really mean the QueryClose event? Views do not have a QuerySave event.
Thirdly, I find the #UpdateFormulaContext line is not needed. This is what I have in my view QueryClose...
#SetTargetFrame("NotesView");
#Command([OpenView]; #Subset(#ViewTitle; -1));
#SetViewInfo([SetViewFilter]; ""; "<programmaticColumnName>"; 1)
And I can close the app while in the view without any problems.

Issue after editing Search Properties in coded UI?

We are using coded ui test using visual studio 2010.We are testing .Net 4.0 windows application.
Here is an scenario.
We have an windows app which has a button named submit and we have recorded a workflow which clicks on submit.
Now when we generate code using coded ui the serach criteria for the button is based on its name (display name of button).
If tommorrow developer changes the button's text to submit1 , our scripts fail.
We tried using "controlName"[name given to the control and not the display name] property in search criteria instead of Name , but it does not work.
We get following error - "The playback failed to find the control with the given search properties"
Related problem happens to me also. I solved it by sending the Focus to the UI control before using that control.
Try this.
this.UIAssettePresentationsWindow2.UINOWindow.UINOButton.SetFocus();

Resources