Wrapping attributes/EL-expressions

Hi, sometimes as I develop markup-pages, the attribute values get to long for one line. When it contains EL-expressions i split it like this:

<h:outputLink styleClass="paging" value="?type=collection&pid=#{
param.pid}&orderBy=#{
param.orderBy}&collectionType=#{
param.collectionType}&limit=#{
param.limit}&offset=#{
param.offset}&order=#{
param.order}&elements=#{
param.elements" />

(the wrapped lines is indented with spaces, but doesn't show that way here)

But i think it looks kind of messy, and I have to adjust spaces manually if the indentation-level changes. I was wondering if there are any best-practices or smart ideas of handling this out there? It's by no means a biggie, but being a pragmatic I want my code and markup to be in the best shape possible.

2 comments
Comment actions Permalink

this looks strange !
I didn't know you were allowed to split an attribute value on multiple lines in XML

0
Comment actions Permalink

Technically it is the EL-expression that is split, not the attribute, which assembles as a one-line-value. Having them on one single line, would make some very long lines.

0

Please sign in to leave a comment.