3 Replies Latest reply: Nov 13, 2003 11:25 AM by 101342 RSS

    How to Create a BC4J messageChoice using an View?

    55511
      I just started using UIX (today in fact) and would like to know how to use a View Object to populate a BC4J messageChoice.

      I've created an form to update a table. One of the fields is cost center. I store the different cost centers in a seperate table. Then I store the id of the costCenter in the project table. I don't want to hard code the different centers into the application but pull them from the database (using a BC4J view). Can someone point me in the right direction?

      Thanks!
        • 1. Re: How to Create a BC4J messageChoice using an View?
          101342
          The <bc4j:optionList> element is the one you want! It does exactly what you're asking for: just include it inside the <contents> of a <bc4j:messageChoice>.
          • 2. Re: How to Create a BC4J messageChoice using an View?
            55511
            That worked! But when I hit the update button the messageChoice fields will not update in the database. All the other fields do. No errors are displayed either, am I missing something?

            Here is the code from the messageChoice...

            <bc4j:messageChoice prompt="Status"
            attrName="ProjectStatusId">
            <contents>
            <bc4j:optionList voName="ProjectStatusView"
            attrName="ProjectStatusId"
            textAttrName="Description" />
            </contents>
            </bc4j:messageChoice>
            • 3. Re: How to Create a BC4J messageChoice using an View?
              101342
              I believe you've encountered a bug (fixed since 9.0.3) that forced you to set "name" as well as "attrName"; the former is supposed to default to the latter, but didn't.

              So:
                <bc4j:messageChoice prompt="Status"
                                    attrName="ProjectStatusId"
                                    name="ProjectStatusId">
                  ...
                </bc4j:messageChoice>