Maximo List Archive

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.



make field as readonly after click on save

From: Narayana (2011-11-14 06:58)

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.


From: schrob_tka (2011-11-14 10:02)

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.
>


From: Narayana (2011-11-15 05:46)

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.
> >
>


From: schrob_tka (2011-11-15 15:30)

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.
> > >
> >
>


From: Victor (2011-11-15 15:38)

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.
> > > >
> > >
> >
>


From: Narayana (2011-11-16 14:59)

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.
> > > > >
> > > >
> > >
> >
>


From: Victor (2011-11-16 15:26)

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.
> > > > > >
> > > > >
> > > >
> > >
> >
>