Hi,
it is not allowed to set the id attribute per ValueBinding expression,
see jsf-spec 1.1 Chapter 3.1.4 (last sentence).
Regards,
Volker
Conway. Fintan (IT Solutions) wrote:
> It might be that you are setting the id to a literal value
> "#{Travel.travelNr}", instead of asking MyFaces to get the travelNr from the
> Travel bean #{Travel.travelNr} - Note no quotes here. If you need the id
> surrounded by quotes the following might work - id = '"' &
> #{Travel.travelNr} & '"'.
>
> HTH,
>
> Fintan
>
> -----Original Message-----
> From: Benjamin Bratkus [mailto:[EMAIL PROTECTED]
> Sent: 04 April 2006 08:40
> To: MyFaces Discussion
> Subject: Re: AW: id of a datatable
>
>
> thx for your fast response,
>
> but this case i tryed yesterday by myself and i've got <h:dataTable
> id="#{Travel.travelNr}" value="#{Travel.hopsModel}"
> var="Hop" first="#{Travel.hopsTable.firstRowIndex}"
> rows="#{Travel.hopsTable.noOfRows}" styleClass="rka"
> rowClasses="firstRow, secondRow">
>
> java.lang.IllegalArgumentException: component identifier's first
> character must be a letter or an underscore ('_')! But it is "#"
>
> Schaal, Roland schrieb:
>
>>Something like <h:datatable id="#{managedbean.datatableId}"> should
>>work with public String getDatatableId() in your bean that returns the
>>String of your ID
>>
>>-----Ursprüngliche Nachricht-----
>>Von: Benjamin Bratkus [mailto:[EMAIL PROTECTED]
>>Gesendet: Dienstag, 4. April 2006 08:58
>>An: MyFaces Discussion
>>Betreff: id of a datatable
>>
>>hello users,
>>
>>can anyone tell me how to set the id to a variable of my managedbean ?
>>i.e a String called travelNr.
>>
>>best regards,
>>
>>ben
>>
>>
>>
>>
>>
>
>
>
> * ** *** ** * ** *** ** * ** *** ** *
> This email and any files transmitted with it are confidential and
> intended solely for the use of the individual or entity to whom they
> are addressed.
> Any views or opinions presented are solely those of the author, and do not
> necessarily represent those of ESB.
> If you have received this email in error please notify the sender.
>
> Although ESB scans e-mail and attachments for viruses, it does not guarantee
> that either are virus-free and accepts no liability for any damage sustained
> as a result of viruses.
>
> * ** *** ** * ** *** ** * ** *** ** *
>
--
Don't answer to From: address!
Mail to this account are droped if not recieved via mailinglist.
To contact me direct create the mail address by
concatenating my forename to my senders domain.