How to solve an Error with no message in Oracle Adf? - oracle-adf

I'm receiving an Error with no message on a button click event in Oracle Adf. It's just showing 'Error' and a '-' symbol in the next line. There's nothing much showing in console also. How to fix this?

Do you invoke a method on that button , or you have some action listener attached to it?
- If you are invoking a method which throws an exception without a message you'll get "Error - " message. If you have such method, try to surround it with try/catch block and make sure you print the stack trace in corresponding catch block.
-If you have button which is directly bound to a method in a page definition, try to use option (on right click) which converts an action listener to a action which calls a new method in backing bean
- If you have third case, than I suppose we'll need more details about your button and its properties :)
Regards

Related

Umbraco cms AngularJS Regular Expression Keep appearing

Umbraco uses angularJS as based library and backoffice totally developed on it. The reason telling first is to tell that I have a field on which URL regular expression applied. If someone entered invalid url like below image
it shows error as need.
But if a user try to remove whole text by selecting it and removing at once. It still keep appearing the error like this
However, if a user erase text one by one like this
then the validation error removed and user need to click on button to see error again.
I would to know how screen 3 state can be achievable when user remove all text together? Its really annoying behavior for a user to remove text character one by one to refresh the state of the field. Screen 3 state should be applied on screen 2.
Can anybody tell me how it can fix or achievable? Right now, it seems like a default behavior.
Looking forward to hear from you guys. Suggestions will be much appreciatable.
Regards o
I've looked into this issue. This seems to be a product bug.
When you remove whole text at once, newValue is an empty string and the code responsible for resetting error messages doesn't run. If you have access to the umbraco code, you can easily fix it by removing highlighted check:

oracle.jbo.InvalidObjNameException: JBO-25005: <some pagedef>of type Iterator Binding Definition is invalid

I have a adf application and on visiting to a page this exception is coming.
Its coming randomly and upon searching on google not getting any specific solution. Sometimes its coming on table row selection, sometimes its on clicking a button. Please suggest what is the cause and how to fix it.
Exception like:
oracle.jbo.InvalidObjNameException: JBO-25005: Object name oracle_jbo_uicli_binding_JUIteratorBinding_281 of type Iterator Binding Definition is invalid.
The issue got resolved by adding attribute EnableTokenValidation="false" in pagedef file.

ModernDialog.ShowMessage Error: "Cannot set Owner property to a Window that has not been shown previously."

I am having an issue, same as _benji here https://stackoverflow.com/questions/28053087/cannot-set-owner-property-to-a-window-that-has-not-been-shown-previously, whereby I cannot get the ModernDialog to show the message, has anyone had and solved this issue before?
System.Windows.MessageBoxResult response = ModernDialog.ShowMessage("Cannot connect; try again?", "Connection Status", MessageBoxButton.YesNo);
Thanks
Error suggest the place you are calling the code from, has not yet shown any window to the user. You need to first show a window to the user before trying to show it, or make sure you show the dialog before closing the last window.

Usually the form is POST, but in a single instance it is GET

I do a standard pattern in my application - a link to /controller/delete/object_id, then a post form to "confirm", a check if $this->request->is('post') and if true - the controller deletes the object from database.
What is weird is that for a single, particular object_id, my browser (Firefox) forces the form to be a GET one. With any other object_id everything is ok, but with this particular one, despite all declarations within form tag and etc. brower generates a GET request.
Do you have any clue what this might be?! I even tried to use brower's private mode, because I thought it can be some garbage in browser cache, but the bug is still here.
I managed to bypass this problem:
define a specific action in form->create, pointing to your controller' method
add a hidden field with object_id
add some additional code in the controller method to get object_id from $this->request->data, because a hidden post field is not passed as an argument to method, as it is with GET method.
This way, to some unknown reason, it just works. Anyway, I still feel I'm doing something wrong. It's not as "clean" as I would expect.

cakephp: delayed flash messages

Is there any functionality that allow me do something like flash messages in cakephp? I don't want to use session, because it shows flash message on the next page.
For example:
user type link with mistake mysite?action=mistake and i want to check in controller if there isnt mistakes like this so i have array with some actions which are allowed and i check if $this->params['url']['action'] is there. If it isn't i want to show error to user , but this error shows only on second page (or if i reload). How can i avoid this?
The error you see is just a div with a concrete style. Something like:
<div id="flashMessage" class="error-message">Error</div>
What you could do is check with Javascript whatever you want to check and if it is not as expected, append the error div wherever you want.
That's what I have dont in some forms to show the error in real time.
If you want something more elaborate you could try this:
http://www.alfbd.com/cakephp-ajax-form-validation-with-jquery-and-jsonview/

Resources