>> 2) >> The attachment tab generates the list of attachments. >> Normally jspwiki renders attachment links automatically with a >> class='attachment'. This label is used by slimbox to recognise which links >> to decorate. >> However, the current AttachmentsTab.jsp uses a stripes <s:link> tag, which >> not automatically generates the correct jspwiki link. >> I simply added the class in the jsp, which resolved the issue. (ok) >> But I was wondering why the <wiki:linkTo> is not used anymore, which >> automatically ensured that attachment links are generated consistently ? > > Yes. You can add a 'class' attribute to the s:link tag; that should > solve that particular problem. > > I don't have any special attachment to s:link, except that it is > guaranteed to generate a valid link even if we change the URL scheme. > We should check wiki:linkTo to make sure it works this way, although > it SHOULD because it calls the URLConstructor which in turn uses the > same Stripes UrlBuilder that s:link calls. > > If you get better results with wiki:LinkTo, we can use that instead. > (Though I'd like them both to work interchangeably.)
I'd prefer to have a single solution for a jsp-author to include jspwiki links. If this can be done by the <s:link> that would be great. But in that case, I would expect that correct links are generated, and that JSP author doesn't need to care. If this is not possilbe, I suggest to always use the <wiki:LinkTo> tags consistently. >> >> 3) >> I was surprised to see that attachment links now end in a "?download=" >> string. >> Is this behaviour correct ? > > That link is not correct. If you omit the "event='download'" attribute > from s:link, it won't append the "?download=" (which is the Stripes > event name). Omitting the event attribute will make the ActionBean > link point to the default event, which (as it happens) is the > "download" event. So the event attribute can be safely omitted. > > In general, attachment downloads are not working the way they should > at the moment, and this was something I was planning to fix soon. This > is related to the email I sent out about 2 weeks ago asking for > comments on WikiPath delimiters. > >> I will need to update the javascript which actually was relying on the >> pattern of an image "src" attribute ending in "...xxxxx.<image-type". > > Well, I hope you don't have to. :) Just try omitting the event > attribute from s:link, or use wiki:LinkTo. OK, I removed the 'download' event, and that seems to be ok. Txs. dirk
