Hi. Thanks for replying. I have actually already added getMyID method as
this

 public String getMyID()

           {

                    return this.myID;

            }



On Tue, Feb 25, 2014 at 8:46 PM, <[email protected]> wrote:

> hi,
>
>   maybe you didn't add the get for the myID,the jelly will default to
> invoke this method to get the item's value
>
> public class ViewProjectProperties extends ViewProperty{
>
>        public final String myID;
>             public String getMyID()
>
>            {
>
>                     return this.myID;
>
>             }
>           @DataBoundConstructor
>           public ViewProjectProperties(final String myID) {
>
>               //store it in a file
>           }
>       
>           @Extension
>           public static class DescriptorImpl extends ViewPropertyDescriptor {
>
>               @Override
>               public String getDisplayName() {
>                   return "My Id";
>               }
>       
>               @Override
>               public boolean isEnabledFor(View view) {
>                   return true;
>               }       
>               
>           }
>               public String getMyID() {
>
>                       return myID;
>               }
>
> }
>
>
> 在 2014年2月25日星期二UTC+8上午2时33分34秒,swastb写道:
>
>> Bruno thanks again for the reply. The invisibleEntry worked for me very
>> well when I added a JobPropertyDescriptor , however the same thing is
>> not working for me in ViewPropertyDescriptor.
>>
>> Here is my ViewPropertyDescriptor.java
>>
>> public class ViewProjectProperties extends ViewProperty{
>>
>>       public final String myID;
>>
>>          @DataBoundConstructor
>>          public ViewProjectProperties(final String myID) {
>>              //store it in a file
>>          }
>>      
>>          @Extension
>>          public static class DescriptorImpl extends ViewPropertyDescriptor {
>>
>>              @Override
>>              public String getDisplayName() {
>>                  return "My Id";
>>              }
>>      
>>              @Override
>>              public boolean isEnabledFor(View view) {
>>                  return true;
>>              }       
>>              
>>          }
>>              public String getMyID() {
>>
>>                      return myID;
>>              }
>>
>> }
>>
>>
>> the config jelly present in ViewProjectProperties folder
>>
>>
>> <j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler"
>> xmlns:d="jelly:define" xmlns:l="/lib/layout" xmlns:t="/lib/hudson"
>> xmlns:f="/lib/form">
>>   <!-- // didnt work
>>    <f:invisibleEntry field="myID">
>>        <input type="hidden" value="${instance.myID}" />
>>    </f:invisibleEntry>
>>    -->
>>    <input type="hidden" value="${instance.myID}" name="myID"/> <!-- didnt 
>> work -->
>> </j:jelly>
>>
>>
>> Im sure I have have done some stupid mistake. Because this same thing is
>> working fine for JobPropertyDescriptor .
>>
>> On Monday, 24 February 2014 17:27:26 UTC+5:30, Bruno Kühnen Meneguello
>> wrote:
>>>
>>>  I've used the invisibleEntry 
>>> here<https://github.com/bkmeneguello/extreme-notification-plugin/blob/master/src/main/resources/org/jenkinsci/plugins/extremenotification/NotificationEndpoint/config.groovy#L14>.
>>> For me it worked very well.
>>>
>>> On Mon 24 Feb 2014 03:25:34 AM BRT, swastb wrote:
>>>
>>>
>>> Hi Bruno,
>>>
>>> thanks a lot for reply.I tried as you have sugested, but still could
>>> not make it as a hidden one. By default the ViewPropertyDescriptor is
>>> coming as an checkbox in the view.
>>>
>>> On Thursday, 20 February 2014 18:36:11 UTC+5:30, Bruno Kühnen
>>> Meneguello wrote:
>>>
>>> Hi.
>>>
>>> Use a plain <input type="hidden" name="xxx"/>
>>>
>>> On Thu 20 Feb 2014 09:13:03 AM BRT, swastb wrote:
>>> > Hi all,
>>> >
>>> > Can someone please help me on this?
>>> >
>>> > On Friday, 7 February 2014 10:34:57 UTC+5:30, swastb wrote:
>>> >
>>> > Hi All,
>>> >
>>> > We want to extend the ViewProperty and add an hidden
>>> variable as
>>> > part of View. But by default the variable present in the
>>> > ViewProperty extension is coming as a checkbox in the view.
>>> Is it
>>> > expected behavior? Is there a way to make the variable as
>>> hidden
>>> > variable in view screen? we tried with adding
>>> f:invisibleEntry in
>>> > the corresonding config.jelly file but it didn't help. is there
>>> > any other way?
>>> >
>>> > --
>>> > You received this message because you are subscribed to the Google
>>> > Groups "Jenkins Developers" group.
>>> > To unsubscribe from this group and stop receiving emails from
>>> it, send
>>> > an email to [email protected] <javascript:>.
>>> > For more options, visit https://groups.google.com/groups/opt_out
>>> <https://groups.google.com/groups/opt_out><https://groups.google.com/groups/opt_out>
>>> .
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Jenkins Developers" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to [email protected].
>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>
>>>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to