need help on drop down option

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

need help on drop down option

irfanjs
hi,

i have created plugin which consolidates the perforce sync option at run-time using drop down box.
when user clicks on any option in drop down box, respective operation started 

following are the options in drop down box:
1: Normal sync 
2: disable sync 
3: force sync 

now, my requirement is , the moment user selects the "force sync" option in drop down box , textbox should be displayed. and if, user selects some other option then textbox should be invisible.

i have used "dropdownListBlock" and "dropdownList" tags but the results are not the expected one 

following is the index.jelly file 

<?jelly escape-by-default='true'?>
<j:jelly xmlns:j="jelly:core" xmlns:f="/lib/form">

    <f:entry title="${%Perforce Sync Option}">
     <div name="parameter">
            <input type="hidden" name="name" value="${it.name}" />
            <select name="syncOption">
                <j:forEach var="option" items="${it.syncOptions}">
                    <f:option>${option}</f:option>
                </j:forEach>
            </select>
        </div>
    <table>
       <j:set var="currentOption" value="${it.syncOption}"/>
         <f:dropdownList name="fruit" title="Fruits">
           <j:forEach var="option" items="${it.syncOptions}" varStatus="loop">
           <f:dropdownListBlock title="${descriptor.displayName}" value="${loop.index}"
                selected="false" staplerClass="${descriptor.clazz.name}">
          
          </f:dropdownListBlock>
          </j:forEach>
        </f:dropdownList>
        </table>
        </f:entry>
</j:jelly>


can you please review and let me know what needs to be done 

please suggest

regards
irfan

--
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 [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply | Threaded
Open this post in threaded view
|

Re: need help on drop down option

irfanjs
further, i modified the index.jelly as following:

<?jelly escape-by-default='true'?>
<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" xmlns:s="/lib/samples">
  
       <j:set var="currentOption" value="${it.syncOptions}"/>
       <f:dropdownList name="sync" title="Perforce Sync Options">
        <div name="parameter">
          
           <j:forEach var="descriptor" items="${it.SyncDescriptor}" varStatus="loop">
          <j:forEach var="option" items="${it.syncOptions}" varStatus="loop">
            
            <j:set var="option" value="${descriptor==currentOption.descriptor?currentOption:null}"/>
            <f:dropdownListBlock title="${descriptor.displayName}" value="${loop.index}"
                                 selected="${option!=null}" staplerClass="${descriptor.clazz.name}">
              
            </f:dropdownListBlock>
          </j:forEach>
          </div>
        </f:dropdownList>
     
</j:jelly>

still results are not getting as expected 
please suggest

regards




On Wed, May 8, 2013 at 12:03 PM, Irfan Sayed <[hidden email]> wrote:
hi,

i have created plugin which consolidates the perforce sync option at run-time using drop down box.
when user clicks on any option in drop down box, respective operation started 

following are the options in drop down box:
1: Normal sync 
2: disable sync 
3: force sync 

now, my requirement is , the moment user selects the "force sync" option in drop down box , textbox should be displayed. and if, user selects some other option then textbox should be invisible.

i have used "dropdownListBlock" and "dropdownList" tags but the results are not the expected one 

following is the index.jelly file 

<?jelly escape-by-default='true'?>
<j:jelly xmlns:j="jelly:core" xmlns:f="/lib/form">

    <f:entry title="${%Perforce Sync Option}">
     <div name="parameter">
            <input type="hidden" name="name" value="${it.name}" />
            <select name="syncOption">
                <j:forEach var="option" items="${it.syncOptions}">
                    <f:option>${option}</f:option>
                </j:forEach>
            </select>
        </div>
    <table>
       <j:set var="currentOption" value="${it.syncOption}"/>
         <f:dropdownList name="fruit" title="Fruits">
           <j:forEach var="option" items="${it.syncOptions}" varStatus="loop">
           <f:dropdownListBlock title="${descriptor.displayName}" value="${loop.index}"
                selected="false" staplerClass="${descriptor.clazz.name}">
          
          </f:dropdownListBlock>
          </j:forEach>
        </f:dropdownList>
        </table>
        </f:entry>
</j:jelly>


can you please review and let me know what needs to be done 

please suggest

regards
irfan


--
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 [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply | Threaded
Open this post in threaded view
|

Re: need help on drop down option

Mads Nielsen
In reply to this post by irfanjs
Have you tried using this one: 



On Wed, May 8, 2013 at 8:33 AM, Irfan Sayed <[hidden email]> wrote:
hi,

i have created plugin which consolidates the perforce sync option at run-time using drop down box.
when user clicks on any option in drop down box, respective operation started 

following are the options in drop down box:
1: Normal sync 
2: disable sync 
3: force sync 

now, my requirement is , the moment user selects the "force sync" option in drop down box , textbox should be displayed. and if, user selects some other option then textbox should be invisible.

i have used "dropdownListBlock" and "dropdownList" tags but the results are not the expected one 

following is the index.jelly file 

<?jelly escape-by-default='true'?>
<j:jelly xmlns:j="jelly:core" xmlns:f="/lib/form">

    <f:entry title="${%Perforce Sync Option}">
     <div name="parameter">
            <input type="hidden" name="name" value="${it.name}" />
            <select name="syncOption">
                <j:forEach var="option" items="${it.syncOptions}">
                    <f:option>${option}</f:option>
                </j:forEach>
            </select>
        </div>
    <table>
       <j:set var="currentOption" value="${it.syncOption}"/>
         <f:dropdownList name="fruit" title="Fruits">
           <j:forEach var="option" items="${it.syncOptions}" varStatus="loop">
           <f:dropdownListBlock title="${descriptor.displayName}" value="${loop.index}"
                selected="false" staplerClass="${descriptor.clazz.name}">
          
          </f:dropdownListBlock>
          </j:forEach>
        </f:dropdownList>
        </table>
        </f:entry>
</j:jelly>


can you please review and let me know what needs to be done 

please suggest

regards
irfan

--
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 [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
 
 



--

Mads Nielsen
Consultant
Praqma A/S

Tel: +45 50 98 18 09
Mail: [hidden email]
web: www.praqma.net

--
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 [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply | Threaded
Open this post in threaded view
|

Re: need help on drop down option

irfanjs
No. i haven't tried.

i have referred https://github.com/jenkinsci/jenkins/tree/master/ui-samples-plugin
this plugin has example of dropdown list.
i have never found dropdownDescriptorSelector being used in above plugin for dropdown , so , i am not aware of how to use it 

can you please give me some example ?
i can refer that 

regards





On Wed, May 8, 2013 at 4:54 PM, Mads Nielsen <[hidden email]> wrote:
Have you tried using this one: 



On Wed, May 8, 2013 at 8:33 AM, Irfan Sayed <[hidden email]> wrote:
hi,

i have created plugin which consolidates the perforce sync option at run-time using drop down box.
when user clicks on any option in drop down box, respective operation started 

following are the options in drop down box:
1: Normal sync 
2: disable sync 
3: force sync 

now, my requirement is , the moment user selects the "force sync" option in drop down box , textbox should be displayed. and if, user selects some other option then textbox should be invisible.

i have used "dropdownListBlock" and "dropdownList" tags but the results are not the expected one 

following is the index.jelly file 

<?jelly escape-by-default='true'?>
<j:jelly xmlns:j="jelly:core" xmlns:f="/lib/form">

    <f:entry title="${%Perforce Sync Option}">
     <div name="parameter">
            <input type="hidden" name="name" value="${it.name}" />
            <select name="syncOption">
                <j:forEach var="option" items="${it.syncOptions}">
                    <f:option>${option}</f:option>
                </j:forEach>
            </select>
        </div>
    <table>
       <j:set var="currentOption" value="${it.syncOption}"/>
         <f:dropdownList name="fruit" title="Fruits">
           <j:forEach var="option" items="${it.syncOptions}" varStatus="loop">
           <f:dropdownListBlock title="${descriptor.displayName}" value="${loop.index}"
                selected="false" staplerClass="${descriptor.clazz.name}">
          
          </f:dropdownListBlock>
          </j:forEach>
        </f:dropdownList>
        </table>
        </f:entry>
</j:jelly>


can you please review and let me know what needs to be done 

please suggest

regards
irfan

--
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 [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
 
 



--

Mads Nielsen
Consultant
Praqma A/S

Tel: +45 50 98 18 09
Mail: [hidden email]
web: www.praqma.net

--
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 [hidden email].
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 [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply | Threaded
Open this post in threaded view
|

Re: need help on drop down option

irfanjs
Please suggest.
I am really stuck... Please

Regards

On Wednesday, May 8, 2013, Irfan Sayed <[hidden email]> wrote:
> No. i haven't tried.
> i have referred https://github.com/jenkinsci/jenkins/tree/master/ui-samples-plugin
> this plugin has example of dropdown list.
> i have never found dropdownDescriptorSelector being used in above plugin for dropdown , so , i am not aware of how to use it 
> can you please give me some example ?
> i can refer that 
> regards
>
>
>
>
> On Wed, May 8, 2013 at 4:54 PM, Mads Nielsen <[hidden email]> wrote:
>
> Have you tried using this one: 
> https://jenkins-ci.org/maven-site/jenkins-core/jelly-taglib-ref.html#form:dropdownDescriptorSelector
>
> On Wed, May 8, 2013 at 8:33 AM, Irfan Sayed <[hidden email]> wrote:
>
> hi,
> i have created plugin which consolidates the perforce sync option at run-time using drop down box.
> when user clicks on any option in drop down box, respective operation started 
> following are the options in drop down box:
> 1: Normal sync 
> 2: disable sync 
> 3: force sync 
> now, my requirement is , the moment user selects the "force sync" option in drop down box , textbox should be displayed. and if, user selects some other option then textbox should be invisible.
> i have used "dropdownListBlock" and "dropdownList" tags but the results are not the expected one 
> following is the index.jelly file 
> <?jelly escape-by-default='true'?>
> <j:jelly xmlns:j="jelly:core" xmlns:f="/lib/form">
>     <f:entry title="${%Perforce Sync Option}">
>      <div name="parameter">
>             <input type="hidden" name="name" value="${it.name}" />
>             <select name="syncOption">
>                 <j:forEach var="option" items="${it.syncOptions}">
>                     <f:option>${option}</f:option>
>                 </j:forEach>
>             </select>
>         </div>
>     <table>
>        <j:set var="currentOption" value="${it.syncOption}"/>
>          <f:dropdownList name="fruit" title="Fruits">
>            <j:forEach var="option" items="${it.syncOptions}" varStatus="loop">
>            <f:dropdownListBlock title="${descriptor.displayName}" value="${loop.index}"
>                 selected="false" staplerClass="${descriptor.clazz.name}">
>           
>           </f:dropdownListBlock>
>           </j:forEach>
>         </f:dropdownList>
>         </table>
>         </f:entry>
> </j:jelly>
>
> can you please review and let me know what needs to be done 
> please suggest
> regards
> irfan
>
> --
> 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

--
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 [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply | Threaded
Open this post in threaded view
|

Re: need help on drop down option

司芳源
In reply to this post by irfanjs
It seems to me that dropdowndescriptorselector is a wrapper for the dropdown list in the ui-samples-plugin

On Wednesday, May 8, 2013 at 7:33:05 PM UTC+8, Irfan Sayed wrote:
No. i haven't tried.

i have referred <a href="https://github.com/jenkinsci/jenkins/tree/master/ui-samples-plugin" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Fjenkinsci%2Fjenkins%2Ftree%2Fmaster%2Fui-samples-plugin\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNE6VO9nYphNTkipzlHtCw1k3Uwxxw&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Fjenkinsci%2Fjenkins%2Ftree%2Fmaster%2Fui-samples-plugin\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNE6VO9nYphNTkipzlHtCw1k3Uwxxw&#39;;return true;">https://github.com/jenkinsci/jenkins/tree/master/ui-samples-plugin
this plugin has example of dropdown list.
i have never found dropdownDescriptorSelector being used in above plugin for dropdown , so , i am not aware of how to use it 

can you please give me some example ?
i can refer that 

regards





On Wed, May 8, 2013 at 4:54 PM, Mads Nielsen <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="EEtdlvtdPPAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">m...@...> wrote:
Have you tried using this one: 

<a href="https://jenkins-ci.org/maven-site/jenkins-core/jelly-taglib-ref.html#form:dropdownDescriptorSelector" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fjenkins-ci.org%2Fmaven-site%2Fjenkins-core%2Fjelly-taglib-ref.html%23form%3AdropdownDescriptorSelector\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGpywEe_NlJXv8TLyCQ2ZnPOKgSmA&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fjenkins-ci.org%2Fmaven-site%2Fjenkins-core%2Fjelly-taglib-ref.html%23form%3AdropdownDescriptorSelector\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGpywEe_NlJXv8TLyCQ2ZnPOKgSmA&#39;;return true;">https://jenkins-ci.org/maven-site/jenkins-core/jelly-taglib-ref.html#form:dropdownDescriptorSelector


On Wed, May 8, 2013 at 8:33 AM, Irfan Sayed <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="EEtdlvtdPPAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">irfu....@...> wrote:
hi,

i have created plugin which consolidates the perforce sync option at run-time using drop down box.
when user clicks on any option in drop down box, respective operation started 

following are the options in drop down box:
1: Normal sync 
2: disable sync 
3: force sync 

now, my requirement is , the moment user selects the "force sync" option in drop down box , textbox should be displayed. and if, user selects some other option then textbox should be invisible.

i have used "dropdownListBlock" and "dropdownList" tags but the results are not the expected one 

following is the index.jelly file 

<?jelly escape-by-default='true'?>
<j:jelly xmlns:j="jelly:core" xmlns:f="/lib/form">

    <f:entry title="${%Perforce Sync Option}">
     <div name="parameter">
            <input type="hidden" name="name" value="${<a href="http://it.name/" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fit.name%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNE399fu-s6vPD-ScFFrqPAr_AOFrA&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fit.name%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNE399fu-s6vPD-ScFFrqPAr_AOFrA&#39;;return true;">it.name}" />
            <select name="syncOption">
                <j:forEach var="option" items="${it.syncOptions}">
                    <f:option>${option}</f:option>
                </j:forEach>
            </select>
        </div>
    <table>
       <j:set var="currentOption" value="${it.syncOption}"/>
         <f:dropdownList name="fruit" title="Fruits">
           <j:forEach var="option" items="${it.syncOptions}" varStatus="loop">
           <f:dropdownListBlock title="${descriptor.displayName}" value="${loop.index}"
                selected="false" staplerClass="${<a href="http://descriptor.clazz.name/" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fdescriptor.clazz.name%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGq_EWMBLY2_okRBHC8OmvaNzmy-g&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fdescriptor.clazz.name%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGq_EWMBLY2_okRBHC8OmvaNzmy-g&#39;;return true;">descriptor.clazz.name}">
          
          </f:dropdownListBlock>
          </j:forEach>
        </f:dropdownList>
        </table>
        </f:entry>
</j:jelly>


can you please review and let me know what needs to be done 

please suggest

regards
irfan

--
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 <a href="javascript:" target="_blank" gdf-obfuscated-mailto="EEtdlvtdPPAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">jenkinsci-de...@googlegroups.com.
For more options, visit <a href="https://groups.google.com/groups/opt_out" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/groups/opt_out&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/groups/opt_out&#39;;return true;">https://groups.google.com/groups/opt_out.
 
 



--

Mads Nielsen
Consultant
Praqma A/S

Tel: +45 50 98 18 09
Mail: <a href="javascript:" style="color:rgb(0,0,204)" target="_blank" gdf-obfuscated-mailto="EEtdlvtdPPAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">m...@...
web: <a href="http://www.praqma.net/" style="color:rgb(0,0,204)" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fwww.praqma.net%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFxHC96losXfhqKt3nWg2g6Z6UqlQ&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fwww.praqma.net%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFxHC96losXfhqKt3nWg2g6Z6UqlQ&#39;;return true;">www.praqma.net

--
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 <a href="javascript:" target="_blank" gdf-obfuscated-mailto="EEtdlvtdPPAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">jenkinsci-de...@googlegroups.com.
For more options, visit <a href="https://groups.google.com/groups/opt_out" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/groups/opt_out&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/groups/opt_out&#39;;return true;">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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/18dbf14e-bd48-479e-9f87-33de648230f3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.