I'm working on genexus 17U6 with wwp. When I don't insert an attribute that refers to another transaction, the error "Not found 'CODART' (for example) appears below it, but Codart is the name of the attribute in the table and it is often not understandable. The attribute in question has a description, title, column title and contextual title set but they are not displayed anyway.
How can I change the error message to make it more understandable? I'm searching in the language object but I can't found a way
I think the RefMsg rule comes in handy. This rule allows you to customize the messages when the "Referential Integrity" fails.
Let's assume you have two transactions, "Articulo" and "Factura" and they are tied by the "CodArt" in a 1-n relationship. So, when you're inserting an "Articulo" in your "Invoice" that doesn't exists, the "Not found 'CODART'" message appears.
In this scenario, you have tu put a rule in the "Invoice" transaction like this:
RefMsg('Ingrese un codigo de articulo valido', CodArt);
Thats it.
You can check the wiki for more information here
Related
I am confused about wiring up my own datasource to the Kendo Scheduler. I looked at their API and I'm still confused. For instance, I see it says the start and the end are required, but are they the names of the fields in my dataset? They can't be mapped to another name?
My dataset has some other details as well as a date in the format, "2016-10-20T00:00:00." Is this going to work?
Can someone tell me if the actual field names from the DB/JSON are literally the same as in Telerik's docs? For instance, my date field isn't called "Start" and End. It's something else, and I don't even have an end, and I don't have starttimezone and endtimezone, are these all needed?
Another question I have is: I'm not limited to just the fields from their documentation am I? I have a datasource that has other things, for instance, we don't have "title," we have something else. And riding off that question, I'm hoping that when I call the pop up when the user double clicks on a time/day or event, that I can customize what fields I want to appear.
The other question is: What is the "from" attribute/property for? For instance
end: { type: "date", from: "End" },
Thanks
My two cents on this:
I think the options "Title", "Start" and "End" are the ones that are always needed on the dataSource. "startTimezone" and "endTimezone" are not always needed.
I also think that the "from" attribute/property is a reference to from where you are getting that data. I mean, which field from the database guards a specific information.
You can also have your own custom fields to the model, as long as they came from a valid field from the database and as long as they have an correspondent and valid datatype value.
At last but not the least, you can also customize what fields you can make appear once you do double-click and the pop-up window shows up. For that, you must use your own template for a custom pop-up editor.
Hope this gives you some insight.
Thanks for the help. I figured out the core issue with the error. It was a matter of me tweaking my schema model.
Is there any documentation about how the -[NSResponder presentError:] method works? I'm trying to create NSError instances in my library whose userInfo values show as much useful information to the user as possible. I'm having a tough time.
I started out using just NSLocalizedFailureReasonErrorKey. Seeing that it assigned the messageText property of the generated NSAlert (bold font, topmost label), I next tried adding on NSLocalizedDescriptionKey, which I thought would then fill in the informativeText property, for a non-bold explanation under it. I also added NSURLErrorKey, since this library deals with files and it would be helpful.
The resulting NSAlert doesn't show the original NSLocalizedFailureReasonErrorKey value at all, with the new NSLocalizedDescriptionKey now becoming the messageText. It also doesn't expose the NSURLErrorKey at all, either.
Is my only option to write my own error presentation method and special-case this library's domain?
How the NSError keys interact with presentError: is documented in the Error Handling Programming Guide under Localized Error Information.
It includes a diagram detailing what goes where. As the docs note:
Failure reason
A brief sentence that explains the reason why the error occurred. It is typically part of the error description. Methods such as presentError: do not automatically display the failure reason because it is already included in the error description. The failure reason is for clients that only want to display the reason for the failure.
If you want to rearrange the fields in an NSError object prior to presentation, this is best done by overriding willPresentError: to return an adjusted error object.
Regarding fields like NSURLErrorKey, it is expected that you will have included this in NSLocalizedDescriptionKey or NSLocalizedRecoverySuggestionErrorKey if you want to display it. While it is called the "recovery suggestion," the documentation is explicit that it may be used "as a purely informative message supplementing the error description and failure reason."
Breeze's default validation messages use the database field name as part of the displayed error message; such as, "EmpTeleNo is required". Obviously, this probably shouldn't end up in the production version of our software.
But as we approach delivery of our software, it was hoped that this might be fixed, perhaps by inspecting the "Display" attribute from the model or something like that. As far as I can tell, this issue still remains.
Has this problem been resolved or has anyone figured out a work-around?
Thanks.
This is not YET well documented but you can simply set the 'displayName' property on any dataProperty and this will override the autogenerated display name and will be used for all validation messages for this property. So
var custType = myEntityManager.metadataStore.getEntityType("Customer");
var dp = custType.getProperty("companyName");
dp.displayName = "My custom display name";
Also, see the "Customize the message templates" topic at the bottom of this page: http://www.breezejs.com/documentation/validation.
There is also an item on the Breeze User Voice that requests something very similar to what you are asking for. Please vote for it.
https://breezejs.uservoice.com/forums/173093-breeze-feature-suggestions
I have a content type called Author which is referred in another two content types called Novel and Book via Node Reference Module.So we can add author entity to both Book and Novel content types.
Both Novel and Book contain another field called Release Date.
Now I want to show a block which will display the name of book and name of novel in chronological order based upon the release date when user come to that corresponding Author Page.
Ex. Suppose A is an author who is author of BookA(Release Yr-2006), NovelB(Release Yr-2004),BookC(Release Year-2009). When user come to Author A page then he will be shown a block which will show the Books/Albums in chronological order like this:-
NovelB--BookA--BookC
Please suggest as how to achieve in Drupal 7.
You want to display the following field title (I assume the book name is the node title)
For the sorting you can use the sort option in views, it is pretty self-explaining. Choose the name of your release date field.
For the connection between author and books you will have to use a contextual filter (advanced).
Add the author-reference-field from your book/novel (the field you use to refer to the author). Then choose to use a default value (2nd option) and choose content id from url. Now your block will find all nodes that refer to the page with the current page-id. Since we chose to display the title fields, you should see a list.
Note that live preview does not work here, so you will have to go to the actual page to see the result.
UPDATE:
This works when you have re-used the same field for both content types. If you have uses more then one field you will have to use an OR operator to make the contextual filter work. Thanks to d34dman the following page was given to do just that.
Although for new implementations I would recommend using the same field (eg. reference_to_author) for all references from all content types.
Yah..I am able to solve this problem by adding custom code. I have used hook_views_query_alter method and then added join relationship and where clause as per requirement. Please refer to following article for more clarity..
http://www.midwesternmac.com/blogs/jeff-geerling/filtersearch-multiple-fields
Thanks for posting the reply and keeping my hope alive.
I was running my project and was checking recently modified module. On click of the Menu tab it was giving me "java.lang.UnsupportedOperationException" and when I checked in the log I could find the following description:
JBO-25002: Definition com.project.view.pageDefs.pages_per_SearchPageDef
of type Form Binding Definition not found
oracle.jbo.NoDefException: JBO-25002: Definition com.project.view.pageDefs.pages_per_SearchPageDef
of type Form Binding Definition not found
What could be the problem?
You say you were checking "recently modified module". What modification did you make? Was it something which invalidated the business component definition? The documentation says this about JBO-25002:
"Provide a correct name for the business component definition. If the
definition is not in the classpath, you must include it there. Names
are of the format
myProjectPackage.BusinessPackage.BusinessComponent. This error can
also occur if there is a case conflict, as when the database expects
"DEPTNO" and receives "Deptno" instead."
I got this error after changing a query in my View Object. The change removed 3 columns but in the PageDef file the tree binding retained the old column names. I manually removed those column names to fix the problem.