Java : ADF control value cannot be displyed on browser - java

binding adf control value to a bean property and run the jsf or jspx file on browser , then value can not be displayed
Here is a vidoe to explain the problem .. would you please have a key
for this . can not execute a lot of work because of this
https://www.facebook.com/mohamed.morsy.71697/videos/1449889981768665/

You will need to wrap the output text inside a group component ( maybe a panel group layout) and set it's partial trigger property with the button Id. This way the panel will listen button actions and is how the text will be updated when you click it.

Related

This content cannot be displayed in a frame - eclipse (displayHelpResource(href))

I'm trying to open a URL in my application through the displayHelpResource(href) function.
But I'm being shown the following :
This content cannot be dispalyed in a frame
To help protect the security of information you enter into this website, the publisher of this content does not allow it to be displayed in a frame.
I've understood that the site is blocking the Frame access. What can be done to open the desired URL using the displayHelpResource(href) function.
You can add noframes=true to the href you stop frames being used
http:xxxxx?noframes=true
The noframes=true text is removed from the href by the help system before it is actually used.

Make dynamically created AttributeDefImpl read only after it is populated

I am new to using the ADF framework. I am dynamically creating view objects that appear on a JSF front-end page. I want to create a dynamic view on the front end that cannot be edited once it is populated and rendered. My code is as follows:
AttributeDefImpl dynamicViewAttribute = dynamicViewDef.addViewAttribute(name, alias, javaType);
dynamicViewAttribute.setUpdateableFlag(AttributeDef.READONLY);
This fails as once the view object is set to READONLY, it cannot be updated. If I change the line of code as follows:
dynamicViewAttribute.setUpdateableFlag(AttributeDef.UPDATEABLE);
There is no error and the page displays correctly, but the user can edit/update the text in the view object.
How can I accomplish what I need i.e. display the view object text without letting the user edit/update it? Remember this has to be dynamically created so I cannot set readOnly=true on the jsf.
If this will be dynamically determined , then you can send your flag or Attribute i.e ("IsReadOnlyFlag") in the ViewObject.
in your jsf page change the attribute readOnly for
the inputText to readOnly=#{bindings.IsReadOnlyFlag.inputValue eq 'Y'}

Show or Hide Jsf Richfaces modal panel from java bean

In JSF Richfaces, I need to show or hide modalpanel and GIF image from bean according to certain functions.
For example, after I have entered all values and click submit means, processing GIF image will be displayed. At the time of completion it gets hidden by using
onclick="#{rich:component('wait1')}.show()",
oncomplete="#{rich:component('wait1')}.hide()"
wait1 is an image file name I have used.
At the time of submitting, I have been validating the required fields.
If its empty, I want to hide the process image and show the modalpanel to get value from user.
How to hide the processing image and display the modal panel to get input from user, from java back bean?
Thanks in advance
I am suggesting you a solution. Create Modal panel with property "showWhenRendered" .
create modalpanel as
<rich:modalPanel id = "idd" autosized="true" width="500" height="50"
showWhenRendered = "#{bean.booloeanvalue}">
</rich:modalPanel>
In Bean, create boolean variable booloeanvalue. If booloeanvalue is true, automatically modalpanel is rendered and came to display.

Richtext field (CKEditor) doesnt keep value after 2nd submit for new(unsaved) document

I have a serious problems with richtext field in my app. (Domino R901). I have extracted the scenario into simple Xpage with just one field and submit button only.
I have simple XPage now, with one field and submit button. RT field looks like this:
<xp:inputRichText id="inputRichText1" value="#{docui.body}"></xp:inputRichText>
Plus there is a standard button which runs JAVA action below with full submit:
This action is called on button click:
public void r(DominoDocument docui) throws NotesException {
Document cdoc = docui.getDocument(true);
if (cdoc.hasItem("body")){
print("Body exist");
} else {
print("Body doesnt exist");
}
docui.setDocument(cdoc);
}
Now when I enter some text into rich text field (CKEditor) and click on submit, it reloads the page (full submit) and I can see the text in CKEditor properly. Now when I do it 2nd time, text disapear and even in my JAVA code it says, that 'Body doesnt exist'. The problem seems to lie in fact, that CKEditor doesnt send content to server, when there is no change to it ... see here richtext control doesn't store the input content . I understand this behaviour for saved existing document, but when you have a new document, it simply doesnt submit value during second submit because it doesnt changed between requests. But because its a new unsaved document the value is simply discarded / lost . Is there any workaround how to deal with this?

How to create Multi step form

We want to give option to author to create multi steps tabs or wizard. This number of steps/tabs should be configurable in Form Start component in Edit button. Once author selects the number of steps/tabs then steps/tabs will be created automatically and then author can drag and drop other components like "File Upload", etc.. Please refer to the attached screenshot.
Kindly let me know how to proceed on this.
You can try to leverage the OOTB tabctrl component provided in geometrixx-outdoors along with the OOTB form component. The only customization needed would be changing the form end component to accomodate prev and next buttons, and then adding a bit of javascript to navigate the tabs on click of those buttons.
Steps to create this.
Drag and drop the default form component on page.
Inside the form drag and drop the tab control component.
Configure the number of tabs required and the contents within each tab in the tab control component.
Modify the form end component to accomodate the previous and next buttons.
Attach handlers for the previous and next buttons using the following JS(currently consists only of the basic functionality. Can be modified according to your requirements).
JS:
jQuery(function ($) {
$(document).on('click', '.prev', function(){ // 'prev' is class of previous button
var tabctrl = $(this).closest('form').find('.tabctrl');
var currentItemHeader = $(tabctrl).find(".tabctrl-header li.active");
$(currentItemHeader).prev().find('a').click();
});
$(document).on('click', '.next', function(){ // 'next' is class of next button
var tabctrl = $(this).closest('form').find('.tabctrl');
var currentItemHeader = $(tabctrl).find(".tabctrl-header li.active");
$(currentItemHeader).next().find('a').click();
});
});
NOTE: Try to include the appropriate clientlibs in geometrixx site before testing this, else tabctrl wouldn't work properly. Or else, you can check this dierctly in geometrixx-outdoors site.

Categories