I'm trying to specify a custom processing message while Datatables is making an ajax call, however Dandelion Datatables provides no direct dt:config (or whatever) option to set it. I've tried to follow the documentation here and here by specifying a custom configuration property like so:
<div dt:confType="property" dt:name="global.i18n.msg.processing" dt:value="My custom message..."></div>
...with no success. What am I doing wrong, or are the properties specified in the documentation not "configuration properties"?
Just remove the group name from the configuration option, and it should work:
<div dt:confType="property" dt:name="i18n.msg.processing" dt:value="My custom message..."></div>
Related
I'm trying to use the #include_page macro from FreemarkerServlet - using Maven Freemarker framework with Freemarker version 2.3.31 and I can see the notes about this tag being now available in the source of it, but it still is not resolved/recognized in the actual template output.
For context:
Everything is fully configured and working as expected with pure ftl
We have a dependency on using JSP-only templates for a part of the output (while the main code base is using only .ftl templates)
The #include_page allows to include jsp pages into ftl
How I'm trying:
In WEB-INF/views directory, let's say there is a home.ftl
Add hello.jsp with <h2>Hello!</h1>
In home.ftl
<#assign....>
.
.
.
<div>
<#include_page path="hello.jsp"/>
</div>
.
.
.
This results in an error that statement on the line with include_page was not found on null followed by instructional on using defaults or ifs
Does anyone know if there is some additional configuration needed to make use of it?
The issue was that we needed to add the
model.put( FreemarkerServlet.KEY_INCLUDE, new IncludePage( request,
response ) );
to the FreemarkerView model.
This is the post that actually solves the problem.
To use JSP support (and include_page is part of it) you have to invoke the template with forwarding to an URL that's mapped to the FreemarkerServlet, instead of directly calling FreeMarker with its Java API. It's just how JSP works too (or have worked, originally). See https://freemarker.apache.org/docs/pgui_misc_servlet.html for details.
My custom control does not react to getAttribute("abc").setValue("123") from form js.
Do I have implement something in PCF Custom Control code?
Pls verify these.
Debug and see whether the updateView() in PCF index.ts is hitting, your control will be rendering there to get updated for any change in its property bag
Validate you have usage="bound" for the property in ControlManifest.Input.xml file
Trying to implement spellcheck and I got a message:
Web.config registration missing. The Telerik dialogs require a
HTTPHandler registration in the web.config file. Please use the
control's smart tag to add the handler automatically.
I did it by adding but still have the same message is coming up... I need some help please!
Regarding the Spell Check Handler Server Error, AjaxUrl property is used to set the path to the handler and is used in scenarios where you may have a UrlRewriter module which overwrites the handlers url even if they are set in the web.config. A correct value of this property is like follows:
RadEditor1.SpellCheckSettings.AjaxUrl = "Telerik.Web.UI.SpellCheckHandler.aspx";
Once you set the new AjaxUrl value, go to the web.config file and update the Telerik.Web.UI.SpellCheckHandler.axd instances to Telerik.Web.UI.SpellCheckHandler.aspx
Check these articles for more information about problems with handlers: https://www.telerik.com/support/kb/aspnet-ajax/editor/details/error-web-config-registration-missing!-the-telerik-dialogs-require-a-httphandler-registration-in-the-web-config-file-
and
https://www.telerik.com/forums/radspell-javascript-error
I am trying to find a way by which i can check if there is any binding error and based on them i want to show some messages to the user in Spring-MVC. i know one way of this like
<spring:hasBindErrors name="userName">
</spring:hasBindErrors>
but this seems to be with respect to a specific filed of my form, what i want is to check if there is any binding error at all for the current input form or not?
i have also experience of Struts2 and they have a very convient method hasError() which allow a developer to see if there is any error at all for the input fields.
Is there such method defined for Spring-MVC validation or not?
Not an expert of Spring-MVC as i have used it very rarely but if i am correct all you want an equivalent of bindingResult.hasErrors() and if i am correct all you need to use
hasBindErrors tag. For more details refer to the doc
hasBindErrors
Hope this might help you
Good day!
I used the Struts2 xml validation as instructed in this website.
The problem is when I clicked the submit button twice. The error message also appears twice...
My question is... how to clear the first error message before another action is processed to accommodate new set of error messages.
Thank you in advance.
If you are using the spring integration you have to define your bean as scope="prototype", then you get a new instance of your Action for every request.
The default scope for spring is singleton.
It's a good idea to do this for every Action.
Remove validate="true" from form tag.
There is a validator interceptor in the default stack. You just need to use that and using that is very simple. Just make a method in your action class by the name public void validate(). Within that validate() you can access the fields using their getters & then put the required validation onto them.
Also, with this implementation you would not have to worry about the multiple messages being shown, because it will show only the message what you set in the addFieldError method and removes any previously kept messages.
NOTE: Be sure to use getters of the variables in your validate(), because the variables in the action are not set at the time this interceptor is invoked.
Here is a link to a very nice tutorial.
http://www.vaannila.com/struts-2/struts-2-example/struts-2-validation-example-1.html
If you will keep validate=false, then validation xml will be called on submit action.
To clear messages on each submit click, if you are using table in your jsp then keep table outside of form. It will work.