Novell Home

Results 1 to 6 of 6

Thread: Help with a Custom JSP - Select Box (entry view definition).

  1. #1

    Help with a Custom JSP - Select Box (entry view definition).

    I'm in no way an expert in HTML so please bear with me. We have quite a large list of Job Titles that we use on multiple forms and I wanted to use a custom jsp so I only have to update our title list once if we add/remove titles at our organization. I created a simple select box with all our titles and put them on the Vibe server under the custom jsp folder. The select box shows up on the entry form definition no problem... I just don't know how to make it show up on the entry view definition. The code is obviously pretty basic:

    <html>
    <select name ="Title">
    <option value ="Title1">Title1</option>
    <option value ="Title2">Title2</option>
    <option value ="Title3">Title3</option>
    <option value="Title4">Title4</option>
    </select>
    </html>

    What do I need to do in order for it to show up on the entry view definition side of things? Could anyone with html and/or Vibe knowledge please chime in? I'd really appreciate it.

  2. Re: Help with a Custom JSP - Select Box (entry view definiti

    So if I understand you, you have created a jsp file, tied it to an entry using the steps in "Using Custom JSP File to Enhance Your Vibe Page" but now can't add that to the view. When I do this sort of thing normally when I add to the view all the variables that were created in the form are available.

    Looking at what you did I'm not sure if it is complete. I have created some custom form items myself (though not select boxes) and I always start by copying the definition from jsp/definitions_elements and editing that for my custom jsp. Without doing this I'm not sure how Vibe will be able to take your data that is entered and put it in the database.

  3. #3

    Re: Help with a Custom JSP - Select Box (entry view definiti

    RBlehar,

    if you don't expect any special behavior of the select box, you don't need to use custom JSP.
    All you need is to create field of type SELECTBOX and then create some selections INSIDE this item according to your needs.
    to see this field:
    a) in folder listing -> folder -> folder options -> column selection -> select desired field
    b) in entry details -> form designer -> view form -> add your field here.

    If it's not about you needed, please let me know.

  4. #4

    Re: Help with a Custom JSP - Select Box (entry view definiti

    Thank you for your response... I need a "master" selectbox because of how many different forms we use "job title" for. We have a new hire form, termination form and 2 others forms where the job title select box shows up. So if I were to just create a selectbox I would have to create/maintain a job title selectbox for 3+ forms which I don't want to do. Me creating a custom and very simple JSP allowed me to have a master list of job titles on all forms. This way anytime there is a change I only have to update the custom jsp and not 3 different forms.

    I ended up figuring it out... I just really forgot to name my dropdown box (rookie mistake).

    Thanks!

  5. #5

    Re: Help with a Custom JSP - Select Box (entry view definiti

    Well,
    this information changes situation a bit.
    In such a case you really need a custom JSP. This JSP must be "clever enough" to distinguish where it is, i.e. its context.
    Skeleton might be like following: if operation is add or edit then use HTML select tag. Otherwise get the value of the field/attribute of the entry.
    Please give me a time to test it and to give you working solution. BTW. what is your timezone and how urgent is it?
    Regards, Darek (that's my really name).

  6. #6

    Re: Help with a Custom JSP - Done

    Try the following custom JSP, it works fine in my environment.
    Construction is a s I said before: while in edit mode (add or modify) it appears as Select Box, otherwise gives the value only.

    Regards, Darek

    <%@ include file="/WEB-INF/jsp/definition_elements/init.jsp" %>
    <c:choose>
    <c:when test='${ssOperation == "add_folder_entry" || ssOperation=="modify_folder_entry"}'>
    ${property_caption}<br>
    <select name="${property_name}">
    <option value="opt1">title1 1</option>
    <option value="opt2">title 2</option>
    <option value="opt3">title 3</option>
    <option value="opt4">title 4</option>
    </select>
    </c:when>
    <c:otherwise>
    ${ssDefinitionEntry.customAttributes[property_name]}
    </c:otherwise>
    </c:choose>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •