how to populate default value in a text box

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

how to populate default value in a text box

Sankaran, Nambi
Hi
 
The form below, creates an empty text box.
How to prepopulate this text box with a predefined value?
 
<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">
  <f:entry title="${%Release Version}" help="${rootURL}/plugin/eboxrelease/ReleaseVersionHelp.html">
        <f:textbox field="releaseVersion" />
  </f:entry>
<j:jelly>
 
Thanks
Nambi
Reply | Threaded
Open this post in threaded view
|

Re: how to populate default value in a text box

Kohsuke Kawaguchi
Administrator
Sankaran, Nambi wrote:
> Hi
>  
> The form below, creates an empty text box.
> How to prepopulate this text box with a predefined value?

Add default="xyz" to <f:textbox>.

>  
> <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">
>   <f:entry title="${%Release Version}"
> help="${rootURL}/plugin/eboxrelease/ReleaseVersionHelp.html">
>         <f:textbox field="releaseVersion" />
>   </f:entry>
> <j:jelly>
>  
> Thanks
> Nambi
>

--
Kohsuke Kawaguchi
Sun Microsystems                   http://weblogs.java.net/blog/kohsuke/

smime.p7s (4K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

RE: Re: how to populate default value in a text box

Sankaran, Nambi
Thanks Kohsuke

How do I create a default value programmatically?

-----Original Message-----
From: Kohsuke Kawaguchi [mailto:[hidden email]]
Sent: Tuesday, July 07, 2009 10:58 AM
To: [hidden email]
Subject: Re: how to populate default value in a text box

Sankaran, Nambi wrote:
> Hi
>  
> The form below, creates an empty text box.
> How to prepopulate this text box with a predefined value?

Add default="xyz" to <f:textbox>.

>  
> <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">
>   <f:entry title="${%Release Version}"
> help="${rootURL}/plugin/eboxrelease/ReleaseVersionHelp.html">
>         <f:textbox field="releaseVersion" />
>   </f:entry>
> <j:jelly>
>  
> Thanks
> Nambi
>


--
Kohsuke Kawaguchi
Sun Microsystems                   http://weblogs.java.net/blog/kohsuke/

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: how to populate default value in a text box

Kohsuke Kawaguchi
Administrator
Sankaran, Nambi wrote:
> Thanks Kohsuke
>
> How do I create a default value programmatically?

How about something like

   default="${descriptor.getDefaultXyz()}"

?

>
> -----Original Message-----
> From: Kohsuke Kawaguchi [mailto:[hidden email]]
> Sent: Tuesday, July 07, 2009 10:58 AM
> To: [hidden email]
> Subject: Re: how to populate default value in a text box
>
> Sankaran, Nambi wrote:
>> Hi
>>  
>> The form below, creates an empty text box.
>> How to prepopulate this text box with a predefined value?
>
> Add default="xyz" to <f:textbox>.
>
>>  
>> <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">
>>   <f:entry title="${%Release Version}"
>> help="${rootURL}/plugin/eboxrelease/ReleaseVersionHelp.html">
>>         <f:textbox field="releaseVersion" />
>>   </f:entry>
>> <j:jelly>
>>  
>> Thanks
>> Nambi
>>
>
>
> --
> Kohsuke Kawaguchi
> Sun Microsystems                   http://weblogs.java.net/blog/kohsuke/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>

--
Kohsuke Kawaguchi
Sun Microsystems                   http://weblogs.java.net/blog/kohsuke/

smime.p7s (4K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

RE: Re: how to populate default value in a text box

Sankaran, Nambi
Hi Kohsuke

I tried to display a default value as follows,

  <f:entry title="${%Release Tag}"
help="${rootURL}/plugin/eboxrelease/ReleaseVersionHelp.html">
        <f:textbox field="releaseTag"   default="DEFAULT"/>
  </f:entry>

It doesn't show up in the Text Box.

This Class extends Builder and it has a DataBoundConstructor.
The form gets added when I click on "Add build Step" under "Build"

Can you provide some pointers?

Thanks
Nambi

 

-----Original Message-----
From: Kohsuke Kawaguchi [mailto:[hidden email]]
Sent: Tuesday, July 07, 2009 11:22 AM
To: [hidden email]
Subject: Re: how to populate default value in a text box

Sankaran, Nambi wrote:
> Thanks Kohsuke
>
> How do I create a default value programmatically?

How about something like

   default="${descriptor.getDefaultXyz()}"

?

>
> -----Original Message-----
> From: Kohsuke Kawaguchi [mailto:[hidden email]]
> Sent: Tuesday, July 07, 2009 10:58 AM
> To: [hidden email]
> Subject: Re: how to populate default value in a text box
>
> Sankaran, Nambi wrote:
>> Hi
>>  
>> The form below, creates an empty text box.
>> How to prepopulate this text box with a predefined value?
>
> Add default="xyz" to <f:textbox>.
>
>>  
>> <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">
>>   <f:entry title="${%Release Version}"
>> help="${rootURL}/plugin/eboxrelease/ReleaseVersionHelp.html">
>>         <f:textbox field="releaseVersion" />
>>   </f:entry>
>> <j:jelly>
>>  
>> Thanks
>> Nambi
>>
>
>
> --
> Kohsuke Kawaguchi
> Sun Microsystems
http://weblogs.java.net/blog/kohsuke/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>


--
Kohsuke Kawaguchi
Sun Microsystems                   http://weblogs.java.net/blog/kohsuke/

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: how to populate default value in a text box

Kohsuke Kawaguchi
Administrator

The only possibility that I can think of is that you are using older
Hudson that doesn't support @default. It was added in rev.19194 in June
24th.



Sankaran, Nambi wrote:

> Hi Kohsuke
>
> I tried to display a default value as follows,
>
>   <f:entry title="${%Release Tag}"
> help="${rootURL}/plugin/eboxrelease/ReleaseVersionHelp.html">
>         <f:textbox field="releaseTag"   default="DEFAULT"/>
>   </f:entry>
>
> It doesn't show up in the Text Box.
>
> This Class extends Builder and it has a DataBoundConstructor.
> The form gets added when I click on "Add build Step" under "Build"
>
> Can you provide some pointers?
>
> Thanks
> Nambi
>
>  
>
> -----Original Message-----
> From: Kohsuke Kawaguchi [mailto:[hidden email]]
> Sent: Tuesday, July 07, 2009 11:22 AM
> To: [hidden email]
> Subject: Re: how to populate default value in a text box
>
> Sankaran, Nambi wrote:
>> Thanks Kohsuke
>>
>> How do I create a default value programmatically?
>
> How about something like
>
>    default="${descriptor.getDefaultXyz()}"
>
> ?
>
>>
>> -----Original Message-----
>> From: Kohsuke Kawaguchi [mailto:[hidden email]]
>> Sent: Tuesday, July 07, 2009 10:58 AM
>> To: [hidden email]
>> Subject: Re: how to populate default value in a text box
>>
>> Sankaran, Nambi wrote:
>>> Hi
>>>  
>>> The form below, creates an empty text box.
>>> How to prepopulate this text box with a predefined value?
>>
>> Add default="xyz" to <f:textbox>.
>>
>>>  
>>> <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">
>>>   <f:entry title="${%Release Version}"
>>> help="${rootURL}/plugin/eboxrelease/ReleaseVersionHelp.html">
>>>         <f:textbox field="releaseVersion" />
>>>   </f:entry>
>>> <j:jelly>
>>>  
>>> Thanks
>>> Nambi
>>>
>>
>>
>> --
>> Kohsuke Kawaguchi
>> Sun Microsystems
> http://weblogs.java.net/blog/kohsuke/
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [hidden email]
>> For additional commands, e-mail: [hidden email]
>>
>>
>
>
> --
> Kohsuke Kawaguchi
> Sun Microsystems                   http://weblogs.java.net/blog/kohsuke/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>

--
Kohsuke Kawaguchi
Sun Microsystems                   http://weblogs.java.net/blog/kohsuke/

smime.p7s (4K) Download Attachment