charu shila

Greenhorn
+ Follow
since Nov 24, 2001
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by charu shila

Hi All
I have created my classes like this


class Person{

String email
String password

static constraints={
email(unique:true)

}

}


class JobSeeker extends Person{


}

class Recruiter extends Person{


}


and Bootstrap.groovy is..


class BootStrap {

def init = { servletContext ->


new Jobseeker(email:"aa@bb.com",password:"bbbb").save()
new Recruiter(email:"aa@bb.com",password:"bbbb").save()
}
def destroy = {
}
}



Since emails for Jobseeker and Recruiter are the same, why am I not getting any errors.


Thanks
9 years ago
Hi All
If I enter something like Grails is a really cool framework
How do I display the text in bold.If I use encodeAsHTML() method it shows the html entities.

Regards
James Bond
12 years ago
Hi All
Could somebody please help me with this?

regards
13 years ago
Hi All,
I am working with Grails 1.1.I have a userLogin action which validates a username and password and forwards to the view.In the view I am displaying a message like "Welcome ......$(username)" which is displaying the correct username.But when I press Ctrl+N keys and open another browser window(firefox) it still displays the same message.I am trying to display the default page and not the one where the user has already logged in.I have also tried setting the following response headers

response.Pragma='no-cache'
response.Cache-Control='no-cache'
response.Expires='-1'

in the userLoging action but for some reason the browser doesn't seem to clear the cache.Could somebody please guide me in the right direction.

Regards
bond
13 years ago
Hi All,
Anyone know when is www.javaspec.org coming back on?
Regards
13 years ago
Hi All,
Could somebody please tell me how to handle concurrency issues in Groovy?


regads
13 years ago
Hi All
Thanks for all the replies.Now if we go here it says that the private field of a superclass might be accessible to a subclass if both classes are members of the same class .What does that mean?

Regards
14 years ago
Hi All,
Thanks Ernest and Bridget for your prompt reply.But the specification says that it is not inherited.Now I have modified the program thus

class ParentClass{
private String name;

public ParentClass(){
this.name="sam";
}
public String getName(){
return name;
}

public void changeName(String newName){
this.name=newName;
}
}
public class ChildClass extends ParentClass{

public String getFullName(){
return getName();
}

public void changeName(String changedName){
super.changeName(changedName);
}


public static void main(String[] args){
ChildClass cc= new ChildClass();
System.out.println(cc.getFullName());
cc.changeName("James Bond");
System.out.println(cc.getFullName());

}
}


Now if the private variable is not inherited then it is not a property of the subclass.But the program suggests that the private variable is a property of the subclass and changeable.

Regards
14 years ago
Hi All,
Reading about private here.It says that you can't use a private variable declared in your superclass in your subclass.I wrote a code :

class ParentClass{
private String name;

public ParentClass(){
this.name="sam";
}
public String getName(){
return name;
}
}

public class ChildClass extends ParentClass{

public String getFullName(){
return getName()+" de Souza";
}


public static void main(String[] args){
ChildClass cc=new ChildClass();
System.out.println(cc.getFullName());

}
}

Looking at the above code I can see that the ChildClass inherits the private variable and uses it to return the full name.

Can somebody please clear my doubt?
Regards
james
14 years ago
Hi All,
Could anyone please tell me what happened to this site www.javarules.com.Also what happened to Doug Dunn?I haven't seen any recent material written by him.

Kind Regards
James

[ UD: fixed URL ]

[ November 01, 2007: Message edited by: Ulf Dittmer ]

[ MP: Added the URL to the subject to attract more attention ]
[ November 01, 2007: Message edited by: Mapraputa Is ]
14 years ago

Can I start using j2sdkee server from Sun on Win 98.If yes how can I start using it.

cheers