On 7/19/06, Stefan Neumann <[EMAIL PROTECTED]> wrote:
But next try, using the jsf rendered attribute:

<tr jsfc="ui:repeat" value="#{controller.profileStructure}" var="prop">

  <h:panelGroup rendered="#{prop.isString}">
    <!-- display label -->
    <td>
      <span jsfc="h:outputLabel" value="#{prop.name}" />
    </td>
    <td>
      <span jsfc="h:inputText" value="#{prop.value}" />
    </td>
  </h:panelGroup>

  <h:panelGroup rendered="#{prop.isAddress}">
    <!-- display label -->
    <td>
      <span jsfc="h:outputLabel" value="#{prop.name}" />
    </td>
    <td>
      <!-- Display Address as a block -->
      <table>
        <tr>
          <td>
            Street:
          </td>
          <td>
            <span jsfc="h:inputText"
value="#{prop.value.street}" />                           </td>
        </tr>
        [.. Display other fields of address ..]
      </table>
    </td>
  </h:panelGroup>
</tr>

BUT,.... (argh!!)

I had already read in this list, but have not remembered, also the parts
are not rendered the are also interpreted, so also I want to display a
String value, the template tries to <string-value>.street and that
throws an exception.


Back to my question: How can I do just a functionality? I cannot have a
conditional statement and I am not able to not render stuff. What else
can I do?

Doing it with a UIData iterator (like ui:repeat) and rendered should
be the correct way to go.   I'm surprised that it is throwing an
exception.   Are you sure it's doing what you think it's doing?
These El expressions look wrong:  rendered="#{prop.isAddress}.   This
would mean that your java code has a method named getIsAddress or
isIsAddress.   Is that the case?

It'd probably be most helpful to post an example Exception.

Reply via email to