This is an archive of the Maximo Yahoo Community. The content of this pages may be a sometimes obsolete so please check post dates.
Thanks to the community owner Christopher Wanko for providing the content.
I want the field to make as 'ReadOnly', once I clicked on the 'save' toolbar button.
I used the following code in my custPR.java file by overriding the save().
save(){
 super.save();
 setFieldFlags("attrname",7L,true);
}
I tried by making the super.save()in the last also, even though I didn't get the expected result.
 
Hello,
After save the MBO is going to be reinitialized (by calling the init method). Therefore you need to place your code there.
Try this:
public void init() throws MXException{
     super.init();
     if (!toBeAdded()){
         setFieldFlags("attrname",7L,true);
     }
}
Regards
Robert               
--- In MAXIMO@yahoogroups.com, "Narayana" <jsn_narayana@...> wrote:
>
> I want the field to make as 'ReadOnly', once I clicked on the 'save' toolbar button.
> I used the following code in my custPR.java file by overriding the save().
> 
> save(){
>  super.save();
>  setFieldFlags("attrname",7L,true);
> }
> 
> I tried by making the super.save()in the last also, even though I didn't get the expected result.
>
thanks for your reply,
I tried the same, but I didn't get the expected result,
can you give me some other way?
--- In MAXIMO@yahoogroups.com, "schrob_tka" <schrob_tka@...> wrote:
>
> Hello,
> 
> After save the MBO is going to be reinitialized (by calling the init method). Therefore you need to place your code there.
> 
> Try this:
> 
> public void init() throws MXException{
>      super.init();
>      if (!toBeAdded()){
>          setFieldFlags("attrname",7L,true);
>      }
> }
> 
> Regards
> Robert               
> 
> --- In MAXIMO@yahoogroups.com, "Narayana" <jsn_narayana@> wrote:
> >
> > I want the field to make as 'ReadOnly', once I clicked on the 'save' toolbar button.
> > I used the following code in my custPR.java file by overriding the save().
> > 
> > save(){
> >  super.save();
> >  setFieldFlags("attrname",7L,true);
> > }
> > 
> > I tried by making the super.save()in the last also, even though I didn't get the expected result.
> >
>
No, sorry. I always place this kind of code there and it works for me.
Regards
Robert
--- In MAXIMO@yahoogroups.com, "Narayana" <jsn_narayana@...> wrote:
>
> thanks for your reply,
> 
> I tried the same, but I didn't get the expected result,
> can you give me some other way?
> 
> --- In MAXIMO@yahoogroups.com, "schrob_tka" <schrob_tka@> wrote:
> >
> > Hello,
> > 
> > After save the MBO is going to be reinitialized (by calling the init method). Therefore you need to place your code there.
> > 
> > Try this:
> > 
> > public void init() throws MXException{
> >      super.init();
> >      if (!toBeAdded()){
> >          setFieldFlags("attrname",7L,true);
> >      }
> > }
> > 
> > Regards
> > Robert               
> > 
> > --- In MAXIMO@yahoogroups.com, "Narayana" <jsn_narayana@> wrote:
> > >
> > > I want the field to make as 'ReadOnly', once I clicked on the 'save' toolbar button.
> > > I used the following code in my custPR.java file by overriding the save().
> > > 
> > > save(){
> > >  super.save();
> > >  setFieldFlags("attrname",7L,true);
> > > }
> > > 
> > > I tried by making the super.save()in the last also, even though I didn't get the expected result.
> > >
> >
>
Hi Narayana,
I agree with Robert, that should work. 
How did you implement that ? Please share the steps.
Thanks & regards,
Victor.
--- In MAXIMO@yahoogroups.com, "schrob_tka" <schrob_tka@...> wrote:
>
> No, sorry. I always place this kind of code there and it works for me.
> 
> Regards
> Robert
> 
> --- In MAXIMO@yahoogroups.com, "Narayana" <jsn_narayana@> wrote:
> >
> > thanks for your reply,
> > 
> > I tried the same, but I didn't get the expected result,
> > can you give me some other way?
> > 
> > --- In MAXIMO@yahoogroups.com, "schrob_tka" <schrob_tka@> wrote:
> > >
> > > Hello,
> > > 
> > > After save the MBO is going to be reinitialized (by calling the init method). Therefore you need to place your code there.
> > > 
> > > Try this:
> > > 
> > > public void init() throws MXException{
> > >      super.init();
> > >      if (!toBeAdded()){
> > >          setFieldFlags("attrname",7L,true);
> > >      }
> > > }
> > > 
> > > Regards
> > > Robert               
> > > 
> > > --- In MAXIMO@yahoogroups.com, "Narayana" <jsn_narayana@> wrote:
> > > >
> > > > I want the field to make as 'ReadOnly', once I clicked on the 'save' toolbar button.
> > > > I used the following code in my custPR.java file by overriding the save().
> > > > 
> > > > save(){
> > > >  super.save();
> > > >  setFieldFlags("attrname",7L,true);
> > > > }
> > > > 
> > > > I tried by making the super.save()in the last also, even though I didn't get the expected result.
> > > >
> > >
> >
>
Hi,
I am sorry, Its working fine,
I have used the mensioned code in the save() method instead of init().
Thanks for your support for learning
--- In MAXIMO@yahoogroups.com, "Victor" <vikas17.j@...> wrote:
>
> Hi Narayana,
> 
> I agree with Robert, that should work. 
> 
> How did you implement that ? Please share the steps.
> 
> Thanks & regards,
> Victor.
> 
> --- In MAXIMO@yahoogroups.com, "schrob_tka" <schrob_tka@> wrote:
> >
> > No, sorry. I always place this kind of code there and it works for me.
> > 
> > Regards
> > Robert
> > 
> > --- In MAXIMO@yahoogroups.com, "Narayana" <jsn_narayana@> wrote:
> > >
> > > thanks for your reply,
> > > 
> > > I tried the same, but I didn't get the expected result,
> > > can you give me some other way?
> > > 
> > > --- In MAXIMO@yahoogroups.com, "schrob_tka" <schrob_tka@> wrote:
> > > >
> > > > Hello,
> > > > 
> > > > After save the MBO is going to be reinitialized (by calling the init method). Therefore you need to place your code there.
> > > > 
> > > > Try this:
> > > > 
> > > > public void init() throws MXException{
> > > >      super.init();
> > > >      if (!toBeAdded()){
> > > >          setFieldFlags("attrname",7L,true);
> > > >      }
> > > > }
> > > > 
> > > > Regards
> > > > Robert               
> > > > 
> > > > --- In MAXIMO@yahoogroups.com, "Narayana" <jsn_narayana@> wrote:
> > > > >
> > > > > I want the field to make as 'ReadOnly', once I clicked on the 'save' toolbar button.
> > > > > I used the following code in my custPR.java file by overriding the save().
> > > > > 
> > > > > save(){
> > > > >  super.save();
> > > > >  setFieldFlags("attrname",7L,true);
> > > > > }
> > > > > 
> > > > > I tried by making the super.save()in the last also, even though I didn't get the expected result.
> > > > >
> > > >
> > >
> >
>
I am glad to hear that.
Thanks & regards,
Victor.
--- In MAXIMO@yahoogroups.com, "Narayana" <jsn_narayana@...> wrote:
>
> Hi,
> 
> I am sorry, Its working fine,
> I have used the mensioned code in the save() method instead of init().
> Thanks for your support for learning
> 
> --- In MAXIMO@yahoogroups.com, "Victor" <vikas17.j@> wrote:
> >
> > Hi Narayana,
> > 
> > I agree with Robert, that should work. 
> > 
> > How did you implement that ? Please share the steps.
> > 
> > Thanks & regards,
> > Victor.
> > 
> > --- In MAXIMO@yahoogroups.com, "schrob_tka" <schrob_tka@> wrote:
> > >
> > > No, sorry. I always place this kind of code there and it works for me.
> > > 
> > > Regards
> > > Robert
> > > 
> > > --- In MAXIMO@yahoogroups.com, "Narayana" <jsn_narayana@> wrote:
> > > >
> > > > thanks for your reply,
> > > > 
> > > > I tried the same, but I didn't get the expected result,
> > > > can you give me some other way?
> > > > 
> > > > --- In MAXIMO@yahoogroups.com, "schrob_tka" <schrob_tka@> wrote:
> > > > >
> > > > > Hello,
> > > > > 
> > > > > After save the MBO is going to be reinitialized (by calling the init method). Therefore you need to place your code there.
> > > > > 
> > > > > Try this:
> > > > > 
> > > > > public void init() throws MXException{
> > > > >      super.init();
> > > > >      if (!toBeAdded()){
> > > > >          setFieldFlags("attrname",7L,true);
> > > > >      }
> > > > > }
> > > > > 
> > > > > Regards
> > > > > Robert               
> > > > > 
> > > > > --- In MAXIMO@yahoogroups.com, "Narayana" <jsn_narayana@> wrote:
> > > > > >
> > > > > > I want the field to make as 'ReadOnly', once I clicked on the 'save' toolbar button.
> > > > > > I used the following code in my custPR.java file by overriding the save().
> > > > > > 
> > > > > > save(){
> > > > > >  super.save();
> > > > > >  setFieldFlags("attrname",7L,true);
> > > > > > }
> > > > > > 
> > > > > > I tried by making the super.save()in the last also, even though I didn't get the expected result.
> > > > > >
> > > > >
> > > >
> > >
> >
>