On Wed, Nov 26, 2008 at 10:36 AM, Gerhard Petracek
<[EMAIL PROTECTED]> wrote:
> hello,
>
> you should also get the message:
> "According to TLD or attribute directive in tag file, attribute id does not
> accept any expressions"
>
> solution:
> you have to use facelets for dynamic id's.
true, b/c that evaluates it internally as a string, eg:
<my:coolThing componentId="#{blah}" ... />
where the XHTML template would use
<h:inputText id="#{componentId}" ...>
#{componentId} is the VALUE of the (custom) attribute "componentId" on
your component (my:coolThing)
-Matthias
>
> regards,
> gerhard
>
>
>
> 2008/11/26 jhomuth <[EMAIL PROTECTED]>
>>
>> Hello List,
>>
>> it's strange, I wanted to ask the same question at the same moment. I also
>> try to set the id from a controller value via EL. But the EL ist not treated
>> like EL but rather than a String, because I always get the message
>>
>> "java.lang.IllegalArgumentException: component identifier's first
>> character must be a letter or an underscore ('_')! But it is "#"
>>
>> That's why I quess the Expression (<tom:selectManyListbox
>> id="#{TargetSystemConfigurationController.availableListID}" binding="#...)
>> will be treated like a string.
>>
>> Is there any solution for this.
>>
>> Johannes
>>
>>
>>
>>
>> [EMAIL PROTECTED] wrote:
>>>
>>> Good morning,
>>>
>>> I have a datatable wich use a list of simple object. When i use an
>>> outputtext inside the table like this:
>>>
>>> <h:outputText value="#{myVar.name}">
>>>
>>> it's working.
>>> When I try to use the same property (or another one) for the id of the
>>> component the text is correctly outputted but I get an empty id (I put a _
>>> in front to don't get exception):
>>>
>>> <h:outputText id="_#{myVar.name}" value="#{myVar.name}"> ID NOT WORKING,
>>> empty
>>> <h:outputText id="_#{myVar.id}" value="#{myVar.name}"> ID NOT WORKING,
>>> empty
>>>
>>> Without underscore in front i get directly an exception:
>>>
>>> <h:outputText id="#{myVar.name}" value="#{myVar.name}">
>>> <h:outputText id="#{myVar.id}" value="#{myVar.name}">
>
>
>
> --
>
> http://www.irian.at
>
> Your JSF powerhouse -
> JSF Consulting, Development and
> Courses in English and German
>
> Professional Support for Apache MyFaces
>
--
Matthias Wessendorf
blog: http://matthiaswessendorf.wordpress.com/
sessions: http://www.slideshare.net/mwessendorf
twitter: http://twitter.com/mwessendorf