I've :

def userList = [];
if(!User.findAllByGrade(10)){
   userList.add(new User());
}else{ ..... } 


<g:each in="${userList}" var="user"> 
<!-- my big form -->
</g:each>

I have to display an application if the user is available or otherwise ... and so i just add "dummy" user towards the list. However it will produce errors:

Message: object references an unsaved transient instance - save the transient instance before eliminating: User Triggered by: object references an unsaved transient instance - save the transient instance before eliminating: User

I possibly could use copying the forms, however i just question how you can solve this ...

What about the if-else taglib:

<g:if test="${userList}">
     <!-- Your form for no-user case here. -->
</g:if>
<g:else>
     <!-- Your form for g:each case here. -->
</g:else>

A little dirty, however it should work:

def userList = [];
if(!User.findAllByGrade(10)){
   userList.add([:]);
}else{ ..... } 

So rather than developing a new User instance, just add a clear hashtable towards the list when the result does not look ok, you have to perform a little more work:

def userList = [];
if(!User.findAllByGrade(10)){
   userList.add([name:"", age:"", foobar:""]);
}else{ ..... } 

I.e. create records within the hashtable that match the characteristics of User.

What about adding null towards the list rather than new User() after which, in gsp, mentioning to user's qualities using safe navigation operator .? (like user?.name so NPE would not be tossed)

Therefore the code is going to be a lot more like:

def userList = [];
if(!User.findAllByGrade(10)){
   userList. << null
}else{ ..... } 


<g:each in="${userList}" var="user"> 
<!-- my big form -->
    <g:textField name="name" value="${user?.name}" />
</g:each>