getautosuggestdata type is not supported - asp.net

I am using Google AutoSuggestData. It's implemented fine and working in a page
but when trying to implement in another page it gives error
system exception :getautosuggestdata
type is not supported

It looks like you forgot to include the DataType property when including the control in the new page. If you set a value that it doesn't recognise, you get an exception like "getautosuggestdata type 'Foo' is not supported", so I guess the error see is what will happen when the property is empty.

Related

Thymeleaf Pagination Url Failed to Convert String to Long

So I'm trying to paginate results where I have a page with a path variable, and the Thymeleaf th:href keeps telling me Failed to convert value of type 'java.lang.String' to required type 'java.lang.Long'
So I added an object called "StudySet" to the model in my controller method, like this
modelAndView.addObject("studySet", studySetById);
And then I try to use it in a th:href in my HTML like this
th:href= "#{${studySet.id}/?page=} + ${page}"
But my URL just shows up like this
http://localhost:8080/studySet/$%7BstudySet.id%7D/?page=2
When I want it to look like this
http://localhost:8080/studySet/8/?page=2
8 is the id of the "studySet" object.
So if anyone has any idea on what I'm doing wrong and could let me know, that would be awesome, thanks.
ok, I reproduced your problem and here is a solution:
th:href= "#{{studySetid}/?page={page}(studySetid=${studySet.id},page=${page})}"
here is a reference for further reading

In Google Tag Manager, getting, "Expected a string value for field: "contentGroup1". but found: "object"

I'm trying to set up a content grouping. WordPress is pushing the blog tags into the data layer as pageAttributes. I've got a custom data layer variable in GTM reading this and labeled as blogTagsArray. I used this variable in a tag to set up the content grouping, firing on blog pages. When I debug, everything is firing, but I get an error message:
Expected a string value for field: "contentGroup1". but found: "object".
Is there a second step I need to take to convert the object into a string? Or is there something I can do in this step to correct this?

Actionscript error

I have a flex application which is configured with blazeds sever and i am pulling images from remote database from my flex application, but as soon as i click the get image button to pull images it is giving some action script error.
TypeError: Error #2007: Parameter bytes must be non-null.
at flash.display::Loader/_loadBytes()
at flash.display::Loader/loadBytes()
I tried googling but couldn't found any solution.
Any help is appreciated.
You have a null parameter inside the function flash.display::Loader/loadBytes(). ;)
Short answer is that you're probably fetching the wrong url. Use firebug or Fiddler or something to determine whether the url is correct. If that's not the case, maybe you're not handling the right events.
Like the comments say, we need the code.
Thank You everyone it was a my code error, it give this error if no value is returned to load bytes . I was pulling a image from a table where no image was present and therefore returning null value in load bytes.

When am I able to access the ASPError object?

I've begun using ASPUnit to unit test my classic ASP code. This is all good and I'm happy. The only problem is with the error messages it displays when a test generates a runtime error. For example, if I've not defined a variable somewhere in my function I get the error:
Microsoft VBScript runtime error (500): Variable is undefined
What would be more useful is if it could tell me which file/line the error occurred on. I know that I can get this information from the ASPError object which is returned by the Server.GetLastError() and elsewhere in my project I have a custom 500 error page which makes use of this method to automatically report crashes to Fogbugz. However when I try to access Server.GetLastError anywhere else the information returned is blank. For example, the following code will output zero rather than the expected 4.
<%
Option Explicit
On Error Resume Next
aVariable = "hello"
Dim errObj : Set errObj = Server.GetLastError()
Response.Write errObj.Line
%>
Is this the correct way to access ASPError or is it only possible on custom error pages? Is there a better way to get error messages reported within ASPUnit?
To the best of my knowledge the ASPError object does not get populated until your current page finished processing. Its meant to only be used on the 500 error page only. So theory is when you get an error if you've set up your 500 page then IIS will do an internal redirect to that page to allow you to at least record the error. Then and only then is the ASPError object available. I've had crazy ideas of using a xmlhttprequest to try to grab the page but thats just not the way it works.
In short there is not much you can do to get that error message details that you want.
Using JScript server side you can use try catch's which give you access to a exception object but even thats not much good to you, no line numbers or anything. Rubbish.

ognl.MethodFailedException "setCreatedDate" failed for object com.security.data.PasswordHistory#d5b561

i am using strut2.1.6 with tomcat 5.5
i have a Date field createDate in my PasswordHistory Bean, and corresponding date component on my "search.jsp" this field is optional - no validation required .
if i submit the form i am get the follwoing error on console
ognl.MethodFailedException: Method "setCreatedDate" failed for object com.security.data.PasswordHistory#d5b561 [java.lang.NoSuchMethodException: setCreatedDate([Ljava.lang.String;)] –
it looks that it is trying to convert the empty string to date, when it fails it tries to search the corresponding String argument method and if it converts the value to date successfully it calls the corresponding Date argument method – Muhammad Shahid
i want to avoid any conversion if the field is emtpy.
Do you have struts.devMode = true in struts.xml? From the docs:
And thirdly, perhaps the setting which is less widely known, and therefore a source of much confusion: it will raise the level of debug or normally ignorable problems to errors. For example: when you submit a field which cannot be set on an action 'someUnknownField', it will normally be ignored. However, when you're in development mode, an exception will be thrown, telling you an invalid field was submitted. This is very useful for debugging or testing large forms, but can also be confusing if you're relying on parameters in your request that are not set on the action, but which you are using directly in your view layer (warning: bad practice, you should always validate input from the web).
http://struts.apache.org/2.1.6/docs/devmode.html

Resources