Well, now I see something I missed before. notifyTopics are triggered
when an "ajax" request is done, which is not the case here (there is
no href), so I think the topics won't be triggered in that case. One
of the many things you can do is:

<a onclick="dojo.event.topic.publish('documentSelected'); return false">....

You are not really taking advantage of the functionality of the <sx:a
tag, so you can use a regular anchor for that part.

musachy

On Wed, Jun 18, 2008 at 9:58 AM, Jan Froehlich
<[EMAIL PROTECTED]> wrote:
> Hi Musachy,
>
> thanks for that hint, I tried both, but if you say that it doesn't matter I 
> might have another problem - it worked with neither solution.
>
> Do you think that
> <sx:a notifyTopics="documentSelected"><s:property value="Name" /></sx:a>
> should be enough to trigger that topic update??
>
> Thanks in advance!
> Regards
> Jan Froehlich
>
> -----Ursprüngliche Nachricht-----
> Von: Musachy Barroso [mailto:[EMAIL PROTECTED]
> Gesendet: Mittwoch, 18. Juni 2008 15:21
> An: Struts Users Mailing List
> Betreff: Re: Notify topics in struts2.1.2
>
> I don't think it really matters where you put the code (topic
> subscription), but it will be easier to put it in the main page that
> has the tree.
>
> musachy
>
> On Wed, Jun 18, 2008 at 5:32 AM, Jan Froehlich
> <[EMAIL PROTECTED]> wrote:
>> Hi,
>>
>> I need a little hint how I can achieve the following...
>> Right now I got a page with a <sx:tree ...> where the user can browse
>> categories. When a node is clicked a <div id="documentList" ...> loads
>> another page with a listing of documents in that category. (Just like in
>> the showcase example but with a little more information in the div)
>> Every document(-link) should notify another topic that forces a third
>> <div id="documentContent" ..."> in the page to show the content of the
>> document.
>>
>> And thats where my problem occurs. In the document list I got the
>> following link for every document
>>
>> <sx:a notifyTopics="documentSelected"><s:property value="Name" /></sx:a>
>>
>> Where should I place the code? In the page where the tree and the divs
>> are, or in the page that is loaded after selecting a node?
>>
>>    dojo.event.topic.subscribe("documentSelected", function
>> documentSelected(node) {
>>                alert(node);
>>    });
>>
>> And maybe more important - I derived the subscribe code from the
>> nodeSelected example - is it correct that this function has also just
>> one parameter???
>>
>> Any help apreciated!
>>
>> Regards
>> Jan Froehlich
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>
>
>
> --
> "Hey you! Would you help me to carry the stone?" Pink Floyd
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>



-- 
"Hey you! Would you help me to carry the stone?" Pink Floyd

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to