Hi Thiago,

In my template 2 i can display many pages ex. template 2 display test1 or
test2 so on... using an eventlink then link parameters plus if else
component.
Then using link parameter i can make a link from template 1 pointing to
template 2 that will display test1 or test2.

But in actionlink using zone & block i cannot do that kind of event that
will link my template 1 pointing to template 2 that will display test1 or
test2.

I like to do it in AJAX because it is fast.
But currently i cannot hypherlink the actionlink from different pages.

Ex. code - Eventlink

template 1 class

@Inject
private Request request;

@BeginRender
public void beginRender(MarkupWriter writer)

[a href='" + request.getContextPath() + "/template2?cid=a01&param=pm'][/a]


template 2


# PM 

<t:if test="temppm">
   test1
   <p:else>
   test2
   </p:else>
</t:if>


template 2 - class

@Property
    private String param;

@Property
private String cid;

@Property
private boolean temppm;

@Inject
private PageRenderLinkSource pageRenderLinkSource;

@Inject
private Request request;

@InjectPage
private aboutus abs;

private Link link;

// Request Parameters
public Link set(String param, String cid) {
         link = pageRenderLinkSource.createPageRenderLink(this.getClass());

         if (param != null && cid != null) {
                 link.addParameter("param", param);
                 link.addParameter("cid", cid);
         }

         return link;
}

// Page Load
void onActivate() {
     param = request.getParameter("param");

if(param.trim().equals("pm")){
   temppm = true;
}
else
   temppm = false;
}

Object onPM() {
        link = abs.set("pm","a01");
        return link;
}


As you see i can link my template 1 to template 2 that will display test1 or
test 2.

But i cannot do it in actionlink its quite hard. ^_^

-- 
View this message in context: 
http://tapestry.1045711.n5.nabble.com/T5-Eventlink-Query-tp2837470p2838417.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to