Why is an error not produced when following the Recess 'Controlling the Controller' doc? - recess

According to the section 'The Controller-View Relationship' located in http://www.recessframework.org/page/controlling-the-controller :
Try removing the body of the printIt method and refresh to get an error indicating no view template at 'helloWorld/views/printIt.php' can be found.
I tried this and upon refreshing the page, saw []. I checked the response header and it was of type application/json. Could this have something to do with it? I've tried installing Recess on another machine and it resulted in the same behavior.
Can someone tell me how to get an error???

Related

URLFOR misbehaving with Image attachment?

Trying to do something which is very simple but am getting strange results.
I have an image stored as an attachment which I want to display in a VF Page.
If I do this it works fine
<apex:image url="{!URLFOR($Action.Attachment.Download,'00PR0000008Q3YmMAK')}"/>
However that was for testing purposes that I hardcoded the id. If I try reference the Id in the object then it fails. Even though the value contained in the object is exactly the same as above.
<apex:image url="{!URLFOR($Action.Attachment.Download,model.PreviewImageAttachId)}"/>
When I load the page I get an error in URLFOR param!!!
I thought my problem was because model.PreviewImageAttachId was a String and not an Id so I created a wrapper to return it as an Id - same error.
I then decided Salesforce must have some strange requirement that you can only pass in the REAL object so I did that and passed in model.Attach.Id and it still fails!!
Please can someone explain this to me and more importantly suggest a solution??!?
Once again if I output to the page
{!model.PreviewImageAttachId} i get 00PR0000008Q3YmMAK
So I just cant explain this!
Thanks!
My bad...
Was using apex:repeat and turns out SOME of the id values were null.
Hence the error

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.

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 2.0 ReCaptcha plugin always wrong

I've taken a reCaptcha plugin from this guy
(github link of the plugin)
I've entered the following code form in my view:
[form creation]
[table]
[inputs]
[/table]
echo $this->Recaptcha->show(array('theme' => 'white'));
echo $this->Recaptcha->error();
[/form]
I've followed the steps suggested, and the reCaptcha window appears properly, but no matter what I enter in the captcha, it never gets verified and I always receive the 'message' field of beforeValidate (I've set it to "You've entered a wrong message" etc).
I'm not even sure how to debug it to see at which point it fails. Even if I just replace all the code in checkRecaptcha function with "return true" to try and skip the validation with the keys and just see if the rule itself is correct, it still remains the same, and I'm generally not getting any of the specific incorrect-captcha-sol messages that I read around.
Am I correct to assume that the only code I need inside my controller function (assuming I've already included the component and helper in the controller) is Configure::load('Recaptcha.key'); and no further manual validation checks?
(unfortunately I can't link you my whole project due to rights)
I had a similar issue. Try removing the 2 response and challenge field lines in the component and overwrite them with these:
$controller->$modelClass->set('recaptcha_response_field',
$controller->request->data['recaptcha_response_field']);
$controller->$modelClass->set('recaptcha_challenge_field',
$controller->request->data['recaptcha_challenge_field']);

Dojo ItemFileWriteStore issue with IE7

I have a grid that is embedded within a ContentPane which is in a tabContainer. When loading the itemfilewritestore IE7 pops an error.
Code:
var theData = {identifies : id , items[]};
var theStore = new dojo.data.ItemFileWriteStore({data: theData});
console.debug(theStore); // this throws some weird error
error:
{close:function(_81)if(!this.isDirty)........There are unsaved changes present in the store Please save or revert the changes before invoking close.
This error only shows itself in IE7. FF has no problem and renders the data properly. And yes I know there is no data in this code but in the real code the data is added later.
This issue was not as described. The error was not the store in any way. After digging around more, I found out that the real problem was a parsing on a javascript that was being imported. Going step by step through it the problem was because a JSON object was using the term "class" as an attribute. This seems to be against the IE "standards".

Resources