Nov 4, 2017 17:48
Could be. Btw, having @Jsonignore on the Id didn't help. Thanks for the advice anyway
Nov 4, 2017 17:47
Take a look at this screenshot to get an idea where it starts to loop: prntscr.com/h67o75
Nov 4, 2017 17:46
Hello @aliakbarazizkhani
Nov 4, 2017 17:44
@aliakbarazizkhani I'll try it right now. You can see the whole User.java class in my post. And yes, I am using Spring Data Rest (I have spring-boot-starter-data-rest in my pom.xml
Nov 4, 2017 17:44
@aliakbarazizkhani No, this is the only User.java entity class, I ran debug once again and made 100% sure that no annotations are present and then I re-pasted the part of output (you can re-check it - it's probably the same). There is another entity class named Company but it is in no way connected to this User.java entity class.
Nov 4, 2017 17:44
@aliakbarazizkhani I've added a part of the console output, is that what you asked for?
 

PHP

Support group for those afflicted with PHP. Don't ask to ask, ...
Jan 9, 2015 17:12
Thanks
Jan 9, 2015 17:11
Zend docs say:
Example Usage

// Pass in the route/url you want to redirect to after the POST
$prg = $this->prg('/user/register', true);

if ($prg instanceof \Zend\Http\PhpEnvironment\Response) {
// returned a response to redirect us
return $prg;
} elseif ($prg === false) {
// this wasn't a POST request, but there were no params in the flash messenger
// probably this is the first time the form was loaded
return array('form' => $myForm);
}

// $prg is an array containing the POST params from the previous request
Jan 9, 2015 17:11
I'm back :) As I'm dealing with standalone ZF2 form, how do I instantiate the Zend PRG (no framework/controller involved)
$plugins = $v->getHelperPluginManager();
Jan 9, 2015 16:05
@ErikBaan OK, I should probably look into PRG stuff as that seems to be the best practice and I'm always trying to learn good things. if that fails I'll try the second option you recommended. Thanks!
Jan 9, 2015 15:59
@ErikBaan I'm using $form->setData($_POST); to set the data to be validated. That stays after the form submits. Isn't there any native ZF2 function that would "unset" this after form submission so that my inputs are cleared. I may have to foreach each input to set its value to ''. Doesn't look so nice though
Jan 9, 2015 15:48
@ErikBaan I'm implementing a standalone ZF2 form. What would you recommend for me to call inside a file where I'm rendering the form?
Jan 9, 2015 15:44
Too bad ZF2 didn't come up with such a function as everything is so extensible and configurable anyway
Jan 9, 2015 15:34
Hello folks. In ZF2 what is the recommended way of clearing all form input fields after successful submission? Thx
Jan 9, 2015 12:09
@Ocramius OK, I'll try putting the validation run inside isPost if statement - that probably should do the trick. Thx
Jan 9, 2015 12:05
OK, take your time, I hope you're going to reply though
Jan 9, 2015 12:04
@Ocramius Sorry, one more Q. On page load my form now initially displays the errors. Have any quick ideas what I might be doing wrong?
Jan 9, 2015 12:01
@Ocramius Thank you, this $form->isValid() line makes sense to me now. My question at the SO received so little attention so I remembered the chat.
Thanks again!
Jan 9, 2015 11:59
@Ocramius Another thing I just remembered. Without that line before the form (so no validation run) I am able to call and get error messages by doing $form->getMessages();
Is that weird of perfectly normal?
Jan 9, 2015 11:57
@Ocramius And then, I can (below the form) have an IF statement to take actions based on the return (bool) value of the isValid() ?
Jan 9, 2015 11:57
@Ocramius So you're saying by that line I'm running the validation (Inputfilter)
Jan 9, 2015 11:56
@Oc
Jan 9, 2015 11:56
I thought I need to do below the form:

if($form->isValid())
Jan 9, 2015 11:55
Alright, I'm trying to create and validate a form as a standalone component, without ZF2 framework. Now, it won't show validation errors below fields unless i put above the form this: $form->isValid() (I saw this in their official docs)
Jan 9, 2015 11:53
hello, any Zend2 developers here? I have a question
Nov 3, 2012 19:28
@PeeHaa There?
Nov 3, 2012 19:16
@Nick yes :p
Nov 3, 2012 19:14
@tereško It's not totally related to JS as I feel the problem is somehow in the HTML form
Nov 3, 2012 19:14
@PeeHaa I've just logged the value and it is 1 (even though I selected the other one which has the value of 0)
Note: I've put the console line in my jquery function? Is that the right way?
 
May 31, 2014 08:13
bye
May 31, 2014 08:12
thank you. good night, i will accept your answer
May 31, 2014 08:12
so i'd say you solved the problem :)
May 31, 2014 08:11
(with the loop commented out)
May 31, 2014 08:11
the other one - misfires occasionally like before
May 31, 2014 08:11
with $q.all not a single misfire ( i called it like that, makes sense to me)
May 31, 2014 08:09
works nice... i have the same service and the same directive but in another controller (without $q.all applied) so i'll do the same there and see
May 31, 2014 08:07
it will misfire
May 31, 2014 08:07
let me see if
May 31, 2014 08:07
the damned thing is shown as supposed
May 31, 2014 08:07
i just commented out that loop and
May 31, 2014 08:07
interesting
May 31, 2014 08:06
maybe the foreach is not necessary
May 31, 2014 08:06
after the loop, nothing, not even undefined
May 31, 2014 08:05
before the loop it give me object
May 31, 2014 08:05
hmm
May 31, 2014 08:02
but if i console.log ($scope.c) it's undefined
May 31, 2014 08:02
if i alert a string from there (q.all callback) it will fire
May 31, 2014 07:56
note that even $scope.formBusy = false is not being picked up so my form stays dimmed (busy looking)
May 31, 2014 07:53
hey