Skip to Main Content

Java Development Tools

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

ADF Faces: Generate hidden input with read-only attribute?

avromFeb 6 2006
Hi all,

I'm pretty sure that there's an easy way to do this that I'm just not seeing...

In the past, I often used a read-only data to generate a form value. For example, with UIX, I might have

<formValue name="hiddenNumber" value="${bindings.NewHiddenNumber}" />

Note that I'm not generating this so that I can manipulate it with Javascript; I just want a read-only value based on data to be passed with the form.

I'm trying to do the same thing in ADF Faces, and I'm a bit stuck. If I use

<af:inputHidden id="hiddenNumber" value="#{bindings.NewHiddenNumber}" />

the form will not only submit the value as a "hiddenNumber" parameter, but also (as correctly described in the doc) try to post the value back to NewHiddenNumber...which gives me an "Attribute Set Failed" exception, unsurprisingly, because NewHiddenNumber is a read-only attribute.

Is there a good way to do this? Do I need to programmatically set the value of a (non-ADF Faces) hidden field in the backing bean? I'm wary of this, because I'm not sure how compatible ADF Faces tags are with standard JSF tags; lots of faces tags (e.g., af:forEach) have doc that says "only supports ADF Faces tags".

Thanks much,
Avrom
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 6 2006
Added on Feb 6 2006
0 comments
563 views