Netui Anchor Tag
Can we use href and action attribute in netui:anchor tag both at a time...*href* is for opening a modal dialog and action is page flow action
does the action have a formSubmit = true? If not then your modal dialog should be shown via the onclick and you have to javascript the link click (based on your modal dialog options)
If you do have a formSubmit=true, then you'd have the onclick show the modal dialog and you would have to write additional javascript to submit the form (Along with setting its action)
regards
deepak
Similar Messages
-
Netui: anchor tag with target attribute.
I am using the netui:anchor tag inside an iframe to post to an action. But the
resulting page is displayed within the iframe. Will the target attribute of the
netui:anchor tag help solve the problem. What is a valid value of the target
attribute.
thanks,
Shankardoes the action have a formSubmit = true? If not then your modal dialog should be shown via the onclick and you have to javascript the link click (based on your modal dialog options)
If you do have a formSubmit=true, then you'd have the onclick show the modal dialog and you would have to write additional javascript to submit the form (Along with setting its action)
regards
deepak -
Netui anchor tag in netui:form
I have some code like following:
<netui:form action="action1" >
<netui:anchor action="action2">Check</netui:anchor>
</netui:form>
Action1 and action2 willl be finally redirected to the same JSP(for example one.jsp).
The weird thing is that: according to log output, it seems that one.jsp has been hit twice when user click "check" link.
Is it possible that when user click "check" link, weblogic not only trigger action2 but also trigger action1? forsubmit attribute is not set to true explicitly for netui:anchor tag.
Thanks in advancehi
verify from a browser trace tool (e.g. livehttpheaders, fiddler or firebug) how many requests your browser is making. (or you can inspect the code that portal generates in the HTML). Once we have determined whether its the browser making the two requests or something on the server, we can see if there are workarounds.
regards
deepak -
Problem in onClick attribute of the netui:anchor tag
Hi,
I have a String object to be passed to the javascript function with onClick attribute.
eg: <%String st = new String("helo");%>
<netui:anchor action="display" onClick="display()">
I want to pass the object st to the java script so that I can do some validations. how can I do that. If I say,
onClick="display('<%=st%>')" it is not working. can you please suggest me a solution.
Regards,
Satish.I haven't tried this with the netui:anchor tag, but it works with the netui:button tag.
<%
String onCl = "display('" + st + "')";
%>
<netui:anchor action="display" onClick="<%=onCl%>">
Apparently, you can place a scriptlet inside the onClick attribute, but you cannot intermingle the scriptlet with plain text.
Also, the onclick attribute appears not to support XScript ({request.whatever}). I find that weird. -
Has anyone extended netui anchor tag and created custom tag?
I am considering writing a custom pagination tag extending the anchor tag.
Appreciate any suggestions ..sample code
ThanksJust need to provide a caveat with extending the 8.1 NetUI JSP tags...
Unfortunately, the Workshop 8.1 JSP tags did not provide a supported extensibility API. If the 8.1 JSP tags are extended, BEA / Workshop do not make any guarantees about the forward compatibility of these APIs in future releases. A NetUI JSP tag API will be available in the 9.2 GA release of Apache Beehive, which will be included in Workshop 9.2.
Hope that helps...
Eddie -
Error in form submit through netui:anchor tag onClick event
Hello,
I am working on a portal application. Below is my jsp code of a simple search screen. The search parameter is customername.
<netui:form action="searchCustomer" style="form" tagId="myForm">
<netui:textBox dataSource="{actionForm.customerName}"></netui:textBox>
<netui:anchor onClick="sayHello(); return false;" styleClass="button" action="searchCustomer" formSubmit="true"> Search</netui:anchor>
</netui:form>
I have an onClick event as I want to implement some customer logic on click of the anchor tag.
function sayHello(){
// customer implementation here
document.forms[getNetuiTagName("myForm",this)].method="POST";
document.forms[getNetuiTagName("myForm",this)].action="/searchCustomer.do";
document.forms[getNetuiTagName("myForm",this)].submit();
In the searchCustomer method of the controller, the form has zero parameters. The customerName has null value.
Can anyone tell me what am I doing wrong here.
Any help is appreciated.
Thanks
ManjuI also want to add a confirm() dialog before submitting. However, setting the onClick handler overrides the one generated when formSubmit="true". I worked around this by calling the generated function directly:
<... onClick="if (confirm('[msg]')) { anchor_submit_form(getNetuiTagName('[formName]'), this.href) } return false;">
Where [msg] is the message to display and [formName] is the name of the form containing the anchor.
Hope this helps someone. -
Output of netui:anchor - 1563
Hello,
I have a requirement, where I need to pass the output generated by netui:anchor
to a javascript. Basically I need to capture an portlet action url along with
the portal desktop and sendit to mailto functionality. I tried using the id attribute
of the netui:anchor tag and unfortunately it is not working. The id is set to
null by the tag.
Is there a way to capture a porlet's action url?
Thanks for your help.
Senthil Kumar.SNevermind. I solved it.
Thanks
Kunal
"Kunal Mittal" <[email protected]> wrote:
>
I have my WebLogic Server running on port 7110. There are several places
where
I use the netui:anchor tag to generate links and form submit. However,
the url
that gets generated in the html output (I did a view source in IE to
see this),
all have 7001 as the port instead of 7110.
Thanks
Kunal -
Title attribute for netui:anchor
Does anybody know how to set an title on a <netui:anchor> tag? I can't see anyway
of doing this from the documentation.
As of Oct 04 this will be illegal in Europe when the Disability Discrimaination
Act legislation comes into effect.
Many Thanks
TonyThere's not a way to do that currently. This is a bug that will be fixed in
the next version.
Rich
"Tony Cromarty" <[email protected]> wrote in message
news:400c0e2a$[email protected]..
>
Does anybody know how to set an title on a <netui:anchor> tag? I can't seeanyway
of doing this from the documentation.
As of Oct 04 this will be illegal in Europe when the DisabilityDiscrimaination
Act legislation comes into effect.
Many Thanks
Tony -
Hi,
I want to open a link(Fr eg www.yahoo.com) in a new browser window.I am using netui:anchor tag but a not able to display the link in the new page.A popup window opens but the url doesnt load.
<netui:anchor href="${container.item.urlName}" popup="true">${container.item.urlName}
<netui:configurePopup width="500" height="500"/>
</netui:anchor>
Please let me know how this can be done.
Thanks in advance.
SriMaybe a <netui:parameter/> in the <netui:anchor/> would do the trick. In
your action, you could check for a request parameter to determine where
it come from.
gerry rodman wrote:
Lets say that I have two netui:anchor's that transfer control to the same action
method in a page flow. How can I pass a paramter to the pageflow (upong clicking
the anchor) to detect which anchor was clicked?
thx
gr -
Netui:anchor generates port as 7001 instead of another port
Hi...
I have my WebLogic Server running on port 7110. There are several places where
I use the netui:anchor tag to generate links and form submit. However, the url
that gets generated in the html output (I did a view source in IE to see this),
all have 7001 as the port instead of 7110.
Any clues?
Thanks
KunalThere should be an xml file in your web-apps WEB-INF dir called something like
url-template-config.xml which has server settings like port number etc. I believe
this is used to generate URLs for page flows etc.
"Troy Hamsher" <[email protected]> wrote:
>
So... how did you figure this out?
"Kunal Mittal" <[email protected]> wrote:
Never mind. I figured this out.
Kunal
"Kunal Mittal" <[email protected]> wrote:
Hi...
I have my WebLogic Server running on port 7110. There are several places
where
I use the netui:anchor tag to generate links and form submit. However,
the url
that gets generated in the html output (I did a view source in IE to
see this),
all have 7001 as the port instead of 7110.
Thanks
Kunal -
Hi,
I am trying to create links by using netui-data:repeater tag. But, I am getting all the links in the same line like:
1 Link#1 2 Link#2 3 Link#3
Can anyone let me know how can I get each value in a new line. I am adding my code here:
netui-data:repeaterItem>
<netui:label value="{container.item.articleID}" defaultValue=" " ></netui:label>
<netui:anchor href="{container.item.link}" >
<b><netui:label value="{container.item.title}" defaultValue="@nbsp;" ></b></netui:label></netui:anchor>
</netui-data:repeaterItem>
Thanks,
LathaWhen you drag complex data onto jsp, Repeater wizard pops up, if you select "Next" instead of "Create", you will be prompted with different display options that you can select from like option "list" or "table" from the Data Format options.
-
Where the netui:anchor is translated by a portal?
I’m just wondering… How it’s possible, that I can use existing page flows as a portlets, without any changes to the existing JSPs. In those JSP I’ve got links created by <netui:nachor action=â€actonNameâ€>, but those are beehive tags, not connected with the portal implementation.
Of course, when I deploy this flow as a portlet, created URL are different, to accommodate portal context. So, where the magic takes place? In other words, where the default output of the netui:anachor is overridden?
I just like to know, how things are working…
Brgds,
Pawel KozlowskiThis is done via a URL rewriting framework within WLP. We use this
mechanism for all URLs generated portlets as long as portlets use some
known tags/APIs to create URLs.
For instance, when you use an anchor tag, depending on how it is used,
the following will happen:
a. Use the page flow directly: The anchor tag generates a URL based a
page flow specific URL rewriter.
b. Use a page flow as a local portlet: The anchor tag delegates URL
generation to a URL rewriter deployed by the portal framework.
c. Use a page flow as a portlet deployed on a WSRP producer: The anchor
tag delegates URL generation to a URL rewriter deployed by the WSRP
producer.
In each case, the output will be different, and is specific to how the
page flow is being used. The same approach applies to struts apps
deployed as portlets.
This is the reason WLP always requires you to use some known tags (like
pageflows, struts, or WLP's render tags, or the JSR168 API) to create
links. If you create links directly without using these tags, the
generated URLs may or may not work.
Subbu
Pawel Kozlowski wrote:
I???m just wondering??? How it???s possible, that I can use existing page flows as a portlets, without any changes to the existing JSPs. In those JSP I???ve got links created by <netui:nachor action=???actonName???>, but those are beehive tags, not connected with the portal implementation.
Of course, when I deploy this flow as a portlet, created URL are different, to accommodate portal context. So, where the magic takes place? In other words, where the default output of the netui:anachor is overridden?
I just like to know, how things are working???
Brgds,
Pawel Kozlowski -
Netui:repeater tags with ranges (aka prev/next)
Is there some way to implement ranges using the <netui:data-repeater> tags? By
ranges, I mean where you have 123 items in a list and you only display numbers
1-50. Clicking NEXT would give you items 51-100. When you're there, clicking PREV
would take you back to 1-50.
Sample code would be nice. I think it could be done with the <netui:data-choiceMethod>
tags, but what I am envisioning would be pretty uglyI am still stuck. I have the pager working fine. But, I have a checkbox that needs
to be bound with the recordid. When the form is submitted after selecting records
on multilple pages, I want to retrieve the recordids of records that were checked.
How do I do that? A chckbox datasource can only be a one-value String property
of a form. But, I need to save an array of ids that were checked. I am so lost.
Please help.
"bindu" <[email protected]> wrote:
>
So sorry Eddie,
My bad I dint scroll down all the way. Thanks so much.
Bindu
Eddie O'Neil <[email protected]> wrote:
John--
Here's an example of implementing a paged repeater.
Briefly, here's how it works:
The entire data set (a Product[]) is stored in the JPF. When paging
through this data set, a
sliding window (also stored as a Product[]) is used to contain the "current"
set of products to
render in the page. The sliding window Product[] is of size PAGE_SIZE.
When transitioning between
pages, this window is recalculated for each page.
Also calculated are the "currentPage", "lastPage", "prevPage", and
"nextPage", which are used to
render a pager like this:
Page <currentPage> of <lastPage> <anchor to prevPage> <anchor to
nextPage>
The JPF and JSP are pretty well documented. To run the Page Flow,
drop the JPF and JSP into a
directory called "repeaterPaging" in an 8.1 SP2 webapp.
There are lots of other ways this could be done (and certainly some
that are more efficient :),
but hopefully this helps get you started.
Eddie
Eddie O'Neil wrote:
John--
Yep, I did promise that, and nope, it hasn't been done yet. :)
But, thanks for calling me on it.
Will try to do that and distribute it to the list in the next fewdays.
Eddie
John H wrote:
Eddie,
You mentioned putting together an example of paging a repeater in
this
thread.
Did you ever get a chance to put one together? Would really loveto
see it if
you did.
Thanks,
John
Eddie O'Neil <[email protected]> wrote:
Jan--
We're talking about adding a pager to the repeater in a future
release of Workshop, but I don't believe that it will appear inan
8.1
service pack.
Additionally in 8.1, we are not exposing a NetUI tag SDK.
That being said, it isn't that difficult ot build a pager from
scratch with the <netu:anchor> / <netui:parameter> tags and a little
code in a JPF.
You'd want to have "prev" and "next" actions in the JPF to which
anchors in the JSP are bound. Then, you can keep track of the "current"
page in the URL and build the previous and next page indices fromthe
value that is availble in the request. Finally, create an intermediate
data structure that contains the data to display in the "current"page
and bind the repeater to this data structure. You'd build the contents
depending on whether the prev or next links were clicked. For example,
if your data set has 100 items in it and you only want to displayitems
20-29, you'd be on page 2 (depending on whether you start countingat
0 :) and the intermediate list would contain exactly these items.
Might sound complicated, but I think this would work out prettywell.
Hope that helps...
Eddie
Jan Noppen wrote:
Are there any plans to include the pager tag with the repeater
in
the
next service packs or releases of WebLogic?
If not, is there a way to build on the netui:taglibs to extend
their
functionality?
I know the grid has paging functionality but it ties you to rowsetsfor input, whereas the repeater is much more flexible.
<%@ page language="java" contentType="text/html;charset=UTF-8"%>
<%@ taglib uri="netui-tags-databinding.tld" prefix="netui-data"%>
<%@ taglib uri="netui-tags-html.tld" prefix="netui"%>
<%@ taglib uri="netui-tags-template.tld" prefix="netui-template"%>
<netui-data:declarePageInput name="displayProducts" type="repeaterPaging.Controller.Product[]"/>
<netui:html>
<head>
<title>Paging with the Repeater</title>
</head>
<body>
<p>
<b>Paging with the Repeater</b>
>>
>> <!-- Pager Text -->
<netui:label value="Page {request.currentPage} of {request.lastPage}"/>
<!-- Previous page anchor -->
<%if(request.getAttribute("prevPage") != null) { %>
<netui:anchor action="page">
Previous
<netui:parameter name="_page" value="{request.prevPage}"/>
</netui:anchor>
<% } else {%>
<!-- don't render the anchor when there is no previous
page -->
<netui:label value="Previous"/>
<% } %>
<!-- Next page anchor -->
<% if(request.getAttribute("nextPage") != null) { %>
<netui:anchor action="page">
Next
<netui:parameter name="_page" value="{request.nextPage}"/>
</netui:anchor>
<% } else {%>
<!-- don't render the anchor when there is no next page
-->
<netui:label value="Next"/>
<% } %>
>> <!-- display the current window into the data set -->
<netui-data:repeater dataSource="{pageInput.displayProducts}"
ignoreNulls="true">
<netui-data:repeaterHeader>
<table class="tablebody" border="1" width="60%">
<tr class="tablehead" valign="top">
<th width="30%">Product ID</th>
<th>Name</th>
</tr>
</netui-data:repeaterHeader>
<netui-data:repeaterItem>
<tr valign="top">
<td align="center"><netui:label value="{container.item.id}"
defaultValue=" "></netui:label></td>
<td><netui:label value="{container.item.name}"
defaultValue=" "></netui:label></td>
</tr>
</netui-data:repeaterItem>
<netui-data:repeaterFooter></table></netui-data:repeaterFooter>
</netui-data:repeater>
</p>
</body>
</netui:html>
package repeaterPaging;
import com.bea.wlw.netui.pageflow.Forward;
import com.bea.wlw.netui.pageflow.PageFlowController;
* @jpf:controller
* @jpf:forward name="success" path="index.jsp"
* @jpf:forward name="page" path="page.do"
* @jpf:view-properties view-properties::
* <!-- This data is auto-generated. Hand-editing this section is not
recommended. -->
* <view-properties>
* <pageflow-object id="pageflow:/repeaterPaging/Controller.jpf"/>
* <pageflow-object id="action:begin.do">
* <property value="80" name="x"/>
* <property value="100" name="y"/>
* </pageflow-object>
* <pageflow-object id="action:page.do">
* <property value="120" name="x"/>
* <property value="100" name="y"/>
* </pageflow-object>
* <pageflow-object id="action-call:@page:index.jsp@#@action:page.do@">
* <property value="204,180,180,156" name="elbowsX"/>
* <property value="81,81,92,92" name="elbowsY"/>
* <property value="West_0" name="fromPort"/>
* <property value="East_1" name="toPort"/>
* </pageflow-object>
* <pageflow-object id="page:index.jsp">
* <property value="240" name="x"/>
* <property value="100" name="y"/>
* </pageflow-object>
* <pageflow-object id="forward:path#success#index.jsp"/>
* <pageflow-object id="forward:path#page#page.do"/>
* </view-properties>
public class Controller extends PageFlowController
// number of items to show on a single page
private static final int PAGE_SIZE = 5;
// URL parameter key for the value that will store the current page
private static final String PAGE_PARAM_KEY = "_page";
// Array to hold the entire data set
private Product[] products = null;
* Forward to the "page" action to set-up the first page of
* data to display in index.jsp.
* @jpf:action
protected Forward begin()
return new Forward("page");
* Change the page of data that is displayed in index.jsp. This
action
* is used if paging to either the previous or to the next page.
* @jpf:action
protected Forward page()
Forward f = new Forward("success");
page(f);
return f;
* Implement data set paging. This method uses a simple _page paramater
on the URL
* to indicate the correct "page" to display when "Prev" or "Next"
are clicked
* in the JSP. The key principle at work here is a sliding window
of size PAGE_SIZE
* that is moved forward and backward through the complete dataset.
This window
* contains the set of items to render for a single "page" in the
repeater. As
* the current page changes, this window (an array of size PAGE_SIZE)
is
* reconstructed.
* The pager consists of three parts:
* - a simple "Page # of #" label
* - a previous anchor that is enabled when there is a previouspage
* - a next anchor that is enabled when there is a next page
* To render a "page" of data, the _page parameter is convertedfrom
a String
* to an int. Using the page integer, the start and end of a window
into the
* complete data set is calculated. This windows slides back and
forth along the
* data set in PAGE_SIZE increments depending on the value of the
current page.
* In this case, with a PAGE_SIZE of 5 and data set size of 17,the
possible windows
* are:
* products[0] -> products[4]
* products[5] -> products[9]
* products[10] -> products[14]
* products[15] -> products[16]
* Thus, the lastPage value is 4, which is calculated with the Math.ceil(...)
* call below.
* Given the start and end of this window, a temporary array ofsize
PAGE_SIZE
* is created to hold references to the items that should render
from the complete
* data set. This array is passed to the page as a JPF page input
and is rendered
* with the <netui-data:repeater/>.
* Finally, four additional values are made available to the page
in the request
* and are used to render "Page # of #" and to provide parameters
to anchors that
* will display the previous and next pages:
* - Page # of # -- the first # is "currentPage" and the second#
is "lastPage"
* - prevPage -- the int value of the previous page. If there is
no previous page,
* this value is null in the request
* - nextPage -- the int value of the next page. If there is no
next page, this value
* is null in the request.
* Notes:
* - In order to have multiple repeaters on a page operating independently,
* the "_page" parameter would need to change to include a namespace
that
* would be used when finding the current page for a data set.
* - This JPF is implemented with a single "page" action that performs
both
* next and previous paging. This could also be implemented with
"prevPage" and
* "nextPage" actions that implement additional logic that runs
on the previous
* and next transitions.
* - No real error checking is done to ensure that the PAGE_SIZE
is greater than 0.
* Handling errors:
* - If parsing _page from the request fails to convert to an int,
a NumberFormatException
* is shown in the console and the first page will is used.
* - If the current page value is greater than the number of pages,
the last page will
* be displayed.
private void page(Forward f)
assert PAGE_SIZE > 0;
// calculate the last page
int lastPage = (int)Math.ceil((float)products.length / (float)PAGE_SIZE);
int currentPage = 1; // default page is page 1
Product[] displayProducts = new Product[PAGE_SIZE];
String currentPageStr = getRequest().getParameter(PAGE_PARAM_KEY);
if(currentPageStr != null)
try
currentPage = Integer.parseInt(currentPageStr);
catch(NumberFormatException nfe)
nfe.printStackTrace();
// continue with a current page of 1
// ensure the current page is not greater than the number
of pages
if(currentPage > lastPage)
currentPage = lastPage;
// index into the entire data set at which the window starts
// page indices are 1 based, adjust to be 0 based for accessing
// the Product[]
int start = (currentPage-1) * PAGE_SIZE;
// index into the entire data set at which the window ends or
the index
// of the last item when rendering the last page
int end = (currentPage != lastPage ? start + PAGE_SIZE : products.length);
// fill-up the set of Product objects to render up to PAGE_SIZE
// but don't run off the end of the products array
for(int i = 0; i < PAGE_SIZE && (start+i < products.length);
i++)
displayProducts[i] = products[start + i];
// set the previous page
int prevPage = currentPage-1;
if(prevPage > 0)
getRequest().setAttribute("prevPage", new Integer(prevPage));
// set the next page
int nextPage = currentPage+1;
if(nextPage <= lastPage)
getRequest().setAttribute("nextPage", new Integer(nextPage));
// set the current and last pages in the request in order to
show "Page # of #"
getRequest().setAttribute("currentPage", new Integer(currentPage));
getRequest().setAttribute("lastPage", new Integer(lastPage));
// set the current window in to the data set as a page input
f.addPageInput("displayProducts", displayProducts);
return;
* Initialize a simple, sample data set that contains
* 17 products with IDs running from 1-17 and text "Widget 1" to
* "Widget 17".
public void onCreate()
int size = 17;
products = new Product[size];
for(int i = 1; i <= size; i++)
products[i-1] = new Product("Widget " + i, i);
* Simple JavaBean that contains production information.
public static class Product
implements java.io.Serializable
private String name;
private int id;
public Product(String name, int id)
this.name = name;
this.id = id;
public String getName() {return name;}
public int getId() {return id;} -
Anchor tag error, also copy and pasting text comes up "null"
After the recent update I am receiving anchor tag errors telling me to start with an alphabetic letter, which I was. Also no longer lets me copy and paste text onto a page, instead it says "null". Any ideas on a fix ?
I don't see a closing </body> tag in your code. There's an opening tag, but no closing tag, hence unbalanced.
^_^ -
Not able to open document using anchor tag in firefox
Hello Friends,
I would really need your help in solving this issue.My application is deployed in server machine.
I'm accessing the application through fire fox. In my application, i have a link where i need to open a document on click of it.
For this, i am using html anchor tag.
Eg:
Test
where IP is the server machine address and dir is the shared directory.
It works in IE but didn't work in fire fox. Please help me out on to fix it.
Cheers,
CapTry out to open doc using following link, {color:#ff0000}*use 5 back slashes instead of 2*
{color}Test Link
once you done the code change, close the browser and open a new browser and try it.
Edited by: Thagelapally on Jul 17, 2009 6:05 AM
Maybe you are looking for
-
SSRS report throwing error :- system.web.aspnethostingpermission failed
Hi, I am facing an issue with SSRS report after implementing HTTPHandler in its web.config file of Report manager. My reports were working fine. I deployed a dll in report manager BIN folder and added below tag in the web.config <add verb="*" path="*
-
Elitebook 9470m - Reinstall windows help
Hi all, We have dozens of HP elitebooks, and recently started using 9470m's for some of our staff wanting thin/light machines. One machine has gotten corrupted and won't boot into Windows anymore. Bluescreens and nothing including system restore has
-
Hi, We're using the document review functionality to gather comments on documents. The location of the PDF's has been a shared drive but we're moving to using SharePoint. I've set up a workspace with a document library but I'm not sure I've configure
-
OBIEE accessing two schemas? Good vs. Bad?
I have an option to organize certain tables in two schemas. I wanted to know what are the drawbacks of having information placed in two separate schemas when it comes to OBIEE answers / dashboards? Thank you,
-
Hi. I work with a MDS9513 version 5.0(1a), and Fabric Manager version 4.1(1b), HDS USPV and hosts Dell R900 with Red Hat Enterprise 5. A few days ago, a HBA connected in a port was replaced by another HBA(Other host) and the first HBA continued in ma